Publishing MVC3 app to IIS error - The Web server is configured to not list the contents of this directory

6k Views Asked by At

I published my website to "C:\inetpub\wwwroot\Sem_App" and created a website with physical path "C:\inetpub\wwwroot\Sem_App" and port 84. When I browse the website on http://localhost:84/ I get the following error.

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

I do not want to list contents of the directory anyways, I want to run the default page that used to run in debugging mode of VS 2010. Anybody know what's going on?

I tried running this command and restarted iis but it didn't work C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -ir

2

There are 2 best solutions below

0
Min Min On BEST ANSWER

You may need to enable directory browsing option in IIS. Check out the below link for ASP.NET MVC deployment to IIS 6. (For .Net 4.0)

http://www.codefrenzy.net/2011/10/19/deploying-asp-net-mvc-3-to-iis-6/

0
Wazzz On

go to cmd type this and you're good to go %windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -ir

windir is typically C:\Windows