views:

678

answers:

1

Today I stumpled upon the shadowCopyBinAssemblies option in the hostingEnvironment tag.

Appearently this attribute it is a web.config (system.web) configuration Boolean option indicating whether the assemblies of an application in the Bin directory are shadow copied to the application's ASP.NET Temporary Files directory.

<hostingEnvironment shadowCopyBinAssemblies="false" />

A colleague had to enable this setting because (only) on his development machine he frequently got that ASP.NET error in the web browser:

 Cannot create shadow copy assembly file dll when that file already exists.

compiling a specific web project in Visual Studio 2008 and openining a page.

So now my question: can I preserve this setting in a production environment or could it harm performance and/or create other issues?

Thanks!

+2  A: 

I get this error from time to time, and usually doing Clean Solution followed by Rebuild Solution takes care of the problem. If this works for your colleague, then there's no need to play with the setting (especially in production).

Kon
Any answer to the original question about that setting causing harm in a production environment?
Garry
On the contrary, performance is apparently improved, but the application locks the DLLs while running. See this explanation: http://blogs.msdn.com/b/gduthie/archive/2006/11/09/tip-shadow-copy-and-your-bin-directory.aspx
Antony Highsky