Click here to Skip to main content
15,911,141 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello
I have designed one asp.net website where i have used session. sometime while redirecting from one page to another page session get expired automatically even though i am not expiring any session manually. Why it get expired pleas tell me any one.

Thanks in advance
Posted
Comments
Christoph Keller 24-May-11 6:57am    
Can you explain from which URL to which URL the session gets lost (for example domainx.com/page1.aspx to domainy.com/page2.aspx)?

Perhaps this is a domain-issue (sessions are domain-specific because they're saved in a domain-dependant cookie on the client). But this is just a big guessing ;)

Best regards,
Stops

Have you set an expiry time on your cookies?
 
Share this answer
 
Hi..

If you are doing anything with your directory structure (e.g. deleting directory from application) then session gets expired.
 
Share this answer
 
Increase your session time out from web.config,-
<system.web>>
        <sessionState timeout="10000"/> 
......
 
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