我正在尝试的是以下内容:
在IIS-Manager中看起来像这样:
我的问题是,对“ProductionService”的重新请求没有路由到应用程序,而是由MVC-app处理。在“默认网站”下运行
我尝试了MVC IngoreRoute方法,但它没有改变结果..这是我的最后一次“RegisterRoutes”我的所有尝试&错误;)
routes.IgnoreRoute("Staging/{*pathInfo}");
routes.IgnoreRoute("ProductionService/{*pathInfo}");
routes.IgnoreRoute("StagingService/{*pathInfo}");
routes.IgnoreRoute("/Staging/{*pathInfo}");
routes.IgnoreRoute("/ProductionService/{*pathInfo}");
routes.IgnoreRoute("/StagingService/{*pathInfo}");
routes.IgnoreRoute("~/Staging/{*pathInfo}");
routes.IgnoreRoute("~/ProductionService/{*pathInfo}");
routes.IgnoreRoute("~/StagingService/{*pathInfo}");
routes.IgnoreRoute("~/Staging/{*pathInfo}");
routes.IgnoreRoute("~/ProductionService/{*pathInfo}");
routes.IgnoreRoute("{*Staging*}");
routes.IgnoreRoute("{*ProductionService*}");
routes.IgnoreRoute("{*StagingService*}");
那么,任何想法我能做什么?也许配置......在IIS中直接?
答案 0 :(得分:0)
我发现它... web.config以某种方式继承到子应用程序,所以如果我在子应用程序中执行这样的构造,对于我的情况它已经解决了:
<!-- This is required if you want to run with sub-applications in IIS as it inherits the web.config somehow...-->
<membership>
<providers>
<clear/>
</providers>
</membership>
<roleManager enabled="false">
<providers>
<clear/>
</providers>
</roleManager>
<pages>
<namespaces>
<clear/>
</namespaces>
</pages>