Showing posts with label trust level. Show all posts
Showing posts with label trust level. Show all posts

That assembly does not allow partially trusted callers

It's really good described in "Improving Web Application Security: Threats and Countermeasures" article. Most common solution is bit of code in web.config file, which doesn't help me a lot.

<system.web>
<trust level="Full" originUrl=""/>
</system.web>

another popular way to recompile assembly with [assembly: AllowPartiallyTrustedCallers] attribute also was not solution for me.


After all I have added assembly to GAC, restarted IIS and whooops, exception gone!
you will not find gacutil.exe into Framework directory
C:\Windows\Microsoft.NET\Framework\v2.0.50727\
it's located into SDKs directory
C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\

So you should install problem assembly into GAC like
gacutil.exe -i itextsharp.dll


P.S.: it won't eliminate exception with GoDaddy hosting :( according to the article your code must be adapted to Medium trust level :(

Asterisk AST_SORCERY function

 AST_SORCERY gets a field from a sorcery object. Sorcery is always created for PJSIP aors, endpoints and identifies in asterisk. It allows y...