R – Will the GAC fix an ASP.NET/IIS6.0 System.OutOfMemoryException

.net-2.0asp.netexceptioniis-6out-of-memory

I have many instances of an application installed on an IIS 6.0, Windows Server 2003 box under the same application pool. They share many of the same assemblies and can not be joined in to a single application.

I recently added a new instance of the application and obtained a System.OutOfMemoryException when I tried to load the ASP.NET 2.0 application.

Will using the GAC to store common assemblies fix this error or can this only be remedied by spacing the sites between different application pools?

Best Answer

Putting something in the GAC only changes the physical location of the DLL (and security settings), it doesn't change what's loaded into memory.

Most people tend to think of the GAC as "where Microsoft puts their stuff". I haven't seen many applications created by "everybody else" that can justify using the GAC.

You should probably start thinking about a load-balancing solution of you are putting that much RAM pressure on your machine.