I have tried running NLog in an ASP.net application and I get all sorts of security problems. Appears that it may have something to do with my hosting provider running in medium trust. Any ideas? This is the error that I get:
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.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SecurityException: That assembly does not allow partially trusted callers.]
MyAssembly.MyClass..cctor() +0