7

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

TimS
  • 318
  • 2
  • 3
  • 13

3 Answers3

8

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

TimS
  • 318
  • 2
  • 3
  • 13
0

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 that System.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.

C:\Windows\Microsoft.Net\Framework64\v4.0.30319\aspnet_regiis -i
slm
  • 7,355
  • 16
  • 54
  • 72
0

When running C:\Windows\Microsoft.Net\Framework64\v4.0.30319\aspnet_regiis -i I got:

C:\Users\mihai>C:\Windows\Microsoft.Net\Framework64\v4.0.30319\aspnet_regiis -i
Microsoft (R) ASP.NET RegIIS version 4.0.30319.0
Administration utility to install and uninstall ASP.NET on the local machine.
Copyright (C) Microsoft Corporation.  All rights reserved.
Start installing ASP.NET (4.0.30319.0).
This option is not supported on this version of the operating system.  Administrators should instead install/uninstall ASP.NET 4.5 with IIS8 using the "Turn Windows Features On/Off" dialog,  the Server Manager management tool, or the dism.exe command line tool.  For more details please see http://go.microsoft.com/fwlink/?LinkID=216771.
Finished installing ASP.NET (4.0.30319.0).

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.

Mihai Hangiu
  • 101
  • 2