简体   繁体   中英

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

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

aspnet_regiis is deprecated in IIS8. When we install IIS (ASP .NET 4.5 and other components) automatically asp .net gets registered. We don't need to manually register it.

Can you briefly specify the problem you are facing?

Run the following command from an administrative command prompt: dism /online /enable-feature /featurename:IIS-ASPNET45

For Windows 8 client computers, turn on "IIS-ASPNET45" in "Turn Windows Features On/Off" under "Internet Information Services-> World Wide Web Services -> Application Development Features -> ASP.NET 4.5".

reference: http://support.microsoft.com/kb/2736284

I was facing the same issue as described above. It didn't work even after running following command
dism /online /enable-feature /featurename:IIS-ASPNET45
The solution for me was to install patch to VS 2010 SP1.
Just to give the background I have Windows 10 and VS 2010 SP1 and was facing issue when running a ASP.Net 4.6 site.
Following are links for Visual Studio versions:-
VS 2010 SP1 => https://support.microsoft.com/en-us/help/3002340/unexpected-dialog-box-appears-when-you-open-projects-in-visual-studio
VS 2012 => https://support.microsoft.com/en-us/help/3002339/unexpected-dialog-box-appears-when-you-open-projects-in-visual-studio VS

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM