ASP.NET hostingEnvironment / shadowCopyBinAssemblies

末鹿安然 提交于 2020-01-11 05:22:06

问题


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!


回答1:


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).



来源:https://stackoverflow.com/questions/281145/asp-net-hostingenvironment-shadowcopybinassemblies

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!