Virtual Directory App within a Asp.net MVC app

廉价感情. 提交于 2019-12-07 14:26:04

问题


I am having issues trying to host screwturn wiki as a virtual directory application within my current domain.

the domain is hosted as something.com and the wiki would look like something.com/wiki

when i browse to something.com/wiki I get

Could not load file or assembly 'System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

Why is the virtual directory falling back to the root application. Shouldn't it be its own application boundary?

I have also added to the root mvc app

routes.IgnoreRoute("{*path}", new { path = @"wiki\/(.*)" });

This still has not solved the problem.


回答1:


Found the solution.

Thanks to Rick Strahls blog http://www.west-wind.com/Weblog/posts/133041.aspx

The solution was rather simple. Add the below to your too web application

<location inheritInChildApplications="false">
    <system.web>   
    .........
    </system>
</location>

This solved my problem.



来源:https://stackoverflow.com/questions/2375588/virtual-directory-app-within-a-asp-net-mvc-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!