Click here to Skip to main content
15,879,535 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
hi all,

how to increase the session time in my web application. my web.config file

XML
<system.web>
<sessionState mode="InProc" timeout="30" ></sessionState>
</system.web>


in my local system working is fine.after deployed my web site. i got the problem

i.e session time was working only 5mint. after 5mintesam click on any button redirect to lo-gin page.

how to in-cress the session time. please help me

thanks and regards
Posted

set this in
XML
<system.web>
<customerrors mode="off" />
<httpruntime executiontimeout="900000" maxrequestlength="4096" usefullyqualifiedredirecturl="false" minfreethreads="8" minlocalrequestfreethreads="4" apprequestqueuelimit="100" enableversionheader="true" />
---
----
</system.web>


and set
XML
debug ="false"
in web,config, before your publish website.....

and set timeout in your IIS for your website......
 
Share this answer
 
In web.config you must set the authentication timeout.

XML
<sessionState timeout="120"></sessionState>
<authentication mode="Forms">
  <forms name="Authentication" loginUrl="~/FormStart.aspx" protection="All" timeout="120" />
</authentication>
 
Share this answer
 
How to increase session timeout [^]
sessionState Element[^]
XML
<system.web>
    <authentication mode="Forms">
          <forms timeout="50"/>
    </authentication>

    <sessionState timeout="60"  />
</system.web>
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900