?
Solved

web site connection

Posted on 2011-10-27
17
Medium Priority
?
225 Views
Last Modified: 2012-05-12
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
0
Comment
Question by:hongclub
  • 8
  • 6
  • 2
  • +1
17 Comments
 
LVL 15

Expert Comment

by:WalkaboutTigger
ID: 37042327
0
 

Author Comment

by:hongclub
ID: 37042378
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,
0
 
LVL 13

Expert Comment

by:khairil
ID: 37042495
Hi,

I suggest you to delete your same question here, http://www.experts-exchange.com/Programming/Languages/Scripting/Q_27419717.html
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:hongclub
ID: 37043218
any advise?
0
 

Author Comment

by:hongclub
ID: 37043409
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!!!
0
 
LVL 5

Expert Comment

by:Robert St. Germain
ID: 37046688
- 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.
0
 

Author Comment

by:hongclub
ID: 37048241
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
0
 
LVL 15

Expert Comment

by:WalkaboutTigger
ID: 37048312
Based on your question, I thought you wanted to EXTEND or LENGTHEN the timeout.  You want the timeout to be shorter?
0
 
LVL 5

Expert Comment

by:Robert St. Germain
ID: 37049686
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
0
 

Author Comment

by:hongclub
ID: 37054230
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.
0
 

Author Comment

by:hongclub
ID: 37057502
any advise.

How to extend timeout on my .net web application?

Tommy
0
 
LVL 5

Expert Comment

by:Robert St. Germain
ID: 37063562
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
0
 
LVL 5

Expert Comment

by:Robert St. Germain
ID: 37063595
Otherwise, here is a good link to sessionState Element settings:

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

Good Luck,

Robstg
0
 

Author Comment

by:hongclub
ID: 37063711
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
0
 
LVL 5

Expert Comment

by:Robert St. Germain
ID: 37063859
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
0
 

Author Comment

by:hongclub
ID: 37097737
thanks Robstq,

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

Tommy
0
 
LVL 5

Accepted Solution

by:
Robert St. Germain earned 2000 total points
ID: 37099863
Glad that this is resolved.

cheers,

Robstg
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
Measuring Server's processing rate with a simple powershell command. The differences in processing rate also was recorded in different use-cases, when a server in free and busy states.
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
Suggested Courses
Course of the Month15 days, 12 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question