Yesterday I spent more than 4 hours to troubleshoot a weird situation that one of my web applications (32 bit) couldn’t get valid session state,
From the error it seems as if the session state was disabled, so I started looking at several areas in the IIS Manager to validate session state is active (I started with the root configuration of the entire computer)
I started with “Session State” options in the asp.net section and it looked ok
So I continued to “Pages and Controls” options in the asp.net section – and than I saw it was set as false!!! (unlike the default)
So I fixed it and restarted IIS to be on the safe side, and nothing was fixed it was still behaving as if the session state is off!
3 hours passed while I was comparing the ApplicationHost.Config to other system I have and everything looked ok (including modules, order, etc).
Than after discussing this with another friend of mine it came to me that it could be that the UI is a 64 bit application and as such it updates the 64 bit default web.config under %SYSTEMROOT%\Microsoft.NET\Framework64\v2.0.50727\CONFIG
Don’t forget our application is a 32 bit meaning the configuration it has, actually inherit from the 32 bit default root web.config which is found under %SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\CONFIG
So I have checked the 32 bit web.config and indeed I saw that the session state was disabled.
After I update this file everything started to work.
So in essence if you application is a 32 bit – you shouldn’t use the INETMGR coz it will show you wrong values (inheritance is from the 64 bit rather than 32 bit root web.config)
by the way, Look at this link for a very good reference for the entire configuration files (including all the sections)