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. 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. 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.
This task implies I want to move assemblies from loading in the App pool's app domain to the shared domain.
My understanding of the requirements for domain neutral loading are:
- The assembly must be strongly signed and in the GAC.
- The dependencies in the binding closure must be in the GAC [and strongly signed].
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. However, I can't get any of the others to flip over to the shared domain even after GACing all of them:
My goal is to get my main application DLL to be loaded domain neutral. How can I debug/move forward on figuring out why the remaining Assemblies are not being loaded as domain neutral?
Additionally I'm a bit confused on how NGEN code page sharing relates or is in contrast to Shared Domain loaded assemblies.