I'm working in a bit of an older application, running on C# / ASP.NET v4.8. The application is hosted on Azure, via an App Service and a few other modules for databases and such.
Mostly things work well, except one sticky issue remains to fix -- in one of our development environments, user sessions seem to be terminating consistently after 1-2 minutes of a user logging in. It doesn't depend on which actions the user take, and it doesn't seem to be respecting the session timeout configuration specified in the <sessionState> variable of web.config.
The Azure config has ARR Affinity turned on, and I'm seeing the ARR- related cookies on the browser side during a user session. They don't appear to reset or change. We are using the "Scale Out" app service package, but even reducing the instances from 2 to 1 doesn't seem to do anything.
Weirdly, the login behavior works totally fine in our other three development environments, even on the sandbox environment where the application code is identical to the one being pushed to production (where the timeout issue occurs). So there has to be something within the Azure configuration or IIS setup somewhere that's causing some issue. I suspect it has to be related to the application restarting / app pool cycling, but I don't see anywhere within the Azure dashboard to check on or diagnose such problems.
Any help? I think we've gone down every rabbit trail at this point, so will appreciate anything else to look into. I don't want to have to set up a whole separate server to get <sessionState> to use an external state manager when the main machine should do.