none
Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401)

    Question

  • When install application ApplicationInsightsStatusMonitor and enable it all iis site got :

    Server Error in '/' Application.

    Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401)

    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.FileLoadException: Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401)

    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.

    Stack Trace: 
    [FileLoadException: Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401)]
       System.Web.Hosting.HostingEnvironment.InitializeObjectCacheHostPrivate() +0
       System.Web.Hosting.HostingEnvironment.InitializeObjectCacheHost() +39
       System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException) +163
    
    [HttpException (0x80004005): Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401)]
       System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +579
       System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +118
       System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +726
    


    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1069.1
    Tuesday, January 17, 2017 10:04 PM

Answers

All replies

  • Hi, do you have Microsoft Monitoring Agent (SCOM or OMS suite) installed on that box?
    Thursday, January 19, 2017 12:50 AM
    Moderator
  • Did any find a root cause and solution for this.  Please any help is really appreciated. 
    Friday, January 25, 2019 5:48 AM
  • Hi anjaneya_r,

    Thanks for reaching out to us! I was able to install Status Monitor on my Azure Windows VM and configure it with Azure Application Insights as detailed in this document. I was also able to see telemetry from my server on Azure Portal. The above reported error doesn't seem to be coming with the latest version of Application Insights Status Monitor.

    To help us troubleshoot your issue further, please create a new thread here and elaborate your setup and error details so we can assist you better!

    Thursday, January 31, 2019 9:01 PM
    Moderator