Last post Jul 25, 2018 08:20 PM by Marc-
Jul 25, 2018 03:16 PM|Marc-|LINK
As the subject line eludes to, I added a new directory to my asp.net application (Windows Server 2012). When I access .aspx files in the new directory, all the session variables are null. I can immediately navigate to another directory, and session variables
work as expected. What would cause session variables to be null in a newly added directory?
Jul 25, 2018 04:06 PM|mgebhard|LINK
What would cause session variables to be null in a newly added directory?
I assume the subject is IIS. The steps to reproduce the behavior is creating a new application within an existing application. Isolation between application is the expected behavior.
Make sure the new app is running under the same application pool as the parent app.
Other than that you'll need to explain exactly what you are doing and the steps to reproduce as I'm guessing.
Jul 25, 2018 04:18 PM|PatriceSc|LINK
Or it seems you added a new directory with new aspx files which triggers an application restart. See
Jul 25, 2018 08:20 PM|Marc-|LINK
Thanks for your comment. In this case, there were two factors that prohibited access to the session variables, one of which was the application pool being different from the parent application's app pool. The second was that I failed to include a couple
of files that are specific to the system. Those files contain code that iterates through a form collection and creates session variables based on related names and values. The session variables didn't exist due to the missing files, and they were not accessible
due to the difference in application pools.