C# Web Forms - Missing Session

Asked

Viewed 420 times

2

I have an application in Web Forms that stores the session when the user logs in, with a time limit of 21 minutes without using the application to expire the session:

<sessionState timeout="21" />

Performing tests on the local machine, the limit works perfectly, but we have several customers using in production, with a publication for each customer using the same settings in IIS, including configured the same 21 minutes. What is occurring is that in some clients the session is expiring before the time set. Checking the code, I couldn’t find anything that might be implicating this, because the Session.Abandon(), is being called just at the application logout, as it should really be. I wonder if anyone’s been through it, and if they’ve been able to solve the problem?

2 answers

0

I believe the problem is in the IIS configuration. Probably in it the timeout configuration is shorter.

  • Eduardo I appreciate your reply, but the IIS is configured with the same 21 minutes of config.

  • You are on some Webfarm or some PAAS service?

  • We do not use Webfarm or PAAS.

0

There may be several reasons why the session is being lost. It is usually linked to the App Pool or the IIS itself to be restarted. This may occur for any of the following reasons::

  • When the Web.Config file is edited.
  • When a new IIS component is installed.
  • When Application Pool Recycling Time is Reached (configured on IIS).
  • When an untreated exception is triggered in the application.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.