|NLog Extensions and MethodAccessException||Colin Bowern||2/28/12 5:09 PM|
Working with a WCF Service Application I'm getting the following
exception being thrown:
System.MethodAccessException: Attempt by security transparent method
to access security critical method
Assembly 'Ninject.Extensions.Logging.NLog2, Version=22.214.171.124,
Culture=neutral, PublicKeyToken=c7192dc5380945e7' is marked with the
AllowPartiallyTrustedCallersAttribute, and uses the level 2 security
transparency model. Level 2 transparency causes all methods in
AllowPartiallyTrustedCallers assemblies to become security transparent
by default, which may be the cause of this exception.
I've marked the WCF service application assembly with
AllowPartiallyTrustedCallers but that hasn't helped. Any thoughts?