Description
SecurityException thrown in LogicalThreadContextProperties GetProperties
The LogicalThreadContext stores its properties in the CallContext. The CallContext methods GetData ans SetData have a LinkDemand for the SecurityPermissionFlag.Infrastructure. If the calling code does not have this permission a SecurityException is generated when the LogicalThreadContextProperties.GetProperties method is JITed. The calling code does not have this psermission if it is in the Medium trust zone.
The exception causes the LoggingEvent to fail to compose its properties, and therefore log4net fails to log any events. The exception is eventualy caught and does not leak into the calling application.