Re: Log4Net v2.0.8 - SMTP appender not relaying emails on Windows Server 2003

2017-11-14 Thread Mohkam Singh Sawhney
Unfortunately even I will not be able to confirm this, as I am working on a 
machine which has .net 4.5.



  From: Dominik Psenner 
 To: Mohkam Singh Sawhney  
Cc: Log4NET User 
 Sent: Tuesday, November 14, 2017 1:24 PM
 Subject: Re: Log4Net v2.0.8 - SMTP appender not relaying emails on Windows 
Server 2003
   
log4net should not even compile if it referenced classes that do not exist in a 
targetted framework. Note that this might be related to 
https://issues.apache.org/jira/browse/LOG4NET-548 too. This could be a symptom 
of the fact that net 4.5 is a in place replacement of net 4.0. You should be 
able to confirm this if you tried to compile log4net on a machine that has only 
net 4.0 installed. Unfortunately i have no possibility to evaluate this because 
I have no operating system to evaluate this on.
On 13 Nov 2017 5:58 p.m., "Mohkam Singh Sawhney"  wrote:

Hi Dominik,
I reviewed the accepted answer on the link that you shared.
Our application is a console application that was compiled against .net 
framework 4. We are using the framework 4.0 version of the log4net dll.  
Windows server 2003 does not support .net framework 4.5. 
ClaimsIdentity Class was introduced in framework 4.5. 
(https://msdn.microsoft.com/ en-us/library/system.security. 
claims.claimsidentity.aspx). Why is the log4net dll referencing this class?



Thanks and Regards
Mohkam Singh
  From: Dominik Psenner 
 To: Log4NET User ; Mohkam Singh Sawhney 
 
 Sent: Monday, November 13, 2017 12:16 AM
 Subject: Re: Log4Net v2.0.8 - SMTP appender not relaying emails on Windows 
Server 2003
   
Googling yields this:
https://social.msdn.microsoft. com/Forums/en-US/378905e5- 
297b-4235-a170-f519d77f02b9/ iis7-web-app-error-could-not- load-type- 
systemsecurityclaimsclaimsiden tity-from-assembly?forum= csharpgeneral
On 12 Nov 2017 11:36 a.m., "Mohkam Singh Sawhney"  wrote:

We were using Log4Net v1.2.13.0 with an application that targets .net framework 
4 on windows server 2003, Below is the SmptAppender configuration (hiding our 
production values with ). We were able to receive email on 'FATAL' log 
entry.
          
                                    
               
                 
We recently updated our application to use Log4Net v2.0.8, with the same 
configuration for SmptAppender . After this update, we stopped receiving 
emails. On enabling the internal log4Net logging, the below error was logged.
log4net: Created Appender [SmtpAppender]log4net: Adding appender named 
[SmtpAppender] to logger [root].log4net: Hierarchy Threshold []log4net:ERROR 
[SmtpAppender] ErrorCode: GenericFailure. Failed in 
DoAppendSystem.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. FixVolatileData(FixFlags flags) in 
c:\log4net\tags\2.0.8RC1\src\ Core\LoggingEvent.cs:line 1341   at 
log4net.Appender. BufferingAppenderSkeleton. Append(LoggingEvent loggingEvent) 
in c:\log4net\tags\2.0.8RC1\src\ Appender\ BufferingAppenderSkeleton.cs: line 
483   at log4net.Appender. AppenderSkeleton.DoAppend( LoggingEvent 
loggingEvent) in c:\log4net\tags\2.0.8RC1\src\ Appender\AppenderSkeleton.cs: 
line 317log4net: Shutdown called on Hierarchy [log4net-default-repository]
If we revert back to Log4Net v1.2.13.0, we start receiving emails as expected. 
Please advise how can we resolve the issue with version 2.0.8.

Thanks and Regards
Mohkam Singh



   



   

Re: Log4Net v2.0.8 - SMTP appender not relaying emails on Windows Server 2003

