ASP.NET MVC Sub Application
I have a ASP.NET MVC application at a root level (eg http://example.com), and have now deployed an additional ASP.NET MVC application as a sub-application (eg http://example.com/api). I have set the sub-application as an "Application" in IIS.
However, whenever I try to navigate to the sub-application, I am getting a 403.14 Forbidden error. It's like the sub-application isn't getting picked up as an ASP.NET MVC application. If I try and hit a url which has a controller/action method in the sub-application (eg http://example.com/api/home/index"), I get a 404 response.
In terms of setup, the only differences I can see in IIS Manager is a lack of an "ISAPI Filters" icon for the sub-application. I am running .NET 4.5, ASP.NET MVC 4, and IIS 7.5.
Does anyone have any suggestions on how to get this ASP.NET MVC sub-application working?
Turns out I was missing the following config from the <system.webServer>
config in my child application:
<modules runAllManagedModulesForAllRequests="true"/>
After I put that in, it started recognising the child application as an ASP.NET MVC site.
链接地址: http://www.djcxy.com/p/74350.html上一篇: IIS 7上的MVC 3为MVC无扩展url请求返回404
下一篇: ASP.NET MVC子应用程序