Microsoft Knowledge Base Email Alertz

(822526) - 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...

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 822526 - Last Review: January 30, 2007 - Revision: 2.2

"Assembly <AssemblyName> Security Permission Grant Set Is Incompatible Between App Domains" Error Message Occurs with Strong-Named Assemblies

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 AssemblyName 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 "References" section of this article.

STATUS

This behavior is by design.

REFERENCES

For more information about trust levels and Code Access Security (CAS) in Windows SharePoint Services, and strong-named assemblies in ASP.NET Web programs, visit the following Microsoft Web sites:
http://msdn2.microsoft.com/en-us/library/ms916848.aspx (http://msdn2.microsoft.com/en-us/library/ms916848.aspx)
http://msdn2.microsoft.com/en-us/library/930b76w0.aspx (http://msdn2.microsoft.com/en-us/library/930b76w0.aspx)
For additional information about this topic, click the following article numbers to view the articles in the Microsoft Knowledge Base:
302340  (http://kbalertz.com/Feedback.aspx?kbNumber=302340/ ) How To: Create an Assembly with a Strong Name in .NET Framework SDK
815808  (http://kbalertz.com/Feedback.aspx?kbNumber=815808/ ) How To: Install an Assembly into the Global Assembly Cache in Visual C# .NET
813833  (http://kbalertz.com/Feedback.aspx?kbNumber=813833/ ) PRB: "Access Denied" Error Messages When You Do Not Put Strong-Named Assemblies in the Global Assembly Cache

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  (http://kbalertz.com/Feedback.aspx?kbNumber=202013/ ) Internet Information Services 5.0 Command-Line Syntax for Iisreset.exe

APPLIES TO
  • Microsoft Windows SharePoint Services 2.0
  • Microsoft Office SharePoint Portal Server 2003
Keywords: 
kbinfo KB822526
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate