views:

190

answers:

3

I have a Asp.Net Web Site deployed as a WebSite inside IIS 7.5.

http://localhost/WebSite

Then I have a second Asp.Net MVC 2 web application which is deployed as Sub Application inside the above WebSite. So the mvc aplication should work on the following Url.

http://localhost/WebSite/MvcApp/

The web site works fine but when I browse the mvc Url http://localhost/WebSite/MvcApp/

It gives following error.

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

A: 

Is you Asp.Net MVC site running ASP.NET 4.0? If so, make sure the app pool for that MVC site is setup asp ASP.NET 4.0 and not ASP.NET 2.0.

Keltex
Asp.Net MVC Site uses its own App Pool which is Asp.Net 4.0.
Amitabh
A: 

You might need to create a virtual directory for the ASP.NET MVC application which will be associated to its dedicated application pool.

Darin Dimitrov
Inside the main web site I have added a new Application which has its own Application Pool.
Amitabh
How about the virtual directory? Without virtual directory an ASP.NET application cannot function properly.
Darin Dimitrov
Yes but I can't assign an application pool to a virtual directory.
Amitabh
I tried with virtual directory but it did not work with that as well
Amitabh
+1  A: 

I know I had the same problem some time ago. In my case the two applications ran a siblings, not one inside the other. The problem was the web.config in the root directory (above the two sites) conflicting with the the web.config in the seperate sites. I solved it by just deleting the root web.config (since I have nothing running in the root.

So my advice (I know it's definately not a solution) is to check for conflicts in your web.configs.

John Landheer