Microsoft KB Archive/822526

= &quot;Assembly  Security Permission Grant Set Is Incompatible Between App Domains&quot; Error Message Occurs with Strong-Named Assemblies =

Article ID: 822526

Article Last Modified on 1/30/2007

-

APPLIES TO


 * Microsoft Windows SharePoint Services
 * Microsoft Office SharePoint Portal Server 2003

-



SYMPTOMS
If you have a strong-named assembly (for example an ASP.NET Web Part) that is used by your Microsoft Windows SharePoint Services (WSS) or Microsoft SharePoint Portal Server (SPS) site, you may receive the following error message after you change the trust level in the Web.config file:

Assembly  security permission grant set is incompatible between app domains



CAUSE
In ASP.NET programs, strong-named assemblies are loaded in a neutral domain. These assemblies are not unloaded until the process is stopped. Therefore, if the security policy for a strong-named assembly is altered, the common language runtime will cause an error message to appear when it detects that differing grant sets have been applied to the same assembly. This behavior typically occurs in scenarios where the trust level for a strongly-named assembly has been changed. For example, this behavior may occur if you set the trust level in the site's Web.config file to Full without using the IISRESET command. By default, the trust level in the site's Web.config file is set to WSS_Minimal.



RESOLUTION
To resolve this behavior in Windows SharePoint Services (WSS) or SharePoint Portal Server (SPS) programs do one of the following:
 * Type iisreset at the command prompt, and then press ENTER.

-or-
 * Manually recycle the site's associated application pool in the Internet Services Manager for IIS. To do this, in IIS Manager, expand the local computer, expand Application Pools, right-click the application pool, and then click Recycle.

Note This article describes scenarios that are related to Windows SharePoint Services and SharePoint Portal Server but the core issue revolves around how strong-named assemblies are loaded in a neutral AppDomain in ASP.NET. For more information, see the &quot;References&quot; section of this article.



STATUS
This behavior is by design.



MORE INFORMATION
For additional information about how to use the IISRESET command, click the following article number to view the article in the Microsoft Knowledge Base:

202013 Internet Information Services 5.0 Command-Line Syntax for Iisreset.exe

Keywords: kbinfo KB822526

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.