Click here to Skip to main content
14,882,705 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear friends
I am having Problem related with the Session Object when the user login then i store its id in to session variable but after some time that id get cleared i set session timeout 30 in web.config but it is not working, I dont know what is wrong...
Help me out

My Code..
    <sessionState timeout="30"></sessionState>

custmerid is userid

Session["CustomerId"] = custmerid

Please Give me the Solution As soon As Possible

Thanks In Advance
Prasad Khandekar 3-Oct-13 6:23am
Is that some time equals to 30 minutes? If not then check your entire code again chances are that it's getting cleared from your code only. Another thing you may want to check for is app recycling. If your state state mode ins InProc then upon app recycling the session state will be lost. Try using SQL Server for this.

it is not working

Not a good information for us. You have to tell details clearly. Anyway check this.
Preventing Session Timeouts in C# ASP .NET[^]
    <sessionstate timeout="30" mode="InProc" cookieless="false" />

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