0

I have an ASP.net Web Site project in IIS 8.5.96. In the web config on the server is this:

<system.web>
    <sessionState timeout="12000" />

On one domain - (it's used for a simple login) it works fine - the session lasts for days.

(note, it's a legacy site, I know using session for login isn't ideal but we need this site to work as is).

We just pointed a different domain at this exact same website folder. Nothing else was changed.

Now the user is logged out after 20 minutes.

Shouldn't the new site take the figure from the web.config? If I check IIS (ASP.NET / Session State / Cookie Settings / Time-out) - that is 12000 under the new site - as specified in the web config (I presume that is the same setting?).

I've found some links, eg: How do you change session timeout in IIS 8.5?

This suggests changing various settings in IIS - but this was never required before. I'd rather change these things in the web.config.

How can I get the session to last as long as it used to and take the web.config setting?

And why would pointing a different domain at the same site cause this?

niico
  • 11,206
  • 23
  • 78
  • 161
  • https://learn.microsoft.com/en-us/iis/configuration/system.applicationhost/applicationpools/add/processmodel You probably forget to clone application pool settings from the old site, as idle timeout is by default 20 minutes. – Lex Li Jan 30 '19 at 16:17
  • both application pools have a 20 minute timeout (I already checked this - sorry should have made that clear). However, you made me realise that the app is now being hit way less often than before (for various reasons) so perhaps the application pool is being recycled now and wasn't before. Will try increasing it and reporting back thanks. – niico Jan 31 '19 at 03:06

0 Answers0