26 September 2009 ~ View Comments

Web server configured to not list the contents of this directory & The page you are requesting cannot be served because of the extension configuration.

Updated: 30 April 2010

For a long time, I am reasonably a good developer but I am really afraid of web server issues (iis 6.0/7.0) and deployment issues.  Some of the problems with web servers are really difficult to understand and solve. But recently I have come across one really good book for asp.NET developers to push the limits of IIS. It explains each and every step in configuring IIS 7 so that even beginners understand why the different decisions are made. After reading this book, I placed myself into the highly dependable contact point in my team at my work place. I highly recommend this book for all asp.NET developers. Please check it here.

Today, I was trying to run some simple WCF application in visual web developer express 2008 and straight away run into problems.

Initially, I got the following error.

Web server is configured to not list the contents of this directory

error_one

error_one

It’s easy. You have to enable directory browsing in IIS (mine IIS 7.0).

Step1: Just open the IIS, by typing “inetmgr” in the run window.

Step2: You have to enable Directory browsing at the top level of the root node. Double click on the directory browsing and click enable link.

enable directory browsing in IIS 7.0

enable directory browsing in IIS 7.0

May be you have to do this for Default Web Site node as well.

I thought, I did enough to run my WCF service in the browser. But it is still giving me some more problems.

This time the error was

The page you are requesting cannot be served because of the extension configuration.

After googling, people are talking about this issue, but they are talking in VS2005/2008 context. But I have VS Web Developer Express 2008 edition on VISTA.

But I translated them and did the following steps to register my .SVC extension.

Step 1:
Start -> All programs -> Microsoft Windows SDK v6.1 -> CMD Shell

cmdshell

Step 2: Navigate to C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation

Step 3: Run servicemodelreg –i

That’s it. You are all done.

Apparently when IIS 7 is installed they don’t turn everything on for you and so you are required to do this to run WCF on your machine.

Hopefully this will save some frustration and time for someone out there. Keep it cool.

Update me when site is updated

sidekick it

Tags: ,
blog comments powered by Disqus