Session configured on Web.Config and IIS Session State is expiring ahead of time

Asked

Viewed 931 times

0

Setting:

I store the Session of the user to keep it logged in to the system, but something is happening that in 10 minutes it is undone because the Session expired.

But so much in the Web.Config how much in the Session State is set to 120 minutes and yet it expires.

Is there any process of IIS to clean up the Session, independent of these parameters ?

  • vc put this way <sessionState timeout="120"></sessionState> ?

  • 1

    The IIS has a configuration to recycle the Application Pool in a certain time interval, already checked there, in the properties of Apppool as are the settings?

  • @Ricardopunctual would be 'Disable Recycling for Configuration Changes' ?

  • 1

    It’s in the Apppool settings, in "Recycling", there’s a field in "Regular time interval (minutes)" where you set the time. Zero means you never recycle.

1 answer

1


120 minutes in config will stay like this:

<configuration>
  <system.web>
     <sessionState timeout="120"></sessionState>
  </system.web>
</configuration>
  • "some Disposis" What do you mean? Dispose of what?

  • @Ricardopunctual removed, Ispose does not apply in this case.

  • Yes that’s what I thought, the object Session does not implement the IDisposable, so it might confuse ;)

  • Yes, web.config is parameterized this way, but for some reason it is cleaning the Session, making this parameter obsolete...

  • @Igorcarreiro already tried to delete the site in iis and the other build?

  • 1

    or you can look at the state Session mode being used for the timeout

Show 1 more comment

Browser other questions tagged

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