简体   繁体   English

是否可以将ASP.NET 2.0 WebApp配置为IIS7中MVC3网站下的子应用程序?

[英]Can an ASP.NET 2.0 WebApp be configured as a child application under an MVC3 website in IIS7?

I have an MVC3 website setup in IIS7, lets say the URL is http://devtest.com , and I would like to setup an ASP.NET 2.0 webapp as a child application. 我在IIS7中安装了MVC3网站,可以说URL是http://devtest.com ,并且我想将ASP.NET 2.0 webapp设置为子应用程序。 My goal is to hit a URL like http://devtest.com/childapp . 我的目标是点击http://devtest.com/childapp之类的URL。

While the MVC app is working fine, when attempting to navigate to the child app, I get an error: "Could not load file or assembly 'System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified." 当MVC应用正常运行时,尝试导航到子应用时,出现错误: “无法加载文件或程序集'System.Web.Mvc,版本= 2.0.0.0,文化=中性,PublicKeyToken = 31bf3856ad364e35'或其依赖项之一。系统找不到指定的文件。”

Is this type of configuration even possible, and if not, can anybody suggest an alternative setup? 是否可以进行这种类型的配置?如果没有,是否有人可以建议替代设置?

The child application will inherit web.config file settings from the parent application and you will have to specify inheritInChildApplications="false" based upon your needs in the parent web.config file. 子应用程序将继承父应用程序的web.config文件设置,并且您将必须根据您在父web.config文件中的需要指定InheritInChildApplications =“ false”。

links: 链接:
1. Nested ASP.NET 'application' within IIS inheriting parent config values? 1. IIS中嵌套的ASP.NET“应用程序”继承父配置值?
2. Problems hosting multiple ASP.Net MVC3 applications in an IIS7.5 website 2. 在IIS7.5网站中托管多个ASP.Net MVC3应用程序的问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM