代码之家  ›  专栏  ›  技术社区  ›  Baahubali

无法加载文件或程序集“Microsoft”。企业管理。OperationsManager。Apm。数据收集。生产商。Mvc。4

  •  1
  • Baahubali  · 技术社区  · 7 年前

    我们运行的是Windows Server 2008 R2,并升级到2016年,自那时起,我们的应用程序已停止运行。ASP。NET Web窗体仍在运行,似乎只有MVC停止运行。

    他们都遇到了HTTP 503错误,在重新绘制IIS URL重写模块2后,他们开始抛出以下错误:

    “/邮件”应用程序中出现服务器错误。

    Could not load file or assembly 'Microsoft.EnterpriseManagement.OperationsManager.Apm.DataCollecting.Producers.Mvc.4.0, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. 
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
    
    Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.EnterpriseManagement.OperationsManager.Apm.DataCollecting.Producers.Mvc.4.0, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
    
    Source Error: 
    
    
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  
    
    Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.EnterpriseManagement.OperationsManager.Apm.DataCollecting.Producers.Mvc.4.0, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.
    
    
    
    WRN: Assembly binding logging is turned OFF.
    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
    Note: There is some performance penalty associated with assembly bind failure logging.
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
    
    
    
    Stack Trace: 
    
    
    
    [FileNotFoundException: Could not load file or assembly 'Microsoft.EnterpriseManagement.OperationsManager.Apm.DataCollecting.Producers.Mvc.4.0, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.]
    System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName) +0
    System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory) +194
    System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +80
    System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state) +70
    

    System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +18

    System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +444 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +157

    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.2106.0

    1 回复  |  直到 7 年前
        1
  •  3
  •   Baahubali    7 年前

    我通过做两件事设法解决了这个问题:

    1. 修复IIS URL重写模块

    2. 正在卸载Microsoft Monitoring Agent,该Agent包含MVC应用程序抱怨的程序集。

    推荐文章