Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>ASP.NET performs a thing called <em>shadow copying</em> on various resources including DLLs and ResX files. When a file is accessed by the framework, it is locked preventing direct access. To prevent locking files within the root/bin or root/App*_Resources (for example), it copies these resources to a predetermined directory.</p> <p><strong>[Edit]</strong><br> The <em>predetermined directory</em> defaults to something like </p> <blockquote> <p><strong>C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\demo1\9b9144a7\8665ac07</strong> </p> </blockquote> <p>where demo1 is the name of your application and nested directories which (I assume) are hashed against the friendly name of the AppDomain for the contained resources.</p> <p>For instance, I have a directory called <strong>dbresourceproviderweb</strong> from a resource provider example on MSDN written by Michelle Bustamante. Inside that directory, there are two folders: c8b872e2 and 7fc33f08. To go further, compiled resources for Ecuadorian Spanish are under <em>...\dbresourceproviderweb\c8b872e2\97074f76\es-EC</em> and <em>...\dbresourceproviderweb\7fc33f08\ac65ebd3\es-EC</em><br> <strong>[/Edit]</strong></p> <p>You can change this directory in Application_Start as explained here: <a href="https://stackoverflow.com/questions/2842208/assemblyresolve-event-is-not-firing-during-compilation-of-a-dynamic-assembly-for">AssemblyResolve event is not firing during compilation of a dynamic assembly for an aspx page</a></p> <p>You can turn off shadow copying in the web.config: </p> <p><code>&lt;hostingEnvironment shadowCopyBinAssemblies="false" /&gt;</code></p> <p>When one of these shadow copied files is updated within your application, a new AppDomain is spawned and requests in the current AppDomain are allowed to finish while all new requests are directed at the new AppDomain.</p> <p>For more information on Shadow Copying and AppDomains, check out MSDN's article: <a href="http://msdn.microsoft.com/en-us/library/ms404279.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/ms404279.aspx</a></p> <p>Edit2: I just learned that you can modify the required length of time between file copy operations to spawn an AppDomain.</p> <p>In the system.web/httpRuntime element, you can specify <strong>waitChangeNotification</strong> and <strong>maxWaitChangeNotification</strong> so that a new AppDomain isn't spawned for every file copied. See <a href="http://msdn.microsoft.com/en-us/library/e1f13641.aspx" rel="nofollow noreferrer">MSDN</a>.</p> <p>Although there aren't really examples for this behavior on MSDN, it's good to keep as a reference for the configurability of the HttpRuntime.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload