.net – Windows更新后WCF服务中的ServiceActivationException:
我在IIS中安装了一个.NET 3.5 Web应用程序,它提供了几个WCF服务.这已在数十家公司部署超过一年,但最近一台服务器在调用服务或导航到IE中的.svc文件时遇到此错误:
System.ServiceModel.ServiceActivationException: The service '/MyService/MySyncService.svc' cannot be activated due to an exception during compilation. The exception message is: Could not load file or assembly 'App_global.asax.vtxl8efb,Version=0.0.0.0,Culture=neutral,PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.. ---> System.IO.FileNotFoundException: Could not load file or assembly 'App_global.asax.vtxl8efb,PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. File name: 'App_global.asax.vtxl8efb,PublicKeyToken=null' at System.Reflection.Assembly._nLoad(AssemblyName fileName,String codeBase,Evidence assemblySecurity,Assembly locationHint,StackCrawlMark& stackMark,Boolean throwOnFileNotFound,Boolean forIntrospection) at System.Reflection.Assembly.nLoad(AssemblyName fileName,Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef,Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(String assemblyString,Boolean forIntrospection) at System.Reflection.Assembly.Load(String assemblyString) at System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString,Uri[] baseAddresses) at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService(String normalizedVirtualPath) at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(String normalizedVirtualPath) at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) 服务器在周末应用了Windows更新,之后发生了此错误,服务无法正常工作.另一个.NET 3.5 Web应用程序,而不是WCF,在同一台服务器上工作正常.
但我真的很想知道为什么会发生这种情况以及我能采取哪些措施来防止这种情况发生.在我们应用Windows更新后,要求所有客户完成这些步骤似乎不合理. 我没有使用这些应用程序中的任何一个Web部署项目(对此类错误的唯一引用,我可以找到所有引用Web部署项目,如this).我的Web应用程序项目已构建,然后进行复制部署. 它看起来有点像MS的this problem,他们已经发布了补丁,但实际上并不相同. 在MSDN forums交叉发布. 解决方法
这是一个历史性的猜测,我认为你看到我在上一份工作中所看到的.
安装更新时安装更新或.net框架更新并且应用程序[site]仍在使用时会出现此问题.它无法清除所需的文件,并且它不会被视为将阴影复制的缓存标记为脏的事件,因此它不会重新编译.问题是现在无法访问dll,因为[这是我不是100%确定的地方]我认为dll上的入口点发生了变化,因此dll在系统中看起来不是正确的.由于它无法找到它认为正确的东西,它会引发上述异常.如果您让系统通过触摸文件[dll或config]将应用标记为已更改,则应该足以使其重新编译卷影副本. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- 适用于Windows的可移植C/C++应用程序的DLL依赖项
- 使用工作站Windows操作系统作为用户数据库 – 是否可能?
- windows-phone-7 – 针对不同版本的Windows Phone OS
- 如何在Windows Git存储库中修复区分大小写
- windows-server-2012-r2 – Windows Server 2012 R2重新推出
- windows-server-2008-r2 – 在没有桌面体验的Windows Serve
- Qt:父/子链中有多个窗口,父对象不会关闭子窗口?
- windows-server-2008-r2 – 是否可以创建新的Windows Serve
- Office 64位中的32位dll
- windows-server-2003 – 你能找到在Windows 2003 Server上的
- windows – FileChooser选择目录,而不是文件
- win10安装ubuntu16.04双系统
- windows – Directx 11.1中D3DXCOLOR结构的新等价
- 经验丰富的Windows SysAdmin应该如何学习Linux?
- winforms – 如何在System.Windows.Forms.TextBo
- Microsoft Azure CDN是真正的CDN还是其他什么?
- Windows环境下获取当前目录下所有文件的文件名
- windows-server-2003 – 使用ASP.NET InProc会话
- 如何学习阅读Windows Server事件查看器并了解哪些
- 使用Windows AD证书服务分发根证书