kapil singh
kapil singh

Reputation: 136

the web server is configured to not list the contents of this directory with iis hosting

NET MVC web app with WEBAPI and .NET 4.5 I host it on local IIS Server and it work properly in my matchain.

I host it on other 3 machine all have same configuration as WINDOWS-7 it work only on one machine and the others give error like bellow:

"the web server is configured to not list the contents of this directory."

I followed the steps below:

  1. Control panel -> Program and Features -> Turn Windows Features on or of -> check all boxes of IIS and IIS Hostable Web Core

  2. Install -> .NetFramework V4.5.1

  3. Restart

  4. in CMD as Admisistrator -> for 32bit & 64bit OS

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

  1. Open IIS -> ISAPI and CGI Restrictions -> ASP.NET v4.0.30319 -> Allow

  2. Sites -> Add Web Site

 a. Site Name :- API
 b. application pool :- ASP.NET v4.0 Classic
 c. Path :- D:\API
 d. Port :- 8081 -> OK

Upvotes: 2

Views: 1808

Answers (2)

Houssam Hamdan
Houssam Hamdan

Reputation: 908

I would try to run a hello world asp.net mvc application on the 3 machines to make sure mvc is working first. I also like to set my app pools to integrated mode and not classic. There must be configuration difference between the machine where it worked and the other 2 machines. Look into app pool settings values and into the machine web.config and do diff merge and you should notice the issue.

Upvotes: 1

Astik Vachhani
Astik Vachhani

Reputation: 73

You can enable directory browser in IIS solve my problem. Please see this screen shot

iis directory browsing screen shot

Upvotes: -1

Related Questions