Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
521 views
in Technique[技术] by (71.8m points)

asp.net mvc 4 - aspnet_regiis.exe -ir does not work on windows 8

I am trying to deploy an ASP.NET MVC3 app to my Windows 8 box with IIS8. When I try to route to the site I get the following error:

HTTP Error 403.14 - Forbidden

Pretty much everything I can find on this issue says to run:

aspnet_regiis.exe -ir

When I run this on my Windows 8 box, I get the following message:

Microsoft Windows [Version 6.2.9200]
(c) 2012 Microsoft Corporation. All rights reserved.

C:UsersJustin>C:WindowsMicrosoft.NETFrameworkv4.0.30319aspnet_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 
applications to use this version of ASP.Net.  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.17929) without changing existing web 
applications to use this version of ASP.Net.

ASP.NET 4.5 is already installed on my system.

Windows Features

My application runs correctly in Visual Studio, but I can not deploy it to save my life. I am completely at a loss on where to go from here. I have tried both integrated and classic pipeline modes for this site as well.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Run the following command, which will install and register ASP.NET 4.5 in IIS:

dism /online /enable-feature /featurename:IIS-ASPNET45 /all

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...