ALL SYSTEMS OPERATIONALUPTIME 99.97%FLEET 18/18IN-MUM · US-LAX · EU-FSN EST. 2003 · +91 11 4998 4038

KNOWLEDGEBASE · ASP.NET

That assembly does not allow partially trusted callers

Last updated 2019-02-05


When deploying ASP.NET 2.0 Web applications to Indichosts.net Hosting
environmment you may run into the following error:

SecurityException: That assembly does not allow partially trusted callers.

Your application is unable to call strong named assemblies that are not
annotated with AllowPartiallyTrustedCallersAttribute (APTCA). Without
APTCA, strong named assemblies issue a demand for full trust, which will
fail when the demand reaches your partial-trust Web application. In Indichosts.net,
ASP.NET 2.0 applications are configured to run in a custom
trust level based on the Medium Trust Level.

To solve this issue mark your assemblies with the attribute
AllowPartiallyTrustedCallersAttribute, the attribute should be declared
at the assembly level (usually declared at Assemblyinfo.cs or
Assemblyinfo.vb).

An example of the declaration in C# is :

[assembly:AllowPartiallyTrustedCallers]

and in Visual Basic is :

<assembly:AllowPartiallyTrustedCallers>

← All knowledgebase articles

Tell us what has to stay up.

A short conversation with an engineer. No quote-bot, no callback queue. We'll tell you honestly if we're not the right fit.