|
-
Apr 29th, 2004, 04:49 AM
#1
Thread Starter
Fanatic Member
Increasing Session.timeout
How do I increase the time before a session times out in .net ?
I would like to use the webconfog or global asa if possible.
TIA
-
Apr 29th, 2004, 06:01 AM
#2
Hyperactive Member
Generally, I would say use the option within IIS to change the session timeout.
Why would you want to put it within your web.config or any other file for that matter??
Matt.
-
Apr 29th, 2004, 06:19 AM
#3
Thread Starter
Fanatic Member
I thought that whatever timeout you set in code would overwrite the IIS session stuff.
-
Apr 29th, 2004, 06:27 AM
#4
Hyperactive Member
Well
Ok, sure.
Well it is in the config.web file :
Code:
<configuration>
<sessionstate
mode="inproc"
cookieless="false"
timeout="20"
sqlconnectionstring="data source=127.0.0.1;user id=<user id>;password=<password>"
server="127.0.0.1"
port="42424"
/>
</configuration>
Matt.
-
Apr 29th, 2004, 07:13 AM
#5
Thread Starter
Fanatic Member
This is what I have :
Code:
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;user id=sa;password="
cookieless="false"
timeout="600"
/>
The problem is that the sessions are timing out after about 20 mins and I have no idea why.
Any ideas ?
-
Apr 29th, 2004, 07:25 AM
#6
Hyperactive Member
If the webserver is set to 20 minutes then thats what will happen.
I am not 100% on this, but the web.config wouldn't override the webserver anyhow.
The web.config control the timeout of the current web that you are in and not the entire webserver, so if the webserver is killing the session after 20 mins, then you will have to extend its timeout.
Why not try changing the webserver timeout to 5 mins and see if that kills the session after the 5 minutes.
Or set the webserver to 20 minutes and the web.config to 5 minutes and see if your session stops after 5 minutes.
I am not any kind of expert on this, as I always use the IIS timeout.
If any of this is of any use, i will be suprised, but its worth a go.
Matt.
Last edited by MattJH; Apr 30th, 2004 at 06:16 AM.
-
Apr 29th, 2004, 05:53 PM
#7
The timeout that you set in web.config or anywhere in code
"session.timeout = x" SHOULD overide the value set in IIS, at least according to our hosts technical team and some microsoft sites.
Why would you want to put it within your web.config or any other file for that matter??
People don't always have access to IIS management, for example if your hosting on a shared server.
I had loads of trouble with this though, read through this thread, see if there's any help in it Session timeout length
-
Apr 30th, 2004, 07:03 AM
#8
Thread Starter
Fanatic Member
I have changed IIS to 600 and it still times out at between 15 and 20 minutes.
This is driving me nuts.
-
Apr 30th, 2004, 07:09 AM
#9
Hyperactive Member
Just a couple of questions :
Is this happening with just this asp.net application, or others as well?
Have you tried to recompile the program after setting the timeouts on the server and in web.config??
Still looking into it, will post back if I can think of anything else.
Matt.
-
Apr 30th, 2004, 07:17 AM
#10
Hyperactive Member
What version of asp.net are you using??? Is it version 1.0??
If so you may need to upgrade to 1.1
http://www.asp.net/download-1.1.aspx?tabindex=0&tabid=1
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|