2017-11-14 Thread Dominik Psenner
log4net should not even compile if it referenced classes that do not exist
in a targetted framework. Note that this might be related to
https://issues.apache.org/jira/browse/LOG4NET-548 too. This could be a
symptom of the fact that net 4.5 is a in place replacement of net 4.0. You
should be able to confirm this if you tried to compile log4net on a machine
that has only net 4.0 installed. Unfortunately i have no possibility to
evaluate this because I have no operating system to evaluate this on.

On 13 Nov 2017 5:58 p.m., "Mohkam Singh Sawhney"  wrote:

Hi Dominik,

I reviewed the accepted answer on the link that you shared.

Our application is a console application that was compiled against .net
framework 4. We are using the framework 4.0 version of the log4net
dll.  Windows
server 2003 does not support .net framework 4.5.

ClaimsIdentity Class was introduced in framework 4.5. (
https://msdn.microsoft.com/en-us/library/system.security.
claims.claimsidentity.aspx). Why is the log4net dll referencing this class?

[image: Inline image]


Thanks and Regards

Mohkam Singh

--
*From:* Dominik Psenner 
*To:* Log4NET User ; Mohkam Singh Sawhney <
[email protected]>
*Sent:* Monday, November 13, 2017 12:16 AM
*Subject:* Re: Log4Net v2.0.8 - SMTP appender not relaying emails on
Windows Server 2003

Googling yields this:

https://social.msdn.microsoft.com/Forums/en-US/378905e5-
297b-4235-a170-f519d77f02b9/iis7-web-app-error-could-not-load-type-
systemsecurityclaimsclaimsidentity-from-assembly?forum=csharpgeneral

On 12 Nov 2017 11:36 a.m., "Mohkam Singh Sawhney" 
wrote:

We were using Log4Net v1.2.13.0 with an application that targets .net
framework 4 on windows server 2003, Below is the SmptAppender configuration
(hiding our production values with ). We were able to receive email on
'FATAL' log entry.


  
  
  
  
  
  
  

  

  


We recently updated our application to use Log4Net v2.0.8, with the same
configuration for SmptAppender . After this update, we stopped receiving
emails. On enabling the internal log4Net logging, the below error was
logged.

log4net: Created Appender [SmtpAppender]
log4net: Adding appender named [SmtpAppender] to logger [root].
log4net: Hierarchy Threshold []
log4net:ERROR [SmtpAppender] ErrorCode: GenericFailure. Failed in DoAppend
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. FixVolatileData(FixFlags flags) in
c:\log4net\tags\2.0.8RC1\src\ Core\LoggingEvent.cs:line 1341
   at log4net.Appender. BufferingAppenderSkeleton. Append(LoggingEvent
loggingEvent) in c:\log4net\tags\2.0.8RC1\src\ Appender\
BufferingAppenderSkeleton.cs: line 483
   at log4net.Appender. AppenderSkeleton.DoAppend( LoggingEvent
loggingEvent) in c:\log4net\tags\2.0.8RC1\src\
Appender\AppenderSkeleton.cs: line 317
log4net: Shutdown called on Hierarchy [log4net-default-repository]

If we revert back to Log4Net v1.2.13.0, we start receiving emails as
expected. Please advise how can we resolve the issue with version 2.0.8.


Thanks and Regards

Mohkam Singh


Re: Log4Net v2.0.8 - SMTP appender not relaying emails on Windows Server 2003

