Reputation:
What is assembly interning? For what purpose it is used for? I heard that it is a new feature added by ASP.Net 4.5. Can anyone please explain this feature. Is it same as String interning?
Upvotes: 4
Views: 383
Reputation: 3330
From book Developing Windows Azure and Web Services:
ASP.NET has a feature called shadow copying that enables assemblies that are used in an application domain to be updated without unloading the AppDomain. Normally, this is required because the Common Language Runtime (CLR) will lock the assemblies so you can’t just copy a new assembly over it. Shadow copying means that the original assembly is copied to a temporary location. The copied assembly is locked, and the original assembly can be updated with a new version.
ASP.NET 4.5 adds a new feature called assembly interning. Because all DLLs are already located in one location (the Temporary ASP.NET Files folder), interning analyzes this folder for duplicate assemblies. Those assemblies are then moved to a special location, and all the original references are replaced with what’s called a symbolic link.
Upvotes: 1
Reputation: 172578
From the MSDN:
ASP.NET
Bin assemblies interning (sharing common assemblies): The ASP.NET shadow copy feature enables assemblies that are used in an application domain to be updated without unloading that AppDomain (necessary because the CLR locks assemblies that are being used). This is done by copying application assemblies to a separate location (either a default CLR-determined location or a user-specified one) and loading the assemblies from that location. This allows the original assembly to be updated while the shadow copy is locked. ASP.NET turns on this feature by default for Bin folder assemblies so that DLLs can continue to be updated while a site is up and running.
Also check
Upvotes: 1