logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicko Cadell" <ni...@neoworks.com>
Subject RE: SecurityException using RemotingAppender
Date Wed, 15 Dec 2004 15:23:39 GMT
Simon,

If you are using .NET 1.1 you may have to set the typeFilterLevel to
Full. See:
http://www.gotdotnet.com/team/changeinfo/Backwards1.0to1.1/default.aspx#
00000153

Nicko

> -----Original Message-----
> From: Simon Wallis [mailto:mailing@wallis.ca] 
> Sent: 14 December 2004 15:40
> To: log4net-user@logging.apache.org
> Subject: SecurityException using RemotingAppender
> 
> Hi, I created a log4net.snk file using sn.exe, but I'm having 
> trouble in Release mode. Debug works fine, and if I use 
> AssemblyKeyFile("") in AssemblyInfo.cs instead of putting the 
> path to the .snk file in the parameters, then Release mode 
> also works fine. So I think something is messed up with my key.
> 
> I'm using the RemotingAppender. If I use something like the 
> ADONetAppender it works fine. Do I need to do something to my 
> Remote Server (the console app that receives the remote events)?
> 
> Thanks,
> Simon.
> 
> 
> [3408] log4net:ERROR [RemotingAppender] Failed in DoAppend 
> [3408] System.Runtime.Serialization.SerializationException: 
> Because of security restrictions, the type 
> log4net.spi.LoggingEvent cannot be accessed. ---> 
> System.Security.SecurityException: Request failed. 
> [3408]    at 
> System.Security.SecurityRuntime.FrameDescSetHelper(FrameSecuri
> tyDescriptor secDesc, PermissionSet demandSet, PermissionSet& 
> alteredDemandSet) 
> [3408]    at 
> System.Runtime.Serialization.FormatterServices.nativeGetSafeUn
> initializedObject(RuntimeType type) 
> [3408]    at 
> System.Runtime.Serialization.FormatterServices.GetSafeUninitia
> lizedObject(Type type) 
> [3408]    --- End of inner exception stack trace --- 
> [3408]
> [3408] Server stack trace: 
> [3408]    at 
> System.Runtime.Serialization.FormatterServices.GetSafeUninitia
> lizedObject(Type type) 
> [3408]    at 
> System.Runtime.Serialization.Formatters.Binary.ObjectReader.Pa
> rseObject(ParseRecord pr) 
> [3408]    at 
> System.Runtime.Serialization.Formatters.Binary.ObjectReader.Pa
> rse(ParseRecord pr) 
> [3408]    at 
> System.Runtime.Serialization.Formatters.Binary.__BinaryParser.
> ReadObjectWithMapTyped(BinaryObjectWithMapTyped record) 
> [3408]    at 
> System.Runtime.Serialization.Formatters.Binary.__BinaryParser.
> ReadObjectWithMapTyped(BinaryHeaderEnum binaryHeaderEnum) 
> [3408]    at 
> System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run() 
> [3408]    at 
> System.Runtime.Serialization.Formatters.Binary.ObjectReader.De
> serialize(HeaderHandler handler, __BinaryParser serParser, 
> Boolean fCheck, IMethodCallMessage methodCallMessage) 
> [3408]    at 
> System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
> .Deserialize(Stream serializationStream, HeaderHandler 
> handler, Boolean fCheck, IMethodCallMessage methodCallMessage) 
> [3408]    at 
> System.Runtime.Remoting.Channels.CoreChannel.DeserializeBinary
> RequestMessage(String objectUri, Stream inputStream, Boolean 
> bStrictBinding, TypeFilterLevel securityLevel) 
> [3408]    at 
> System.Runtime.Remoting.Channels.BinaryServerFormatterSink.Pro
> cessMessage(IServerChannelSinkStack sinkStack, IMessage 
> requestMsg, ITransportHeaders requestHeaders, Stream 
> requestStream, IMessage& responseMsg, ITransportHeaders& 
> responseHeaders, Stream& responseStream)
> [3408]
> [3408] Exception rethrown at [0]: 
> [3408]    at 
> System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(
> IMessage reqMsg, IMessage retMsg) 
> [3408]    at 
> System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(Messag
> eData& msgData, Int32 type) 
> [3408]    at 
> log4net.Appender.IRemoteLoggingSink.LogEvents(LoggingEvent[] events) 
> [3408]    at 
> log4net.Appender.RemotingAppender.SendBuffer(LoggingEvent[] events) 
> [3408]    at 
> log4net.Appender.BufferingAppenderSkeleton.Append(LoggingEvent
>  loggingEvent) 
> [3408]    at 
> log4net.Appender.AppenderSkeleton.DoAppend(LoggingEvent loggingEvent) 
> 
> 

Mime
View raw message