I am battling this same error. The galleries work fine on localhost, but after it is published to the shared site on 1and1, I get this exception.
Exception Details: System.Security.SecurityException: That assembly does not allow partially trusted callers.
To generate the error:
http://www.hcssd.org/HCS/Gallery/Default.aspx