Cannot create/shadow copy 'name' when that file already exists

Un cliente nuestro, tiene una instalación de un IIS, donde hay mas de un working process para atender los requerimientos de la aplicación WEB, generada en C#. Despues de instalar algunos assemblies, a algunos usuarios, le empieza a dar el error: 

Server Error in '/LUCIA90' Application.

Cannot create/shadow copy 'hwtradfu' when that file already exists. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileLoadException: Cannot create/shadow copy 'hwtradfu' when that file already exists.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Assembly Load Trace: The following information can be helpful to determine why the assembly 'hwtradfu' could not be loaded.

WRN: Assembly binding logging is turned OFF. 
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.

Note: There is some performance penalty associated with assembly bind failure logging. 
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Stack Trace:

[FileLoadException: Cannot create/shadow copy 'hwtradfu' when that file already exists.] 
   System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0

   System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +54

   System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +211

   System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +141

   System.Reflection.Assembly.Load(String assemblyString) +25 
   GeneXus.HttpHandlerFactory.HandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated) +255

   System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +175

   System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +128 
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +161   

Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433


La solucion para este problema, puede ser el bajar el servicio de IIS, antes de instalar y levantarlo despues de terminar la copia o sino poner: 




<>
< shadowcopybinassemblies="false">
< /system.web >

UPDATE:  Esto cambio, tiene la contra que si la DLL esta siendo usada no podrá instalarse, pero siempre es mejor que cancele en el momento de instalación que le cancele al usuario. 

Comentarios

Entradas más populares de este blog

Aplicación monolítica o distribuida?

La nefasta influencia del golero de Cacho Bochinche en el fútbol uruguayo

Funcionalidades de GeneXus que vale la pena conocer: DATE Constants.