2017-11-13 Thread Mohkam Singh Sawhney
Hi Dominik,
I reviewed the accepted answer on the link that you shared.
Our application is a console application that was compiled against .net 
framework 4. We are using the framework 4.0 version of the log4net dll.  
Windows server 2003 does not support .net framework 4.5. 
ClaimsIdentity Class was introduced in framework 4.5. 
(https://msdn.microsoft.com/en-us/library/system.security.claims.claimsidentity.aspx).
 Why is the log4net dll referencing this class?



Thanks and Regards
Mohkam Singh
  From: Dominik Psenner 
 To: Log4NET User ; Mohkam Singh Sawhney 
 
 Sent: Monday, November 13, 2017 12:16 AM
 Subject: Re: Log4Net v2.0.8 - SMTP appender not relaying emails on Windows 
Server 2003
   
Googling yields this:
https://social.msdn.microsoft.com/Forums/en-US/378905e5-297b-4235-a170-f519d77f02b9/iis7-web-app-error-could-not-load-type-systemsecurityclaimsclaimsidentity-from-assembly?forum=csharpgeneral
On 12 Nov 2017 11:36 a.m., "Mohkam Singh Sawhney"  wrote:

We were using Log4Net v1.2.13.0 with an application that targets .net framework 
4 on windows server 2003, Below is the SmptAppender configuration (hiding our 
production values with ). We were able to receive email on 'FATAL' log 
entry.
          
                                    
               
                 
We recently updated our application to use Log4Net v2.0.8, with the same 
configuration for SmptAppender . After this update, we stopped receiving 
emails. On enabling the internal log4Net logging, the below error was logged.
log4net: Created Appender [SmtpAppender]log4net: Adding appender named 
[SmtpAppender] to logger [root].log4net: Hierarchy Threshold []log4net:ERROR 
[SmtpAppender] ErrorCode: GenericFailure. Failed in 
DoAppendSystem.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. FixVolatileData(FixFlags flags) in 
c:\log4net\tags\2.0.8RC1\src\ Core\LoggingEvent.cs:line 1341   at 
log4net.Appender. BufferingAppenderSkeleton. Append(LoggingEvent loggingEvent) 
in c:\log4net\tags\2.0.8RC1\src\ Appender\ BufferingAppenderSkeleton.cs: line 
483   at log4net.Appender. AppenderSkeleton.DoAppend( LoggingEvent 
loggingEvent) in c:\log4net\tags\2.0.8RC1\src\ Appender\AppenderSkeleton.cs: 
line 317log4net: Shutdown called on Hierarchy [log4net-default-repository]
If we revert back to Log4Net v1.2.13.0, we start receiving emails as expected. 
Please advise how can we resolve the issue with version 2.0.8.

Thanks and Regards
Mohkam Singh



   

Re: Log4Net v2.0.8 - SMTP appender not relaying emails on Windows Server 2003

2017-11-12 Thread Dominik Psenner
Googling yields this:

https://social.msdn.microsoft.com/Forums/en-US/378905e5-297b-4235-a170-f519d77f02b9/iis7-web-app-error-could-not-load-type-systemsecurityclaimsclaimsidentity-from-assembly?forum=csharpgeneral

On 12 Nov 2017 11:36 a.m., "Mohkam Singh Sawhney" 
wrote:

> We were using Log4Net v1.2.13.0 with an application that targets .net
> framework 4 on windows server 2003, Below is the SmptAppender configuration
> (hiding our production values with ). We were able to receive email on
> 'FATAL' log entry.
>
> 
>   
>   
>   
>   
>   
>   
>value="true" />
> 
>   
> 
>   
> 
>
> We recently updated our application to use Log4Net v2.0.8, with the same
> configuration for SmptAppender . After this update, we stopped receiving
> emails. On enabling the internal log4Net logging, the below error was
> logged.
>
> log4net: Created Appender [SmtpAppender]
> log4net: Adding appender named [SmtpAppender] to logger [root].
> log4net: Hierarchy Threshold []
> log4net:ERROR [SmtpAppender] ErrorCode: GenericFailure. Failed in DoAppend
> 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.FixVolatileData(FixFlags flags) in
> c:\log4net\tags\2.0.8RC1\src\Core\LoggingEvent.cs:line 1341
>at log4net.Appender.BufferingAppenderSkeleton.Append(LoggingEvent
> loggingEvent) in c:\log4net\tags\2.0.8RC1\src\Appender\
> BufferingAppenderSkeleton.cs:line 483
>at log4net.Appender.AppenderSkeleton.DoAppend(LoggingEvent
> loggingEvent) in c:\log4net\tags\2.0.8RC1\src\
> Appender\AppenderSkeleton.cs:line 317
> log4net: Shutdown called on Hierarchy [log4net-default-repository]
>
> If we revert back to Log4Net v1.2.13.0, we start receiving emails as
> expected. Please advise how can we resolve the issue with version 2.0.8.
>
>
> Thanks and Regards
>
> Mohkam Singh
>
>