I'm trying to access a strong-named assembly (NLog) from my asp application but get the security exception (System.Security.SecurityException: That assembly does not allow partially trusted callers.)
This is because the trust level is set to medium on Jodo's web server (which is normal for hosted servers) and strong-named assemblies only allow calls from fully trusted assemblies, as I understand it.
As the assembly I want to use is a 3rd party one, I can't set the AllowPartiallyTrustedCallersAttribute attribute which would solve the problem.
According to this article:
Wiki on technologies | Tutorials / How to call strong-named assemblies from medium trust code
it is possible to get create a wrapper the is strong-named and has the AllowPartiallyTrustedCallersAttribute attribute set. The wrapper would then call the 3rd party assembly. This does not seem to work as I get the same security exception from inside the wrapper.
Any ideas, anyone?
This is because the trust level is set to medium on Jodo's web server (which is normal for hosted servers) and strong-named assemblies only allow calls from fully trusted assemblies, as I understand it.
As the assembly I want to use is a 3rd party one, I can't set the AllowPartiallyTrustedCallersAttribute attribute which would solve the problem.
According to this article:
Wiki on technologies | Tutorials / How to call strong-named assemblies from medium trust code
it is possible to get create a wrapper the is strong-named and has the AllowPartiallyTrustedCallersAttribute attribute set. The wrapper would then call the 3rd party assembly. This does not seem to work as I get the same security exception from inside the wrapper.
Any ideas, anyone?