My SharePoint Blog

Blogs On SharePoint Technologies


Search Site


My SharePoint Blog recommends any of the following books...


Recent comments

Tags

None

    Categories


    Disclaimer

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

    © Copyright 2010

    SharePoint issues with AllowPartiallyTrustedCallers

    PROBLEM: If you are trying to deploy a webpart from a Visual Studio solution and get this error... 

    Unable to add selected web part(s).

    Assemblies that implement ASP.NET Web Parts and are installed into a partially trusted location, such as the bin directory, must be compiled with the AllowPartiallyTrustedCallers set for import to succeed.

     

    FIX: Add the following to your AssemblyInfo.cs and recompile.

    using System.Runtime.InteropServices; 

    [assembly: AllowPartiallyTrustedCallers] 

     


    Posted by Kevin on Thursday, March 13, 2008 3:18 PM
    Permalink | Comments (1) | Post RSSRSS comment feed