Click here to Skip to main content
15,896,111 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all,
i have implemented session state which is of type inproc in my project to maintain the required data, the problem is even when i am using this project while testing mode,or for just seeing the pages what my project consists, session is expiring too quickly and redirects to login page, why means i am not able to get this, what is happening, i have declared in web.config as follows.
XML
<system.web>
<authentication mode="Forms">
      <forms loginUrl="login.aspx" defaultUrl="Consultants.aspx"/>
    </authentication>
    <authorization>
      <!--<allow users="*"/>-->
      <deny users="?"/>
    </authorization>
    <sessionState mode="InProc" timeout="80"/>
  </system.web>

and also i have declared in session_start event of global.asax page as session.timeout=2880, but not working properly, can any one help me to achieve this?????
Posted
Updated 27-Nov-14 20:42pm
v2

You have to increase the timeout value from your web.config file also you have to specify that you allow cookies like in the next example:
HTML
<sessionstate mode="InProc" cookieless="false" timeout="2880" />

See details about this here: http://msdn.microsoft.com/en-us/library/ms972429.aspx[^]
 
Share this answer
 
v2
By default ASP.NET uses cookies to identify which requests belong to a particular session. If cookies are not available, a session can be tracked by adding a session identifier to the URL. To disable cookies, set sessionState cookieless="true".

<sessionState mode="StateServer" cookieless="false" timeout="120"/>


Check out this: Session TimeOut[^]

 
Share this answer
 

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