MVC 4 website with .NET 4.5 on IIS 8 in Windows 8 gives 403.14 forbidden error [closed]

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 … Read more

What is the file location of applicationhost.config in the different versions of IIS?

For the “big” IIS versions since IIS 7, the location is always the same: %windir%\System32\inetsrv\config\applicationHost.config For IIS Express there is one per user, the default location is: %USERPROFILE%\Documents\IISExpress\config\applicationhost.config again it’s the same for all versions. You can run multiple instances of IIS Express per user, you would need to specify the location of the applicationhost.config … Read more

IIS 8.0 ASP.NET and Error 500.19

ASP.Net applications come pre-wired with a handlers section in the web.config. By default, this is set to readonly within feature delegation within IIS. Take a look in IIS Manager, under the Server name → Feature delegation. If Handler Mappings is set to readonly and your site web.configs have a handlers section, flip the value to … Read more

Windows Authentication for ASP.NET MVC 4 – how it works, how to test it

For IIS 8.5 and MVC 4: How does Windows Authentication work? In this mode, User.Identity (as in HttpContext.Current.User.Identity) is populated by the underlying web server. This might be IIS Express in the link from @R Kumar demonstrated, or full blown IIS as in the video by @Thomas Benz. Specifically, User.Identity is a WindowsIdentity object. E.g. … Read more

Visual Studio 2013 gives “Cannot add duplicate collection entry of type ‘mimeMap’”

The issue was that when I switched to Visual Studio 2013, the web server used for debugging changed. Visual Studio 2013 uses IIS Express by default. Although Visual Studio 2010 SP1 supports IIS Express, my installation was still using the default Visual Studio Development server. Like IIS 7, Visual Studio Development Server did not define … Read more

Display all sites and bindings in PowerShell

Try this: Import-Module Webadministration Get-ChildItem -Path IIS:\Sites It should return something that looks like this: Name ID State Physical Path Bindings —- — —– ————- ——– ChristophersWeb 22 Started C:\temp http *:8080:ChristophersWebsite.ChDom.com From here you can refine results, but be careful. A pipe to the select statement will not give you what you need. Based … Read more