1

We have a 3 server web farm running an ASP.Net 3.5 application on IIS6, windows server 2003. We just installed an update to the application, and two of the three servers were fine but the third immediately started having problems. Trying to start the web site we see this exception in the logs:

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)

and from then on:

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)

So far I have tried:

  1. Restarting IIS
  2. Rebooting the server
  3. Reinstalling the .net framework
  4. copying EnterpriseServices.dll and EnterpriseServices.Wrapper.dll to the html/bin directory
  5. Running aspnet_regiis -i
    • gives an error: Generate Activation Context failed for C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll. Reference error message: Access is denied.

So I'm kind of stuck. Any ideas?

1

The problem ended up being that the permissions in the GAC somehow were broken. To fix:

  1. unregister shfusion.dll with regsvr32 so you can access c:\windows\assembly
  2. reset permissions so Network Service can access the GAC
  3. re-register shfusion.dll

For good measure, also run aspnet_regiis.exe -ga "UserAccount" to fix IIS metabase permissions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.