Issue Loading Assembly Error

  • Updated

Issue

  • A page containing certain ASP.NET controls, such as the legacy ASP.NET ReportViewer control, throws an unhandled exception when the .NET agent is running:

    > Loading this assembly would produce a different grant
    set from other instances
  • The application's web.config file specifies <trust legacyCasModel="true".

Cause

You can't use the Contrast .NET agent with applications using the legacyCasModel="true" setting.

Resolution

 Use one of the following strategies to resolve this issue:

  • Set legacyCasModel="false". The ReportViewer control's performance will suffer but will still work.

  • Use the app_pool_denylist setting to configure the .NET agent to not analyze the application pool containing the application with the ReportViewer control. 

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request