logging-log4net-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Bodewig (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4NET-398) SerializationException after setting a LogicalThreadContext property
Date Thu, 10 Oct 2013 14:59:57 GMT

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

Stefan Bodewig commented on LOG4NET-398:
----------------------------------------

http://www.logue.com.ar/blog/2007/12/cassini-serializationexception-type-is-not-resolved-for-member/
hints at a problem with the embedded WebHost of VS and classes that use CallContext.SetData
- even if the article is old, so is the Bug raised against VS linked from it and it still
unresolved.  Comments in the report indicate the problem exists in VS2010 as well.

Dominik, are you using VS2010 and the embedded host or are you using something newer than
that?

Sounds like the webhost was creating multiple appdomains and log4net wasn't available in all
of them.



> SerializationException after setting a LogicalThreadContext property
> --------------------------------------------------------------------
>
>                 Key: LOG4NET-398
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-398
>             Project: Log4net
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2.12
>         Environment: Visual Studio 2010
>            Reporter: Thomas Meum
>
> I have found that accessing Page.Request.Url after setting a LogicalThreadContext property
causes a SerializationException with the following message: Type is not resolved for member
'log4net.Util.PropertiesDictionary,log4net, Version=1.2.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a'.
> I have been able to reproduce the problem on two different machines with the following
steps:
> 1. Create a new ASP.NET Empty Web Application
> 2. Add a reference to log4net.dll
> 3. Add a new Web Form
> 4. Add the following code to Page_Load:
>     log4net.LogicalThreadContext.Properties["Test"] = 1;
>     Uri url = Request.Url;
> 5. Hit F5



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message