C# “错误”;System.IO.IOException:进程无法访问文件…“;在ELMA BPM服务重新启动时
有人能帮我解决这个错误吗?我在ELMA BPM designer中工作以创建新的文档类型。要应用更改,我必须从设计器的发布页面重新启动服务器。但重新启动失败,出现以下错误:C# “错误”;System.IO.IOException:进程无法访问文件…“;在ELMA BPM服务重新启动时,c#,asp.net,iis,C#,Asp.net,Iis,有人能帮我解决这个错误吗?我在ELMA BPM designer中工作以创建新的文档类型。要应用更改,我必须从设计器的发布页面重新启动服务器。但重新启动失败,出现以下错误: *EleWise.ELMA.Runtime.Exceptions.ConfigurationInitializeException: Could not initialize provider (EleWise.ELMA.Extensions.MSSQL.MSSQLProvider) ---> System.IO.IO
*EleWise.ELMA.Runtime.Exceptions.ConfigurationInitializeException: Could not initialize provider (EleWise.ELMA.Extensions.MSSQL.MSSQLProvider) ---> System.IO.IOException: The process can not access the file "C:\ELMA3-Standart\Web\App_Data\CompiledModel\EleWise.ELMA.ConfigurationModel.dll", because this file is used by another process.
в System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
в System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
в System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
в System.IO.File.InternalWriteAllBytes(String path, Byte[] bytes, Boolean checkHost)
в EleWise.ELMA.Extensions.IOExtensions.<>c__DisplayClass2.ojGdPYsZsVXSCIcncMJy(Object , Object )
в EleWise.ELMA.Extensions.IOExtensions.<>c__DisplayClass2.<WriteAllBytesWithAttempts>b__0()
в EleWise.ELMA.Extensions.ActionExtensions.ExecuteWithAttempts(Action action, TimeSpan interval, Int32 attemptCount, Func`2 canRetry)
в EleWise.ELMA.Extensions.ActionExtensions.ExecuteWithAttempts(Action action, TimeSpan interval, Int32 attemptCount)
в EleWise.ELMA.Extensions.IOExtensions.V8SiNHPWKWSx55xVAVO(Object , TimeSpan interval, Int32 attemptCount)
в EleWise.ELMA.Extensions.IOExtensions.WriteAllBytesWithAttempts(String fileName, Byte[] bytes, TimeSpan interval, Int32 attemptCount)
в EleWise.ELMA.Model.Managers.ModelRegistrarImpl.gtNM326hspFGnkwJWMer(Object , Object , TimeSpan interval, Int32 attemptCount)
в EleWise.ELMA.Model.Managers.ModelRegistrarImpl.Register(ModelRegistrar r, NHManagerRegisterParams parameters)
в EleWise.ELMA.Model.Managers.ModelRegistrar.UfaKdxswFE3lDcr0dnAE(Object , Object , Object )
в EleWise.ELMA.Model.Managers.ModelRegistrar.Register(NHManagerRegisterParams parameters)
в EleWise.ELMA.Runtime.Providers.NHProvider.sNUTU0slYESilTqkrdpp(Object , Object )
в EleWise.ELMA.Runtime.Providers.NHProvider.Init()
в EleWise.ELMA.Runtime.RuntimeApplication.hoDmZpsRD8169HIgClCG(Object )
в EleWise.ELMA.Runtime.RuntimeApplication.InitProvider(IProvider provider)
--- End of inner exception stack trace ---
в EleWise.ELMA.Runtime.RuntimeApplication.InitProvider(IProvider provider)
в EleWise.ELMA.Runtime.RuntimeApplication.vV6Ci8sREl65cvg3g8j0(Object , Object )
в EleWise.ELMA.Runtime.RuntimeApplication.Init()
в EleWise.ELMA.ComponentModel.ComponentManager.S3XEv7YWCC6moQn6U26O(Object )
в EleWise.ELMA.ComponentModel.ComponentManager.<RegisterComponents>b__c(Object h)
в EleWise.ELMA.ComponentModel.ComponentManager.InvokeInitHandlers(Action`1 action)
в EleWise.ELMA.ComponentModel.ComponentManager.RegisterComponents()
в EleWise.ELMA.ComponentModel.ComponentManager.iOqsdcYuK9kGiI5HFBNd(Object )
в EleWise.ELMA.ComponentModel.ComponentManager.Init()
в EleWise.ELMA.ComponentModel.ComponentManager.mULmXFYu3IXZsc8MnIcS(Object )
в EleWise.ELMA.ComponentModel.ComponentManager.Init(String[] assembliesPaths, String workDirectory)
в EleWise.ELMA.BPM.Mvc.Application.Orchard.ELMAEnviromentStarter.RqpX6RqgtspSri31B0(Object , Object , Object )
в EleWise.ELMA.BPM.Mvc.Application.Orchard.ELMAEnviromentStarter.StartApplicationInThread()
Could not initialize provider (EleWise.ELMA.Extensions.MSSQL.MSSQLProvider)
EleWise.ELMA.SDK
в EleWise.ELMA.Runtime.RuntimeApplication.InitProvider(IProvider provider)
в EleWise.ELMA.Runtime.RuntimeApplication.vV6Ci8sREl65cvg3g8j0(Object , Object )
в EleWise.ELMA.Runtime.RuntimeApplication.Init()
в EleWise.ELMA.ComponentModel.ComponentManager.S3XEv7YWCC6moQn6U26O(Object )
в EleWise.ELMA.ComponentModel.ComponentManager.<RegisterComponents>b__c(Object h)
в EleWise.ELMA.ComponentModel.ComponentManager.InvokeInitHandlers(Action`1 action)
в EleWise.ELMA.ComponentModel.ComponentManager.RegisterComponents()
в EleWise.ELMA.ComponentModel.ComponentManager.iOqsdcYuK9kGiI5HFBNd(Object )
в EleWise.ELMA.ComponentModel.ComponentManager.Init()
в EleWise.ELMA.ComponentModel.ComponentManager.mULmXFYu3IXZsc8MnIcS(Object )
в EleWise.ELMA.ComponentModel.ComponentManager.Init(String[] assembliesPaths, String workDirectory)
в EleWise.ELMA.BPM.Mvc.Application.Orchard.ELMAEnviromentStarter.RqpX6RqgtspSri31B0(Object , Object , Object )
в EleWise.ELMA.BPM.Mvc.Application.Orchard.ELMAEnviromentStarter.StartApplicationInThread()*
*EleWise.ELMA.Runtime.Exceptions.ConfigurationInitializeException:无法初始化提供程序(EleWise.ELMA.Extensions.MSSQL.MSSQLProvider)--->System.IO.IOException:进程无法访问文件“C:\ELMA3 Standart\Web\App\u Data\CompiledModel\EleWise.ELMA.ConfigurationModel.dll”,因为此文件被另一进程使用。
of System.IO.\uuu Error.WinIOError(Int32 errorCode,字符串maybeFullPath)
of System.IO.FileStream.Init(字符串路径、文件模式、文件访问权限、Int32权限、布尔用户权限、文件共享、Int32缓冲区大小、文件选项选项、安全属性secAttrs、字符串msgPath、布尔bFromProxy、布尔useLongPath、布尔checkHost)
:/System.IO.FileStream..ctor(字符串路径、文件模式、文件访问访问、文件共享、Int32 bufferSize、文件选项选项、字符串msgPath、布尔bFromProxy、布尔useLongPath、布尔checkHost)
:/System.IO.File.InternalWriteAllBytes(字符串路径,字节[]字节,布尔校验主机)
of EleWise.ELMA.Extensions.IOExtensions.c_uudisplayClass2.ojGdPYsZsVXSCIcncMJy(对象,对象)
of EleWise.ELMA.Extensions.IOExtensions.c__显示类2.b__0()
:/EleWise.ELMA.Extensions.ActionExtensions.ExecuteWithAttentits(操作操作、时间间隔、Int32尝试计数、Func`2可重试)
:/EleWise.ELMA.Extensions.ActionExtensions.ExecuteWithAttentits(操作操作、时间间隔、Int32尝试计数)
of EleWise.ELMA.Extensions.IOExtensions.V8SiNHPWKWSx55xVAVO(对象、时间间隔、Int32尝试计数)
:/EleWise.ELMA.Extensions.IOExtensions.WriteAllBytes尝试(字符串文件名,字节[]字节,时间间隔,Int32尝试计数)
БEleWise.ELMA.Model.Managers.ModelRegistrarImpl.gtNM326hspFGnkwJWMer(对象,对象,时间间隔,Int32尝试计数)
БEleWise.ELMA.Model.Managers.modelRegistratorImpl.Register(ModelRegistrator r,NHManagerRegistraterParams参数)
of EleWise.ELMA.Model.Managers.modelregister.UfaKdxswFE3lDcr0dnAE(对象,对象,对象)
of EleWise.ELMA.Model.Managers.modelRegister.Register(NHManagerRegisterParams参数)
öEleWise.ELMA.Runtime.Providers.NHProvider.sNUTU0slYESilTqkrdpp(对象,对象)
öEleWise.ELMA.Runtime.Providers.NHProvider.Init()
of EleWise.ELMA.Runtime.RuntimeApplication.hoDmZpsRD8169HIgClCG(对象)
of EleWise.ELMA.Runtime.RuntimeApplication.InitProvider(IProvider提供程序)
---内部异常堆栈跟踪结束--
of EleWise.ELMA.Runtime.RuntimeApplication.InitProvider(IProvider提供程序)
of EleWise.ELMA.Runtime.RuntimeApplication.vV6Ci8sREl65cvg3g8j0(对象,对象)
of EleWise.ELMA.Runtime.RuntimeApplication.Init()
of EleWise.ELMA.ComponentModel.ComponentManager.S3XEv7YWCC6moQn6U26O(对象)
of EleWise.ELMA.ComponentModel.ComponentManager.b_uuc(对象h)
ev EleWise.ELMA.ComponentModel.ComponentManager.InvokeInitHandlers(Action`1 Action)
of EleWise.ELMA.ComponentModel.ComponentManager.RegisterComponents()
of EleWise.ELMA.ComponentModel.ComponentManager.iOqsdcYuK9kGiI5HFBNd(对象)
of EleWise.ELMA.ComponentModel.ComponentManager.Init()
of EleWise.ELMA.ComponentModel.ComponentManager.mULmXFYu3IXZsc8MnIcS(对象)
of EleWise.ELMA.ComponentModel.ComponentManager.Init(字符串[]汇编路径,字符串工作目录)
of EleWise.ELMA.BPM.Mvc.Application.Orchard.ELMAEnviromentStarter.RqpX6RqgtspSri31B0(对象,对象,对象)
ev EleWise.ELMA.BPM.Mvc.Application.Orchard.ELMAEnviromentStarter.startapplicationthread()
无法初始化提供程序(EleWise.ELMA.Extensions.MSSQL.MSSQLProvider)
EleWise.ELMA.SDK
of EleWise.ELMA.Runtime.RuntimeApplication.InitProvider(IProvider提供程序)
of EleWise.ELMA.Runtime.RuntimeApplication.vV6Ci8sREl65cvg3g8j0(对象,对象)
of EleWise.ELMA.Runtime.RuntimeApplication.Init()
of EleWise.ELMA.ComponentModel.ComponentManager.S3XEv7YWCC6moQn6U26O(对象)
of EleWise.ELMA.ComponentModel.ComponentManager.b_uuc(对象h)
ev EleWise.ELMA.ComponentModel.ComponentManager.InvokeInitHandlers(Action`1 Action)
of EleWise.ELMA.ComponentModel.ComponentManager.RegisterComponents()
of EleWise.ELMA.ComponentModel.ComponentManager.iOqsdcYuK9kGiI5HFBNd(对象)
of EleWise.ELMA.ComponentModel.ComponentManager.Init()
of EleWise.ELMA.ComponentModel.ComponentManager.mULmXFYu3IXZsc8MnIcS(对象)
of EleWise.ELMA.ComponentModel.ComponentManager.Init(字符串[]汇编路径,字符串工作目录)
of EleWise.ELMA.BPM.Mvc.Application.Orchard.ELMAEnviromentStarter.RqpX6RqgtspSri31B0(对象,对象,对象)
ev EleWise.ELMA.BPM.Mvc.Application.Orchard.ELMAEnviromentStarter.startapplicationthread()*
尝试停止应用程序池,稍后再重新启动它。即时重启有时会失败,因为前一个实例仍在工作。这不是一个bug,只是一个特性 谢谢,这很有帮助,但是没有延迟从设计器重新启动的选项,对吗?不幸的是,没有对远程Web服务器进行此类类型控制的选项,因此在这种情况下,您应该手动停止并启动Web服务器。