R
Rolf Gossen
Hello NG,
In my Web-Application I want to redirect the User to the Login-Page
whenever his Session has timed out. According to a lot of NewsGroup
Entries this can be achieved by the following code in global.asax
public Global()
{
InitializeComponent();
this.PreRequestHandlerExecute += new System.EventHandler
this.OnPreRequest);
}
protected void Session_Start(Object sender, EventArgs e)
{
Session["NeedsLogin"] = true;
}
protected void OnPreRequest(object sender, System.EventArgs evt)
{
if ((bool) Session["NeedsLogin"] == true)
Server.Transfer ("login.aspx");
}
Hence I face the following problem. Whenever my Session times out I
get the following HttpException.
HttpException (0x80004005):
Der Anzeigestatus für diese Seite ist ungültig, da er möglicherweise
beschädigt wurde.]
The Text is german and can be translated to : "invalid viewstate page
has possibly been damaged"
All pages are initialized with <%@ Page ... enableSessionState="true"
%>
Can anyone help me
Rolf
In my Web-Application I want to redirect the User to the Login-Page
whenever his Session has timed out. According to a lot of NewsGroup
Entries this can be achieved by the following code in global.asax
public Global()
{
InitializeComponent();
this.PreRequestHandlerExecute += new System.EventHandler
this.OnPreRequest);
}
protected void Session_Start(Object sender, EventArgs e)
{
Session["NeedsLogin"] = true;
}
protected void OnPreRequest(object sender, System.EventArgs evt)
{
if ((bool) Session["NeedsLogin"] == true)
Server.Transfer ("login.aspx");
}
Hence I face the following problem. Whenever my Session times out I
get the following HttpException.
HttpException (0x80004005):
Der Anzeigestatus für diese Seite ist ungültig, da er möglicherweise
beschädigt wurde.]
The Text is german and can be translated to : "invalid viewstate page
has possibly been damaged"
All pages are initialized with <%@ Page ... enableSessionState="true"
%>
Can anyone help me
Rolf