SPC100201: Add attribute 'AllowPartiallyTrustedCallers'

Code in the sandboxed worker process can call only assemblies that have the AllowPartiallyTrustedCallersAttribute.

TypeName: AddAllowPartiallyTrustedCallersAttribute
CheckId: SPC100201
Severity: Error
Type: AssemblyFileReference
Resolution

Add an attribute of type 'System.Security.AllowPartiallyTrustedCallersAttribute' to the assembly.

Add the following code to the Assembly.cs

[assembly: AssemblyVersion("1.0.0.0")]

// The AllowPartiallyTrustedCallersAttribute requires the assembly to be signed with a strong name key.
[assembly:AllowPartiallyTrustedCallers]

Links

comments powered by Disqus