I have an app that was running (about 5 pages). I have a session var in
page load (see below) that I use to make sure people login. I added two
pages to the application, on these two pages the session variable is not
being recognized after the first postback. The older pages work fine.
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
'Put user code to initialize the page here
If Session("Logged In") = False Then
Response.Redire ct("Login.aspx" )
End If
If Not IsPostBack Then
Call GetCustomerList ()
End If
AddHandler cmbCustomer.Sel ectedIndexChang ed, AddressOf
GetAssemblies
AddHandler cmbAssembly.Sel ectedIndexChang ed, AddressOf
GetWorkFlow
End Sub
Thanks
Bill
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! 6 1044
Hi,
the added page are aspx page, right ? not asp.
if so for some reasone your application recycled. the common case is
writting somthing to the bin folder. check also the event log for
application recycaling.
by the way this senario is classic to use OO and build basic page class
that will handle your needs and derived from Page class. all pages in
your project can derived from your page base class thus preform the base
class functionallity without duplicating code.
Natty Gur[MVP]
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Hi,
the added page are aspx page, right ? not asp.
if so for some reasone your application recycled. the common case is
writting somthing to the bin folder. check also the event log for
application recycaling.
by the way this senario is classic to use OO and build basic page class
that will handle your needs and derived from Page class. all pages in
your project can derived from your page base class thus preform the base
class functionallity without duplicating code.
Natty Gur[MVP]
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Hello Natty,
thanks for the input. What I did was to put the "if
session("logged in") = false AFTER the NOT ISPostback code.
If not ispostback then
if session("logged in") = false then
response.redire ct("login.aspx" )
end if
end if
This worked, I don't know why, that is not the way I have it coded in
the other pages as shown below.
Thanks
Bill
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Hello Natty,
thanks for the input. What I did was to put the "if
session("logged in") = false AFTER the NOT ISPostback code.
If not ispostback then
if session("logged in") = false then
response.redire ct("login.aspx" )
end if
end if
This worked, I don't know why, that is not the way I have it coded in
the other pages as shown below.
Thanks
Bill
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Well this did not work either. After a second post back the session
variable was lost and I went back to login.
I tried this, I made a whole new project added the pages and I STILL
lost that session variable. I went into IIS and removed the login.aspx
from the document List. This stopped the application from going back to
the login page after the second post back. THERE has to be an error on
the page somewhere. Has anyone ran into this before, I am totally
confused on this one.
Also, this behavoir does not happpen on my p.c. It only happens on the
production server which has the same IIS I have (5.0) and the same
version of the framework.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Well this did not work either. After a second post back the session
variable was lost and I went back to login.
I tried this, I made a whole new project added the pages and I STILL
lost that session variable. I went into IIS and removed the login.aspx
from the document List. This stopped the application from going back to
the login page after the second post back. THERE has to be an error on
the page somewhere. Has anyone ran into this before, I am totally
confused on this one.
Also, this behavoir does not happpen on my p.c. It only happens on the
production server which has the same IIS I have (5.0) and the same
version of the framework.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: billj2 |
last post by:
I have an application with 5 or so pages. I use a session variable to
make sure people login. It has been working fine.
I added two new pages to the application, cut and pasted the code for
login (as shown below) however the user gets sent right back to the
login page ( we login as usual). The other pages work fine. It is just
the two new pages I added.
TO make things tougher. This only happens on the production server, not
my...
|
by: Nate Spillson |
last post by:
I have an asp.net web application that uses session variables to store
user information (username, security areas, configuration data). When
the user logs into the system I store all of this information in a
class and then dump it into a session variable. The timeout on the
server is set to 2hrs. Every now and then (5min-30min) the web server
will lose the session variable. This is very inconsistent and doesn't
appear to have an associated...
|
by: Greg Linwood |
last post by:
I'm having difficulty understanding Session state in ASP.Net. It's almost
embarrassing asking this as I've been using ASP since it was first released
& it really shouldn't be this hard to use - perhaps I'm just not very smart
or perhaps MS is making this too hard for us sql bunnies to understand - I
dunno, but I'd really appreciate someone explaining what I'm doing wrong
here & perhaps suggest a better approach..
I'm familiar with use of...
|
by: ASP.Confused |
last post by:
As you can tell from my previous posts on this issue...I'm really confused
:-/
I have a few ASP.NET web applications on my web host's "https" server. Our
web host has a single "bin" folder for me to toss my assemblies into. We
keep loosing session state every few months.
People have told me that my app could be running out of memory, causing the
sessions to get reset. Well, if this is the case, then when I go to the
page again,...
|
by: Mike |
last post by:
I have a function that is called when the user clicks the submit button,
during this function i also set a varaible to "Y" due to that this function
does a post back to the page then redirects. When I look for the session
variable in the page.isPostBack section it equals nothing, it appears that
the variable is not being passed to the post back section correctly. I have
this due to I only want this function to run if the user has something...
| |
by: T Ralya |
last post by:
I am told that ASP.NET controls the session ID and session variables, but
that does not fit my symptoms. I am posting here as directed. I'm hoping
that someone can at least recommend something to try to isolate the problem.
I have a simple application that demonstrates my problem.
Page 1, step1: SaveSessionVariableButton will create a string value, show
it on screen, save it in a session variable and show the session ID on screen....
|
by: Kelly |
last post by:
Help,
So I'm doing the common make thumbnails script. to save server space, I
don't want to store the thumbnails, so I did the classic break up script.
I parse on the main page where it gathers the folders, files and their
paths, then I pass them over into the sendbinary.asp page which does all the
editing.
First of all this works.
|
by: Sarah Marriott |
last post by:
Our website contains session variables that are used to validate if a user is
logged in etc. We have found that these variables are randomly lost while
navigating the website.
We set up some basic code (as shown below) which used a meta tag to refresh
an aspx page every second. It tests whether there is any content in a
session variable, if not then it writes a timestamp to a text file, recreates
the data in the variable and continues....
|
by: BillE |
last post by:
When a user opens a new IE browser window using File-New-Window the
integrity of an application which relies on session state is COMPLETELY
undermined. Anyone who overlooks the fact that File-New-Window creates an
instance of IE in the same process with the same SessionID as the parent
window is in big trouble. This fundamentally restricts the usefullness of
using session state management.
I probably missed it somewhere - can...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |