Why session expires asp net




















The pain started then. What happened is that the session was shared between the user and the session expired soon. After some chatting with my provider I came to understand that they also use web farms also using a Load Balancer with shared hosting. To maintain the session of a user, the machine key must be the same among the servers. But those kinds of provisions were not provided by that host provider. However, the session timeout was set to 20 minutes.

If the Load balancer problem is fixed then the user will also be pushed out from the application after 20 minutes. So what my point here is, if you have an application tightly coupled with the Session then you should consider doing what is explained here.

Apart from the preceding, if you have hosted your application in an individual server and encountered it in your environment then you should consider the following points.

In Web. Config Session State Node: As a first step, check that web. By default, the time is 20 minutes. It has method M1. M1 creates a folder for each session. When a session is expired, I delete that folder in global. When I open my webservice in browser and call M1, it operates correctly and the folder is deleted on timeout expiration time that I have set. But when I submit "Invoke" button of webservice for the second time after session timeout and folder is deleted , its session starts create folder and ends deletes folder immediately before timeout that I have set.

If I open a new window new session for each method call everything is OK. But I have problem when I click "Invoke" button for second time. It is something like caching problem for same sessions. Does your WebMethod actually access Session state? If not, try adding an access to a dummy session variable. This would look something like the following, avoids the need for a "dummy" Session variable, and means the folder is only created if and when it is actually needed.

Then you may need to investigate how to deal with session in a server farm. Google is your friend. John Warner From: sudhakarkanniyan via vb-dotnet-l [mailto:vb-dotnet-l Groups. Net I have increased but still session gets expires. Thank your information… I thing there is no enough memory to store session variable in server.. No Account? Sign up. By signing in, you agree to our Terms of Use and Privacy Policy. Already have an account? Sign in.

By signing up, you agree to our Terms of Use and Privacy Policy. Enter the email address associated with your account. We'll send a magic link to your inbox. Email Address. All Sign in options. Enter a Email Address.



0コメント

  • 1000 / 1000