ASP.Net / IIS permissões ou problema de configuração

1

Temos um web farm de 3 servidores executando um aplicativo ASP.Net 3.5 no IIS6, windows server 2003. Acabamos de instalar uma atualização para o aplicativo, e dois dos três servidores estavam bem, mas o terceiro imediatamente começou a ter problemas. Tentando iniciar o site, vemos essa exceção nos 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)

e a partir daí:

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)

Até agora eu tentei:

  1. Reiniciando o IIS
  2. Reiniciando o servidor
  3. Reinstalando a estrutura .net
  4. copiando EnterpriseServices.dll e EnterpriseServices.Wrapper.dll para o diretório html / bin
  5. Executando aspnet_regiis -i
    • apresenta um erro: Gerar contexto de ativação falhou para C: \ WINDOWS \ assembly \ GAC_32 \ System.Data \ 2.0.0.0__b77a5c561934e089 \ System.Data.dll. Mensagem de erro de referência: acesso negado.

Então eu estou meio preso. Alguma idéia?

    
por elRobbo 19.12.2011 / 02:31

1 resposta

1

O problema acabou sendo que as permissões no GAC de alguma forma foram quebradas. Para corrigir:

  1. cancele o registro de shfusion.dll com regsvr32 para poder acessar c:\windows\assembly
  2. redefinir permissões para que o Serviço de Rede possa acessar o GAC
  3. registre novamente shfusion.dll

Para uma boa medida, execute também aspnet_regiis.exe -ga "UserAccount" para corrigir as permissões da metabase do IIS.

    
por 21.02.2012 / 06:46