Asp.net mvc 2 web application inside website?

I have an Asp.Net website deployed as WebSite inside IIS 7.5.

http: // localhost / WebSite

Then I have a second Asp.Net MVC 2 web application that deploys as a Sub Application inside the above WebSite. Thus, the mvc application should run at the following URL.

http: // localhost / WebSite / MvcApp /

The website works fine, but when I look at the mvc url http: // localhost / WebSite / MvcApp /

He gives the following error.

HTTP Error 403.14 - Forbidden Web site server configured so that not the contents of this directory.

UPDATE: It works for me. The problem was that I was missing in Web.Config inside the Views folder in Asp.Net MVC 2 application.

+4
source share
5 answers

You may need to create a virtual directory for an ASP.NET MVC application that will be associated with its dedicated application pool.

+1
source

I know that I had the same problem a while ago. In my case, brothers and sisters participated in two applications, and not one of them. The problem was that web.config in the root directory (above two sites) conflicts with web.config on separate sites. I solved this by simply deleting the root web.config (since nothing works in the root.

So my advice (I know for sure that this is not a solution) is to check for conflicts in your web.configs.

+1
source

Are you an ASP.NET ASP.NET site with ASP.NET 4.0? If so, make sure that the application pool for this MVC site is configured with asp ASP.NET 4.0, not ASP.NET 2.0.

0
source

Inside IIS Manager, you can right-click any folder in the tree that will be converted to an application. Have you tried this?

0
source

It seems to me that the mvc routing module does not fulfill your requests. You might want to check that not only web.config in your base web application does not load a module to replace the routing handler, but that web.config for your mvc application handles routing correctly. Take a look at this article for a description of routing dependencies and how it is configured inside iis.

0
source

Source: https://habr.com/ru/post/1312445/


All Articles