44

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:\Users\Justin>C:\Windows\Microsoft.NET\Framework\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 
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.

JustinY17
  • 1,035
  • 2
  • 13
  • 26

3 Answers3

40

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

dism /online /enable-feature /featurename:IIS-ASPNET45 /all
Hadi Eskandari
  • 23,473
  • 7
  • 48
  • 64
  • I ran this command from VS command prompt (in admin mode) & the problem got resolved :) Thx. – Biki Mar 15 '16 at 12:04
  • Deployment Image Servicing and Management tool Version: 6.3.9600.17031 Image Version: 6.3.9600.17031 Enabling feature(s) [==========================100.0%==========================] The operation completed successfully. – Biki Mar 15 '16 at 12:04
  • I ran this command on command prompt (in Admin mode) and It worked for me on Windows 8.1 with IIS 8.5 – Sheikh M. Haris Mar 21 '16 at 20:07
  • Installed IIS 8 on windows 10 *after* installing Visual Studio and ASPNet. Web application wouldn't run. Ran this command in Administrator command prompt and it cleaned it up. – Jonathan Jul 03 '16 at 16:46
  • Nice, thanks. Why doesn't MS put this into the output message of aspnet_regiis instead of some link to some support article that will soon be stale anyway? – cdonner Jan 11 '17 at 18:49
  • this is what worked for me on my new windows server 16 azure VM. – Dylan Hayes Jan 17 '17 at 06:38
22

I'm having the same problem. So far I only found this forum thread of which one of the answers states that installing via Web Platform Installer solved the problem, though this doesn't work for me. The IIS ASP.NET 4.5 feature is disabled as it is already installed.

UPDATE: I got it to work finally.

Follow the instructions from this SO question to enable the wcf service in IIS: WCF on IIS8; *.svc handler mapping doesn't work

Here is also some information about how to get the handler mapping installed

Community
  • 1
  • 1
snielsen
  • 236
  • 2
  • 3
2

what worked for me is: - unchecking the 4.5 and 3.5 in remove/add windows features - restarted the computer - checked the 4.5 and 3.5 in remove/add windows features.

And from that point it all worked again.

Mario
  • 513
  • 5
  • 12