D
Darren Clark
I am having some troubles with Sessin varables dieing..
Basically ihave my own class structure called USER that once the user logs in i save it to a session var called
Session["userdetails"] = myUserObject;
All this works fine until sometimes it is like my sessoin vars just die and then trying to do a cast on them will result in a invalid cast error EVEN though the object is the same type..
I am not sure if the problem is that i am using forms authentication and that it times out AFTER session vars timeout...
eg the session is diing yet the forms authentication is still alive... as i can still view the page.. but my session vars arent there anymore.
Whereas if the forms authentication was dead it should refuse access to the page.
Has anyone had any problems like this at all? Can you give me anything to look at?
I am sort of at a loss... as i would think that if the sessoin ends it would call the session_end
and i make sure i signout the forms authentication.
protected void Session_End(Object sender, EventArgs e)
{
FormsAuthentication.SignOut();
}
HELP...
Basically ihave my own class structure called USER that once the user logs in i save it to a session var called
Session["userdetails"] = myUserObject;
All this works fine until sometimes it is like my sessoin vars just die and then trying to do a cast on them will result in a invalid cast error EVEN though the object is the same type..
I am not sure if the problem is that i am using forms authentication and that it times out AFTER session vars timeout...
eg the session is diing yet the forms authentication is still alive... as i can still view the page.. but my session vars arent there anymore.
Whereas if the forms authentication was dead it should refuse access to the page.
Has anyone had any problems like this at all? Can you give me anything to look at?
I am sort of at a loss... as i would think that if the sessoin ends it would call the session_end
and i make sure i signout the forms authentication.
protected void Session_End(Object sender, EventArgs e)
{
FormsAuthentication.SignOut();
}
HELP...