Session timout problem

G

Guest

I can't get WebForm1 to load load automatically after a session timeout, with the following code. How can I do so

In Web.config

<sessionState
mode="InProc
timeout="1"
/

In Global.asax.cs

protected void Session_End(Object sender, EventArgs e

Response.Redirect("WebForm1.aspx")
}
 
I

Ismail Rajput

i think you do not have to use

timeout = "1"

use

timeout= 1
mg said:
I can't get WebForm1 to load load automatically after a session timeout,
with the following code. How can I do so?
 
M

Max

The session_end does not initiate another http request if that's what you're
thinking. However, on the next request the client makes, it should activate
the session_end -- although there are known issues with that. You cannot
always rely on that triggering... do a search for that session_end sub --
also note that in an earlier version of .net that sub's name is different.
In my tests, one works, the other doesn't. I don't know if it's bugged or
what!

-Max


mg said:
I can't get WebForm1 to load load automatically after a session timeout,
with the following code. How can I do so?
 
I

Ismail Rajput

sorry timeout="1" is ok in web.config but not if used in aspx page ,in aspx
page it would be session.timeout=1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top