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"
or
trust level="WSS_Minimal" to trust level="Full"
Happy coding !!
"Sharepoint development "
ReplyDeleteA very informative item. Hold posting such kind of information on your blog.
Web Solution
Thanks alot, exactly what I was looking for. Also you can do RunwithelevatedPriveleges in codebehind for bypassing this security issue.
ReplyDeleteI was getting the same error, changed the trust level from WSS_Medium and to Full but still the issue persists.
ReplyDelete