Link to home
Start Free TrialLog in
Avatar of hongclub
hongclub

asked on

web site connection

Hi,

I have a .net site on my Window 2003 server.
my customer wants to extend the session timeout, do you know how i can do that in IIS or web.config?

I try to to do it in IIS website properties to set the timeout from 120 to 10 seconds, it doesn't work.
Also, i tried to added this to my web.config for 1 minute, it doesn't work too.
<sessionState mode="InProc" timeout="1"/>

Please advise,
Tommy
Avatar of Darrell Porter
Darrell Porter
Flag of United States of America image

Avatar of hongclub
hongclub

ASKER

do i have to put all the setting?
<sessionState
    mode="[Off|InProc|StateServer|SQLServer|Custom]"
    timeout="number of minutes"
    cookieName="session identifier cookie name"
    cookieless=
         "[true|false|AutoDetect|UseCookies|UseUri|UseDeviceProfile]"
    regenerateExpiredSessionId="[True|False]"
    sqlConnectionString="sql connection string"
    sqlCommandTimeout="number of seconds"
    allowCustomSqlDatabase="[True|False]"
    useHostingIdentity="[True|False]"
    stateConnectionString="tcpip=server:port"
    stateNetworkTimeout="number of seconds"
    customProvider="custom provider name">
    <providers>...</providers>
</sessionState>


i assumted this should work pretty good, but no effect
<sessionState mode="InProc" timeout="1"/>

Please advise,
any advise?
Please can someone help how to extend the timeout for my asp.net site?

i tried web.config, not working:
<sessionState mode="InProc" timeout="1"/>

i tried authentication, not working!!!
<authentication mode="Forms">
                  <forms loginUrl="/Security/Login.aspx" timeout="1" path="/"></forms>
</authentication>

i tired, set the connection timeout in IIS to 10 seconds, not working!!!

I tried process idle time in Applicationpool, not working!!!!

i tried the application configuration , not working!!!!


why it is so difficult to just set a timeout, please advise!!!
- Start Internet Information Services (IIS) administration tool (snap-in) from the Control Panel.
- Navigate to the "Default Web Site" node, right click on it and then select "Properties".
- In the 'Directory' tab click "Create" button, then click "OK".
- Click on the "Home Directory" tab, then "Configuration".
- Click on the "Options" tab.
- Increase the "Session timeout" value and click "OK" twice until you return to the IIS snap-in.
i did that, i changed it to 1 minute. still not working.

I login to my page, then i wait for 3 minute, refresh the page, still didn't kick me out.

Tommy
Based on your question, I thought you wanted to EXTEND or LENGTHEN the timeout.  You want the timeout to be shorter?
Did you reboot?

Otherwise, I would guess that something you changed previously (in config.web perhaps?) is now overriding the settings.

Look back to your notes (hopefully you kept track), and revert where changes were made.

Cheers,

Robstg
hi WalkaboutTigger,

"Based on your question, I thought you wanted to EXTEND or LENGTHEN the timeout.  You want the timeout to be shorter?"

sorry for confusing you. Yes i want to extend the time.
But in order to do a simple test, i want to make sure the setting take effect properly.
Therefore i set to 1 minute. so i just need to load the page, wait for 1-2 minutes, and then reload to test it.
Instead of wait for 1 hour to just do a test.

please advise what is the solution.
any advise.

How to extend timeout on my .net web application?

Tommy
Just an afterthought: if you set debug on, session timeouts are ignored.  Can you make sure that when testing your session lenghts, debug is off?

Cheers,

Robstg
Otherwise, here is a good link to sessionState Element settings:

http://msdn.microsoft.com/en-us/library/h6bb9cz9.aspx

Good Luck,

Robstg
the debug is off since it is my production site.

I talked to my co-worker, they said <sessionState timeout="60"> on web.config should do the job on their project.

I think i may test again,

One thing i am not sure, do i need to set the idle timeout on my IIS ApplicationPoolWithFS too?
From what i have been told, i don't need to, just want to make sure

Please advise, i think i am almost there.

Tommy
idle timeout will free up resources on your webserver, not related to sessions.  If you have more than one person "surfing" your website and one of them goes on a coffee break with the website still up in their browser, the sessionState setting should kick them out at the desired time you set.

idle timeout is when nobody is viewing your site, the resources "dishing out" the site may be reallocated to another process until such time your site requires them again.  I hope I explained that clearly.  

Robstg
thanks Robstq,

It seems by simple put <sessionState timeout="60"> to web.config will do the job.

Tommy
ASKER CERTIFIED SOLUTION
Avatar of Robert St. Germain
Robert St. Germain
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial