Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AllowPartiallyTrustedCallers

I was creating a new sharepoint webpart in VS2010. After publishing the webpart and trying to access it. i was getting following error. That assembly does not allow partially trusted callers. after adding the following assembly level attribute the issue is rectified. [assembly: AllowPartiallyTrustedCallers()] I coudn't get the significance of the attribute. Can anyone explain about the attribute.

like image 826
Vijay Avatar asked Jan 23 '26 09:01

Vijay


1 Answers

The .NET framework prevents assemblies running in partial trust to call assemblies with full trust in order to prevent luring attacks. The AllowPartiallyTrustedCallers attribute indicates that you wish to override this security check for the given assembly.

A more detailed description can be found here:

http://blogs.msdn.com/b/shawnfa/archive/2005/02/04/367390.aspx

like image 98
Rob Windsor Avatar answered Jan 25 '26 15:01

Rob Windsor