ASP.Net / IIS权限或configuration问题

我们有一个3服务器Web场在IIS6,Windows Server 2003上运行ASP.Net 3.5应用程序。我们刚安装了应用程序的更新,三台服务器中的两台都很好,但是第三台服务器立即开始出现问题。 试图启动网站,我们在日志中看到这个exception:

System.IO.FileLoadException: Could not load file or assembly 'System.EnterpriseServices.Wrapper.dll' or one of its dependencies. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1) File name: 'System.EnterpriseServices.Wrapper.dll' ---> System.Runtime.InteropServices.COMException (0x800736B1): This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1) at System.Reflection.Assembly._nGetModules(Boolean loadIfNotFound, Boolean getResourceModules) at System.Reflection.Assembly.nGetModules(Boolean loadIfNotFound, Boolean getResourceModules) at System.Reflection.Assembly.GetTypes() at System.Web.Mvc.ControllerTypeCache.GetAllControllerTypes(IBuildManager buildManager) at System.Web.Mvc.ControllerTypeCache.EnsureInitialized(IBuildManager buildManager) at System.Web.Mvc.DefaultControllerFactory.GetControllerTypeWithinNamespaces(String controllerName, HashSet`1 namespaces) at System.Web.Mvc.DefaultControllerFactory.GetControllerType(String controllerName) at System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName) at System.Web.Mvc.MvcHandler.ProcessRequest(HttpContextBase httpContext) at System.Web.Mvc.MvcHandler.ProcessRequest(HttpContext httpContext) at System.Web.Mvc.MvcHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext httpContext) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) 

从那时起:

 System.Runtime.InteropServices.COMException (0x800736B1): This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1) at System.Reflection.Assembly._nGetModules(Boolean loadIfNotFound, Boolean getResourceModules) at System.Reflection.Assembly.nGetModules(Boolean loadIfNotFound, Boolean getResourceModules) at System.Reflection.Assembly.GetTypes() at System.Web.Mvc.ControllerTypeCache.GetAllControllerTypes(IBuildManager buildManager) at System.Web.Mvc.ControllerTypeCache.EnsureInitialized(IBuildManager buildManager) at System.Web.Mvc.DefaultControllerFactory.GetControllerTypeWithinNamespaces(String controllerName, HashSet`1 namespaces) at System.Web.Mvc.DefaultControllerFactory.GetControllerType(String controllerName) at System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName) at System.Web.Mvc.MvcHandler.ProcessRequest(HttpContextBase httpContext) at System.Web.Mvc.MvcHandler.ProcessRequest(HttpContext httpContext) at System.Web.Mvc.MvcHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext httpContext) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) 

到目前为止我已经尝试过:

  1. 重新启动IIS
  2. 重新启动服务器
  3. 重新安装.net框架
  4. 将EnterpriseServices.dll和EnterpriseServices.Wrapper.dll复制到html / bin目录
  5. 运行aspnet_regiis -i
    • 提供了一个错误:生成激活上下文C:\ WINDOWS \ assembly \ GAC_32 \ System.Data \ 2.0.0.0__b77a5c561934e089 \ System.Data.dll失败。 引用错误消息:访问被拒绝。

所以我有点卡住了 有任何想法吗?

问题最终导致GAC中的权限被破坏了。 修理:

  1. 使用regsvr32注销shfusion.dll ,以便可以访问c:\windows\assembly
  2. 重置权限,以便networking服务可以访问GAC
  3. 重新注册shfusion.dll

为了更好的衡量,还可以运行aspnet_regiis.exe -ga "UserAccount"修复IISconfiguration数据库的权限。