简体   繁体   English

获取ASP.NET MVC Web应用程序以加载域中性

[英]Getting an ASP.NET MVC web application to load domain neutral

My company has a large number of clients and we are currently able to handle a limited number of clients per server. 我的公司拥有大量客户,我们目前能够为每台服务器处理有限数量的客户。 Every client, however, uses the same core web application. 但是,每个客户端都使用相同的核心Web应用程序。 Currently some content is stored locally in every site therefore we can't have them using the same site/application pool; 目前,一些内容存储在每个站点的本地,因此我们不能使用相同的站点/应用程序池; although we do have a multitenancy conversion project. 虽然我们确实有一个多租户转换项目。

We strongly sign all of our assemblies and I thought it would be an interesting idea to see if we could get them to load domain neutral in ASP.NET. 我们强烈签署了所有程序集,我认为看看我们是否可以让它们在ASP.NET中加载域中性是一个有趣的想法。 The advantage to this would be cutting our memory costs significantly which is one of our highest costs/limiting factors currently. 这样做的好处是显着降低了我们的内存成本,这是我们目前最高的成本/限制因素之一。 In addition it seems that we would be able to streamline deployment processes which are currently [compilation] IO/CPU bound and cost us about 6 hours fairly often. 此外,似乎我们能够简化当前[编译] IO / CPU绑定的部署过程,并且经常花费我们大约6个小时。

This task implies I want to move assemblies from loading in the App pool's app domain to the shared domain. 此任务意味着我希望将程序集从App池的应用程序域中的加载移动到共享域。

My understanding of the requirements for domain neutral loading are: 我对域中性加载要求的理解是:

  1. The assembly must be strongly signed and in the GAC. 必须在GAC中对程序集进行强烈签名。
  2. The dependencies in the binding closure must be in the GAC [and strongly signed]. 绑定闭包中的依赖关系必须在GAC [并且强烈签名]中。

I've tried to get this to work, but I can't get it to work for a small sample application. 我试图让它工作,但我不能让它适用于一个小样本应用程序。 I tried first putting Newstonsoft.Json into the GAC and to my excitement it flipped over to the shared domain after a recycle. 我首先尝试将Newstonsoft.Json放入GAC,令我兴奋的是,它在回收后转移到共享域。 However, I can't get any of the others to flip over to the shared domain even after GACing all of them: 但是,即使在对所有其他域进行GAC操作之后,我也无法让任何其他人转到共享域:

在此输入图像描述

My goal is to get my main application DLL to be loaded domain neutral. 我的目标是让我的主应用程序DLL加载域中性。 How can I debug/move forward on figuring out why the remaining Assemblies are not being loaded as domain neutral? 我如何调试/继续前进,找出为什么剩余的Assemblies没有被加载为域中立?

Additionally I'm a bit confused on how NGEN code page sharing relates or is in contrast to Shared Domain loaded assemblies. 另外,我对NGEN代码页共享如何关联或与共享域加载的程序集形成对比有点困惑。

Intern assemblies from ASP.NET 4.5 can be a solution. ASP.NET 4.5的实习程序集可以是一个解决方案。 Look for the aspnet_intern command and the interndir argument. 查找aspnet_intern命令和interndir参数。

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

相关问题 ASP.NET MVC Web应用程序中视图逻辑和域逻辑之间的混淆 - Confusion between view logic and domain logic in a ASP.NET MVC Web Application 为什么ASP.NET MVC配置错误,子文件夹作为Web应用程序无法加载站点主类型 - Why an ASP.NET MVC Configuration Error With Sub Folder as Web Application that cannot load Site Master Type 每次加载ASP.NET MVC应用程序时重新启动Web开发服务器 - restart of web dev server every time load ASP.NET MVC application ASP.NET MVC应用程序从app.config(而不是web.config)获取绑定重定向设置 - ASP.NET MVC application getting binding redirect settings from app.config, not web.config 为什么在ASP.NET MVC 4 Web应用程序中未调用我的操作? - Why is my action not getting called in ASP.NET MVC 4 web application? 具有多个域名的Web应用程序的ASP.NET缓存 - ASP.NET caching for web application with multiple domain names ASP.Net Web应用程序VS ASP.net MVC Web应用程序 - ASP.Net web application VS ASP.net MVC web application 一个网站内的asp.net mvc 2 Web应用程序? - asp.net mvc 2 web application inside a Web site? ASP.NET MVC Web应用程序与ASP.NET Web应用程序 - ASP.NET MVC Web application vs ASP.NET Web Application asp.net MVC 4 Web应用程序“ /”应用程序中的服务器错误? - asp.net MVC 4 web application Server Error in '/' Application?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM