logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Wallis" <mail...@wallis.ca>
Subject SecurityException using RemotingAppender
Date Tue, 14 Dec 2004 15:40:30 GMT
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(FrameSecurityDescriptor secDesc,
PermissionSet demandSet, PermissionSet& alteredDemandSet) 
[3408]    at System.Runtime.Serialization.FormatterServices.nativeGetSafeUninitializedObject(RuntimeType
type) 
[3408]    at System.Runtime.Serialization.FormatterServices.GetSafeUninitializedObject(Type
type) 
[3408]    --- End of inner exception stack trace --- 
[3408] 
[3408] Server stack trace: 
[3408]    at System.Runtime.Serialization.FormatterServices.GetSafeUninitializedObject(Type
type) 
[3408]    at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ParseObject(ParseRecord
pr) 
[3408]    at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Parse(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.Deserialize(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.DeserializeBinaryRequestMessage(String
objectUri, Stream inputStream, Boolean bStrictBinding, TypeFilterLevel securityLevel) 
[3408]    at System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage(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(MessageData& 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