Search code examples
iis-7.net-4.0windows-8cmd

Can't register .net 4.0 in IIS on windows 8


I tried running aspnet_regiis.exe -ir in an admin cmd but no luck.

Any ideas?

C:\Windows\Microsoft.NET\Framework64\v4.0.30319>aspnet_regiis.exe -ir

Microsoft (R) ASP.NET RegIIS version 4.0.30319.17929 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.17929) without changing existing web applica tions to use this version of ASP.Net. This option is not supported on this version of the operating system. Administr ators should instead install/uninstall ASP.NET 4.5 with IIS8 using the "Turn Win dows Features On/Off" dialog, the Server Manager management tool, or the dism.e xe command line tool. For more details please see http://go.microsoft.com/fwlin k/?LinkID=216771. Finished installing ASP.NET (4.0.30319.17929) without changing existing web appl ications to use this version of ASP.Net.

whats all this scary talk about install/uninstall ASP.NET 4.5..


Solution

  • The solution for me on Windows Server 2012 was to:

    1. In IIS, Open Modules, Remove the ServiceModel module.
    2. In IIS, Open Handlers, Remove the svc-Integrated handler.
    3. Restart IIS

    More here: http://www.codeproject.com/Articles/613812/Solve-IIS-8-Error-Could-not-load-type-System-Servi

    The situation that caused this was the fact that I enabled WCF services after I had already set up IIS and .NET 4.5. This caused all of my apps on the server to fail.

    After I completed the above steps to get everything except WCF back up and running, I still needed WCF to work. To accomplish that, I then went into "Turn Windows Features On and Off" and enabled .NET Framework 4.5 Features -> WCF Services -> HTTP Activation