English 中文(简体)
MVC3号主要网络信号干扰了儿童MVC3网络信号
原标题:Main MVC3 web app interferes with child MVC3 web app

这里只是一些背景资料。 我目前正在与温·霍斯特共同担任东道,并安排如下工作:

Shared IIS
    |______Main Primary MVC3 web app (uses NHibernate & Castle.Windsor for ORM)
           |_______ Child MVC3 web app (not using NHibernate nor Castle.Windsor as it does not need database access)

At WinHost, it allows me to set the application starting point, so I can have

/ <= for primary app
/child <= for the child app

每一台都有自己的网络。 因此,它喜欢

/web.config
/child/web.config

Well, to my surprise, it seems that even though /child folder is set as an application starting point, it doesn t appear to be isolated from the parent primary web app, because when I try to load the child app, I get the infamous error

Could not load file or assembly Castle.Windsor or one of its dependencies. The system cannot find the file specified.

我试图通过把与NHibernate有关的图书馆带入/儿童/组合的夹子来进行工作,但这只会使情况更加恶化,因为我还需要在儿童队伍中建立更多的国家自由组合,尽管儿童不需要数据库查询。

因此,在某个地方(例如网络.config)我可以强迫儿童与父母分离?

我认为,最后的手段是切断儿童网络的浏览量,并将之变成主要网络的“Area”,但并非理想,因为这两个网络的浏览点完全是相互联系的,针对不同受众等。

Note: it should not a case of routing issue, because of two reasons 1. WinHost sets the /child folder as application starting point 2. Under the primary web app, I already ignored the child inside RegisterRoutes()

routes.IgnoreRoute("child");
routes.IgnoreRoute("{folder}/{*pathinfo}", new { folder = "child" });

在3小时工作之后,我就失去了工作。 任何建议都受到高度赞赏。 让我知道,你们是否需要看到任何冲突。 事先感谢你!

问题回答

I ended up resolving this by modifying the child app into an Area under the parent app. I then disabled application starting point for /child folder and removed the /child folder from server.

现在,它正在发挥作用,尽管我对工作进展并非完全感到迷惑。

The issue is .config inheritance. But you can disable that using the <location> element:

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

因此,从根本上来说,你不得不在座谈一下与父母亲身体有关但儿童没有使用的东西,并放弃遗产。

Here is an article with some more information: http://www.colincochrane.com/post/2007/11/Disabling-Configuration-Inheritance-For-ASPNET-Child-Applications.aspx





相关问题
session transfer issue from Tomcat to ASP.Net

I am using Tomcat to host JSP and using IIS 7.0 to host aspx (C# + .Net 3.5 + VSTS 2008), and I have some session transfer issue from JSP page to ASPX page. JSP page is in one domain and all other ...

How to use appcmd to set debug=false in IIS7

I m trying to use APPCMD to set debug=false in web.config, per the documentation. The specific syntax I am using is: APPCMD SET CONFIG "SITE/VDIR" section:compilation /debug:False /commit:APP ...

Windows User Account that executes only IIS7 Provisions

I have a web application that executes IIS 7 provisions (using Microsoft.Web.Administration.dll) to create our web and ftp sites. When I run this using the administrator account, it works ok. I want ...

Could I get by HttpModule the URL that contains * before?

My web-site is working under ASP.NET 3.5, IIS7, Integrated pipiline mode. My HttpModule is getting request to all resources, including URLs like this: http://my-site.com/address And I would support *...

IIS 7 Http Handler development issue

I am using VSTS 2008 + C# + .Net 3.5 + IIS 7.0 to develop an ASP.Net web site. I want to develop an Http module, which could inspect whether incoming request has some specific http header (e.g. ...

热门标签