logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Moreno <john.pl...@gmail.com>
Subject log4net is throwing TargetInvocationException
Date Mon, 17 Oct 2011 22:37:41 GMT
Hello,

log4net 1.2.10 is throwing an exception when I try to create it.

Exception has been thrown by the target of an invocation.;
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean
publicOnly, Boolean noCheck, Boolean& canBeCached,
RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
  at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly,
Boolean skipCheckThis, Boolean fillCache)
  at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly,
Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean
fillCache)
  at System.Activator.CreateInstance(Type type, Boolean nonPublic)
  at log4net.Core.DefaultRepositorySelector.CreateRepository(String
repositoryName, Type repositoryType)
  at log4net.Core.DefaultRepositorySelector.CreateRepository(Assembly
repositoryAssembly, Type repositoryType, String repositoryName,
Boolean readAssemblyAttributes)
  at log4net.Core.DefaultRepositorySelector.CreateRepository(Assembly
repositoryAssembly, Type repositoryType)
  at log4net.Core.DefaultRepositorySelector.GetRepository(Assembly
repositoryAssembly)
  at log4net.Core.LoggerManager.GetRepository(Assembly repositoryAssembly)
  at log4net.LogManager.GetRepository(Assembly repositoryAssembly)
  at log4net.Config.XmlConfigurator.Configure(XmlElement element)
  at MyAbstractClass.get_Logger();System.Reflection.TargetInvocationException:
Exception has been thrown by the target of an invocation. --->
System.TypeLoadException: Inheritance security rules violated while
overriding member:
'log4net.Util.ReadOnlyPropertiesDictionary.GetObjectData(System.Runtime.Serialization.SerializationInfo,
System.Runtime.Serialization.StreamingContext)'. Security
accessibility of the overriding method must match the security
accessibility of the method being overriden.
  at log4net.Repository.Hierarchy.Hierarchy..ctor(ILoggerFactory loggerFactory)
  at log4net.Repository.Hierarchy.Hierarchy..ctor()
  --- End of inner exception stack trace ---
  at System.RuntimeTypeHandle.CreateInstance(RuntimeType type,
Boolean publicOnly, Boolean noCheck, Boolean& canBeCached,
RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
  at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly,
Boolean skipCheckThis, Boolean fillCache)
  at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly,
Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean
fillCache)
  at System.Activator.CreateInstance(Type type, Boolean nonPublic)
  at log4net.Core.DefaultRepositorySelector.CreateRepository(String
repositoryName, Type repositoryType)
  at log4net.Core.DefaultRepositorySelector.CreateRepository(Assembly
repositoryAssembly, Type repositoryType, String repositoryName,
Boolean readAssemblyAttributes)
  at log4net.Core.DefaultRepositorySelector.CreateRepository(Assembly
repositoryAssembly, Type repositoryType)
  at log4net.Core.DefaultRepositorySelector.GetRepository(Assembly
repositoryAssembly)
  at log4net.Core.LoggerManager.GetRepository(Assembly repositoryAssembly)
  at log4net.LogManager.GetRepository(Assembly repositoryAssembly)
  at log4net.Config.XmlConfigurator.Configure(XmlElement element)
  at MyAbstractClass.get_Logger();Inheritance security rules violated
while overriding member:
'log4net.Util.ReadOnlyPropertiesDictionary.GetObjectData(System.Runtime.Serialization.SerializationInfo,
System.Runtime.Serialization.StreamingContext)'. Security
accessibility of the overriding method must match the security
accessibility of the method being overriden.;   at
log4net.Repository.Hierarchy.Hierarchy..ctor(ILoggerFactory
loggerFactory)
  at log4net.Repository.Hierarchy.Hierarchy..ctor();System.TypeLoadException:
Inheritance security rules violated while overriding member:
'log4net.Util.ReadOnlyPropertiesDictionary.GetObjectData(System.Runtime.Serialization.SerializationInfo,
System.Runtime.Serialization.StreamingContext)'. Security
accessibility of the overriding method must match the security
accessibility of the method being overriden.
  at log4net.Repository.Hierarchy.Hierarchy..ctor(ILoggerFactory loggerFactory)
  at log4net.Repository.Hierarchy.Hierarchy..ctor();

Mime
View raw message