Monday, October 29, 2012

Request for the permission of type 'Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c' failed

This is the one of the strange errors when working with sharepoint.

Cause for he error :

This is because sharepoint by default is provided with the minimal trust permission level.

For some operations we need trust from the security policy.

Solution :

This requires change in the Trust Level in Web.Config file of the Web app.

Go to web.config file of the web application usually this will be located in

C:\inetpub\wwwroot\wss\VirtualDirectories\[Web application directory]

and open the web.config and change the

trust level="WSS_Minimal" to trust level="WSS_Medium"


trust level="WSS_Minimal" to trust level="Full"

Happy coding !!


  1. "Sharepoint development "
    A very informative item. Hold posting such kind of information on your blog.
    Web Solution

  2. Thanks a lot bro, this solve my issue after scratching my hair a whole day...

  3. Thanks alot, exactly what I was looking for. Also you can do RunwithelevatedPriveleges in codebehind for bypassing this security issue.

  4. I was getting the same error, changed the trust level from WSS_Medium and to Full but still the issue persists.