The ASP.net State Service appears to have mysteriously disappeared from our web server's Services list after changing the .Net version in an IIS app pool to v4 and then changing it back to v3.5 again. We're not even sure if that's related.
Does anyone know how we can reinstall or somehow register the service?
This is on a Windows 2008 Server. All .Net versions are installed.
Thanks
Running this command has reinstalled the ASP.Net State Service and session state is now working fine again. Still unsure of the original cause though.
C:\Windows\Microsoft.Net\Framework64\v4.0.30319\aspnet_regiis -i
Excellent answer. I spent lot of time debugging this issue. Our website is working fine till yesterday and suddenly stopped working with error.
Session state can only be used when
enableSessionState
is set to true, either in a configuration file or in the Page directive. Please also make sure thatSystem.Web.SessionStateModule
or a custom session state module is included in the<configuration>\<system.web>\<httpModules>
section in the application configuration.When checked ASP.net State Service is missing from the service list.
re-installing it as below helped to resolve the issue.
When running
C:\Windows\Microsoft.Net\Framework64\v4.0.30319\aspnet_regiis -i
I got:So I used "Turn Windows Features On/Off" dialog to install both IIS and ASP.NET 4.6.
Note that IIS have to be installed before .NET.