session expirying very early

Posted by Santosh4u under ASP.NET on 12/12/2012 | Points: 10 | Views : 858 | Status : [Member] | Replies : 4
Hi
i am getting session timeout problem in my application.
i'e i have not mentioned any session time in my application, it's just taking the default session time and it was working properly as per the default session.
but suddenly from few days it is expiring very early without any code changes in application.

i guess due to some setting changes in server it may happened.
is it possible to set the session time for my application without any code changes.

it's very urgent

Thanks
Santosh




Responses

Posted by: Ranjeet_8 on: 12/12/2012 [Member] [MVP] Gold | Points: 25

Up
0
Down
yes, you can set session timeout in IIS
look at this url
http://www.codeproject.com/Articles/113287/Why-Session-Timeout-is-not-working-for-your-websit
Or
Add this code on web.config file

<configuration>
<system.web>
<sessionState mode="InProc" cookieless="true"timeout="60"/>
</sessionState>
</system.web>
</configuration>


Santosh4u, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Pavanandey on: 12/12/2012 [Member] Bronze | Points: 25

Up
0
Down
<configuration>
<system.web>
<sessionState mode="InProc" timeout="9000"></sessionState></sessionState>
</system.web>
</configuration>

Make a change in the web.config file.




Thanks
Pavan Kumar
Mark Answer if this fits the need

Santosh4u, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Santosh4u on: 12/12/2012 [Member] Bronze | Points: 25

Up
0
Down
Hi Ranjeet,
if i change IIS Setting then it will reflect in all application published server.
but i want change it for the particular application not all application
and in case web.config i have already defined the time but it is not working as per timeout value.

can u plz tell me why it happened suddenly because i didn't change any code in my application/web.config.

Thanks

Santosh4u, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ranjeet_8 on: 12/12/2012 [Member] [MVP] Gold | Points: 25

Up
0
Down
If you change IIS Setting for single application then it will work for same web application. follow these step.
1.Open IIS, then right click on the websites which u want to change session time and got to the Properties window.
2.Click on the home directory then click on the configuration button
3.Click on the Options Tab
4.Now you can set the session timeout parameter.


Santosh4u, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response