Hosting an IIS app from command prompt

"C:\Program Files\IIS Express\iisexpress" /config:C:\Work\myapp\.vs\config\applicationhost.config

"C:\Program Files\IIS Express\iisexpress" /config:C:\Work\myapp\.vs\config\applicationhost.config /site:MyProj.MyApp.Api



iis 7 mvc

HTTP Error 403.14 – Forbidden The Web server is configured to not list the contents of this directory. Detailed


ASP.NET 4 was not registered in IIS. Had to run the following command in the command line/run

32bit (x86) Windows

%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -ir

64bit (x64) Windows

%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -ir

Note from David Murdoch’s comment:

That the .net version has changed since this Answer was posted. Check which version of the framework is in the %windir%\Microsoft.NET\Framework64 directory and change the command accordingly before running (it is currently v4.0.30319)