Thursday, November 5, 2009

Loading this assembly would produce a different grant set from other instances

Scenario
  • An assembly (dll) is installed in both the GAC (global assembly cache) and in the App_Bin folder
Issue
  • When browsing to the site you receive the following error:
    • Loading this assembly would produce a different grant set from other instances
Resolution
  • Remove the App_Bin dll


2 comments:

  1. Thanks for the post. Can you try to elaborate the scenario where this exception occurs for the applications that are already running with same assemblies please.

    ReplyDelete
  2. This occured due to installing a custom feature with the dll in both locations. This same error also occured for a different reason after restoring a site collection from one web app to another in the same site collection. In the second case a simple IISReset fixed the issue.

    ReplyDelete