39

I have a website that I built in Visual Studio 2012 using MVC 4 and .NET framework 4.5. When I try to run it via IIS 8 on a machine running Windows 8 Pro, I get a 403.14 Error. It says

"Forbidden The Web server is configured to not list the contents of this directory.

Most likely causes: A default document is not configured for the requested URL, and directory browsing is not enabled on the server."

Here are some things I have tried that did not work:

  • Run %windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i and %windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -ir in both this and the Framework64 directory. This gives this error: "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." The link goes to a page about Windows Server 2012 which does not help. I could not find a specific setting in "Turn Windows Features on or off" dialog for iis 8. Everything relating to .net 4.5 is turned on.
  • Add to in Web.config. This gives the error: "This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false"."

I have made sure .net 4.5 is installed on the server (the installer said it is built into windows 8 and does not need to be installed). The application pool is the default pool using .net 4.0, integrated pipeline, with 32 bit applications enabled. I'm publishing to the default directory (inetpub\wwwroot) and the default site that was there worked fine. HTTP Redirection is turned on in "Turn windows features on or off"

Can anyone offer any more insights?

EDIT: Well, of course right after I post this I found something that works. Go figure.

In "Turn Windows Features on or off", under Internet Information Services -> World Wide Web Services -> Application Development Features, make sure that .NET Extensibility 3.5, .NET Extesibility 4.5, ASP.NET 3.5, ASP.NET 4.5, ISAPI Extensions, and ISAPI Filters are SELECTED.

This was outlined here: http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-using-aspnet-35-and-aspnet-45#TOC301258515 but since that refered to server 2012 instead of windows 8 I couldn't find the right location for these settings.

Hope this helps anyone with a similar problem. Thanks for reading.

3
  • I have the exact same problem. Would that someone had an answer! Feb 24, 2013 at 15:10
  • 8
    This question may be a duplicate, have fewer useful responses than other related questions here, or have any other shortcoming you can think of, but it is certainly not off-topic!
    – cdonner
    Dec 27, 2013 at 20:34
  • 1
    The question and answer for this helped me, a lot! It is definitely not obvious when you have to turn on features that used to be on by default. Thanks! Saved me from pulling out any hairs. May 27, 2015 at 11:51

1 Answer 1

68

In "Turn Windows Features on or off", under Internet Information Services -> World Wide Web Services -> Application Development Features, make sure that .NET Extensibility 3.5, .NET Extesibility 4.5, ASP.NET 3.5, ASP.NET 4.5, ISAPI Extensions, and ISAPI Filters are SELECTED.

This was outlined here: http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-using-aspnet-35-and-aspnet-45#TOC301258515 but since that refered to server 2012 instead of windows 8 I couldn't find the right location for these settings.

Note: Answer added to clean the question from unanswered

1
  • 1
    As someone new to IIS I didn't realize that features like ASP.NET 4.5 needed to be added outside of IIS itself. So this answer was helpful because it called out something to check that might be very obvious to those familiar with deploying IIS sites.
    – Sam Storie
    Feb 28, 2015 at 13:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.