I started to use itextsharp in my ASP.NET web app. On my local server, things work great. Once I load to Jodo, I get this error:
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application’s trust level in the configuration file.
Exception Details: System.Security.SecurityException: That assembly does not allow partially trusted callers.
After some quick Googling, people say to add
[assembly: AllowPartiallyTrustedCallers]
To my code, but that doesn’t seem to work.
I assume this is a security issue, is there anything that Jodo can do here, or does anyone know how to code this so I can utilize itextsharp? Thanks!
since it is open source, ou should be able to recompile it in visual studio with the AllowPartiallyTrustedCallers in the assembly info and it will work then.
I am having the same issue as the original poster. I have recompiled the assembly with the suggested attribute in the AssemblyInfo file, but I am still receiving the error. Any ideas?
This means the DLL is loaded to not support PTC, but then the web app is, if you have recompiled it and uploaded there are two possible issues:
1: Compiled cache is still loading old version, change your web.config even just push enter and make a blank line, upload new web.config it should force a recompile
2. Maybe it was another dll, as well, I have seen a few times an error moved from 1 dll to another that could not be called. fix one and the same error comes but on another assembly loaded.
I went through the process of setting up medium trust as suggested by you on this forum, but it had no affect. Still works locally, but fails remotely.
I gave up on getting it to work. I did everything support suggested, but nothing made a difference. I didn’t have anymore time to waste on it and went with a different API wrapper that didn’t require APTC.