I've been trying to solve this problem for days, to no avail. I saw that many people have solved this problem by compiling the itextSharp dll by adding the [assembly: System.Security.AllowPartiallyTrustedCallers] line in the assemblyinfo.cs file, as explained in this link: #
But I did this and still can not make it work on the server. The error "System.Security.SecurityException: That assembly does not allow partially trusted callers" still remains.
My site is hosted on locaweb, and I contacted them and the only thing they told me was that either my dll or my project was in Full Trust and their servers run on Medium Trust.
Has anyone gone through this would know how to solve?