logging-log4net-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joseph Piron (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4NET-548) Dependency missmatch .net 4.0 and 4.5 for System.Security.Claims.ClaimsIdentity
Date Thu, 19 Jan 2017 18:26:26 GMT

    [ https://issues.apache.org/jira/browse/LOG4NET-548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15830369#comment-15830369
] 

Joseph Piron commented on LOG4NET-548:
--------------------------------------

Resorting to Environment.Username in the Username getter of LoggingEvent seems to be ok, I'll
create a PR.

> Dependency missmatch .net 4.0 and 4.5 for System.Security.Claims.ClaimsIdentity
> -------------------------------------------------------------------------------
>
>                 Key: LOG4NET-548
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-548
>             Project: Log4net
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.7
>         Environment: Windows XP
>            Reporter: Joseph Piron
>              Labels: claim, identity, xp
>
> I have a problem with a project using version 2.0.7 (from Nuget) compiled on a machine
running windows 7 with VS2015 and .net 4.5,  targeting framework 4.0 to get it to run on a
windows xp machine:
> I cannot use a {{RemoteSystlogAppender}} and when log4net debug is activated, I get this
in the log:
> {noformat}
> log4net:ERROR [RemoteSyslogAppender] ErrorCode: WriteFailure. Unable to send logging
event to remote syslog 172.27.48.80
>  on port 514.
> System.TypeLoadException: Could not load type 'System.Security.Claims.ClaimsIdentity'
from assembly 'mscorlib, Version=4
> .0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
>    at log4net.Core.LoggingEvent.get_UserName()
>    at log4net.Core.LoggingEvent.CreateCompositeProperties()
>    at log4net.Core.LoggingEvent.LookupProperty(String key)
>    at log4net.Layout.Pattern.PropertyPatternConverter.Convert(TextWriter writer, LoggingEvent
loggingEvent)
>    at log4net.Layout.Pattern.PatternLayoutConverter.Convert(TextWriter writer, Object
state)
>    at log4net.Util.PatternConverter.Format(TextWriter writer, Object state)
>    at log4net.Layout.PatternLayout.Format(TextWriter writer, LoggingEvent loggingEvent)
>    at log4net.Layout.LayoutSkeleton.Format(LoggingEvent loggingEvent)
>    at log4net.Appender.RemoteSyslogAppender.Append(LoggingEvent loggingEvent).
> {noformat}
> After some googling, seems related to: 
> [http://stackoverflow.com/questions/13748055/could-not-load-type-system-runtime-compilerservices-extensionattribute-from-as]
> Is log4net merged using ILMerge ? Could this be the cause ?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message