[jira] [Commented] (LOG4NET-398) SerializationException after setting a LogicalThreadContext property
[ https://issues.apache.org/jira/browse/LOG4NET-398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15065456#comment-15065456 ] Stefan Bodewig commented on LOG4NET-398: I'm not sure I've got much to add, in particular I unfortunately haven't got an environment to debug the problem. But I have got a theory. I think the exception is raised once control is returning from the child process to the parent process. AFAIU when the child application is executed it is on the same thread as the parent. The child then sets a CallContext property and when it is done the logical thread context tries to preserve the properties set on the call context when the thread returns to the parent application - and there it cannot get deserialized becuase the log4net classes are unknown. This is a change we've introduced with 1.2.12 by fixing LOG4NET-317 where we made sure the properties really travel with the CallContext - and it now may travel into directions where you don't want them to go. You may want to add call to {{Clear}} as the last step in Child to see whether Parent still fails (it doesn't even start on my Linux box). Implementing MarshalByRefObject removes the need of deserializing the properties (and this of having the class available in Parent). This may mean that code that is run inside a separate AppDomain via some kind of hosting environment should clean up the LogicalThreadContext before returning. I haven't got any clear idea how to enforce that code-wise. > SerializationException after setting a LogicalThreadContext property > > > Key: LOG4NET-398 > URL: https://issues.apache.org/jira/browse/LOG4NET-398 > Project: Log4net > Issue Type: Task > Components: Core >Affects Versions: 1.2.12 > Environment: Visual Studio 2010 >Reporter: Thomas Meum >Priority: Minor > Labels: triaged > Attachments: log4net.zip > > > 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.3.4#6332)
[jira] [Commented] (LOG4NET-398) SerializationException after setting a LogicalThreadContext property
[ https://issues.apache.org/jira/browse/LOG4NET-398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15061788#comment-15061788 ] Lars Nellemann Nielsen commented on LOG4NET-398: I know it fixes the exception, I've previously stated that I don't think it should be necessary to inherit MarshalByRefObject, read the comments again, I seems you misunderstood them This fix might introduce regression failures, yeah the exception is gone, but doesn't mean this is the correct fix. > SerializationException after setting a LogicalThreadContext property > > > Key: LOG4NET-398 > URL: https://issues.apache.org/jira/browse/LOG4NET-398 > Project: Log4net > Issue Type: Task > Components: Core >Affects Versions: 1.2.12 > Environment: Visual Studio 2010 >Reporter: Thomas Meum >Priority: Minor > Labels: triaged > Attachments: log4net.zip > > > 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.3.4#6332)
[jira] [Commented] (LOG4NET-398) SerializationException after setting a LogicalThreadContext property
[ https://issues.apache.org/jira/browse/LOG4NET-398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15061999#comment-15061999 ] Dominik Psenner commented on LOG4NET-398: - Only classes derived from MarshalByRefObj are allowed to cross application domains. I'm still wondering why the ReadOnlyPropertiesDictionary crosses application domains. A class should not travel between application domains "by magic" as both application domains do not share the same memory and are virtually two processes executing in one process (this really sounds strange, yeah). So long as the root cause is not found I do not think that this patch should be applied. > SerializationException after setting a LogicalThreadContext property > > > Key: LOG4NET-398 > URL: https://issues.apache.org/jira/browse/LOG4NET-398 > Project: Log4net > Issue Type: Task > Components: Core >Affects Versions: 1.2.12 > Environment: Visual Studio 2010 >Reporter: Thomas Meum >Priority: Minor > Labels: triaged > Attachments: log4net.zip > > > 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.3.4#6332)
[jira] [Commented] (LOG4NET-398) SerializationException after setting a LogicalThreadContext property
[ https://issues.apache.org/jira/browse/LOG4NET-398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15060062#comment-15060062 ] Tomer Yoskovich commented on LOG4NET-398: - Previously you had written: "Its obvious that the properties dictionary cannot cross into the other appdomain, since inheriting MarshalByRefObject fixes it. I cannot see why installing log4net into the GAC fixes the problem as well, perhaps someone can shed some light on this?" So why do you now say that it shouldn't be necessary ? > SerializationException after setting a LogicalThreadContext property > > > Key: LOG4NET-398 > URL: https://issues.apache.org/jira/browse/LOG4NET-398 > Project: Log4net > Issue Type: Task > Components: Core >Affects Versions: 1.2.12 > Environment: Visual Studio 2010 >Reporter: Thomas Meum >Priority: Minor > Labels: triaged > Attachments: log4net.zip > > > 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.3.4#6332)
[jira] [Commented] (LOG4NET-398) SerializationException after setting a LogicalThreadContext property
[ https://issues.apache.org/jira/browse/LOG4NET-398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15057751#comment-15057751 ] Tomer Yoskovich commented on LOG4NET-398: - I have applied your fix since a few weeks ago and it works flawlessly without any issues. Now that log4net version has been updated, I'm waiting for this to be checked in Are you planning a pull request? / have an idea when it will be fixed? Thanks > SerializationException after setting a LogicalThreadContext property > > > Key: LOG4NET-398 > URL: https://issues.apache.org/jira/browse/LOG4NET-398 > Project: Log4net > Issue Type: Task > Components: Core >Affects Versions: 1.2.12 > Environment: Visual Studio 2010 >Reporter: Thomas Meum >Priority: Minor > Labels: triaged > Attachments: log4net.zip > > > 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.3.4#6332)
[jira] [Commented] (LOG4NET-398) SerializationException after setting a LogicalThreadContext property
[ https://issues.apache.org/jira/browse/LOG4NET-398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15057792#comment-15057792 ] Lars Nellemann Nielsen commented on LOG4NET-398: I'm glad it's working out for you. I haven't planned making a pull request, because i think this issue needs more investigation. As it in my opinion really shouldn't be necessary to inherit MarshalByRefObject. I'm by no means an expert on remoting and i really haven't got the time to properly read up on the subject. >From the looks of the source history my best bet would be to ping [~bodewig] >for some input > SerializationException after setting a LogicalThreadContext property > > > Key: LOG4NET-398 > URL: https://issues.apache.org/jira/browse/LOG4NET-398 > Project: Log4net > Issue Type: Task > Components: Core >Affects Versions: 1.2.12 > Environment: Visual Studio 2010 >Reporter: Thomas Meum >Priority: Minor > Labels: triaged > Attachments: log4net.zip > > > 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.3.4#6332)
[jira] [Commented] (LOG4NET-398) SerializationException after setting a LogicalThreadContext property
[ https://issues.apache.org/jira/browse/LOG4NET-398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14694812#comment-14694812 ] Lars Nellemann Nielsen commented on LOG4NET-398: The project was built against 4.5.1 with/without optimizations i've just tried to target it against 4.6 but same issue SerializationException after setting a LogicalThreadContext property Key: LOG4NET-398 URL: https://issues.apache.org/jira/browse/LOG4NET-398 Project: Log4net Issue Type: Task Components: Core Affects Versions: 1.2.12 Environment: Visual Studio 2010 Reporter: Thomas Meum Priority: Minor Labels: triaged Attachments: log4net.zip 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.3.4#6332)
[jira] [Commented] (LOG4NET-398) SerializationException after setting a LogicalThreadContext property
[ https://issues.apache.org/jira/browse/LOG4NET-398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14605194#comment-14605194 ] Lars Nellemann Nielsen commented on LOG4NET-398: [~nachbarslumpi] Have you had a chance to test the attached solution ? SerializationException after setting a LogicalThreadContext property Key: LOG4NET-398 URL: https://issues.apache.org/jira/browse/LOG4NET-398 Project: Log4net Issue Type: Task Components: Core Affects Versions: 1.2.12 Environment: Visual Studio 2010 Reporter: Thomas Meum Priority: Minor Labels: triaged Attachments: log4net.zip 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.3.4#6332)
[jira] [Commented] (LOG4NET-398) SerializationException after setting a LogicalThreadContext property
[ https://issues.apache.org/jira/browse/LOG4NET-398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14605208#comment-14605208 ] Dominik Psenner commented on LOG4NET-398: - Apologies, [~Nellemandela]. I'm rather busy with debugging a baby. :-) It would be nice if someone else could look into this as I won't get a chance to do it anytime soon. SerializationException after setting a LogicalThreadContext property Key: LOG4NET-398 URL: https://issues.apache.org/jira/browse/LOG4NET-398 Project: Log4net Issue Type: Task Components: Core Affects Versions: 1.2.12 Environment: Visual Studio 2010 Reporter: Thomas Meum Priority: Minor Labels: triaged Attachments: log4net.zip 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.3.4#6332)
[jira] [Commented] (LOG4NET-398) SerializationException after setting a LogicalThreadContext property
[ https://issues.apache.org/jira/browse/LOG4NET-398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14599053#comment-14599053 ] Lars Nellemann Nielsen commented on LOG4NET-398: We have run into the same problem and can replicate the issue on sites running in IIS and a console application acting as a host for multiple other console applications, separated in appDomains. So both rely on separate appDomains. The issue goes away when not setting log4net.LogicalThreadContext.Properties LogicalThreadContext is implemented using System.Runtime.Remoting.Messaging.CallContex, and stores the data in log4net.Util.PropertiesDictionary which inherits log4net.Util.ReadOnlyPropertiesDictionary making [log4net.Util.ReadOnlyPropertiesDictionary|http://svn.apache.org/viewvc/logging/log4net/trunk/src/log4net/Util/ReadOnlyPropertiesDictionary.cs?view=markup] inherit [MarshalByRefObject|https://msdn.microsoft.com/en-us/library/system.marshalbyrefobject%28v=vs.110%29.aspx] fixes the issue. Its obvious that the properties dictionary cannot cross into the other appdomain, since inheriting MarshalByRefObject fixes it. I cannot see why installing log4net into the GAC fixes the problem as well, perhaps someone can shed some light on this? Can anyone confirm the fix? SerializationException after setting a LogicalThreadContext property Key: LOG4NET-398 URL: https://issues.apache.org/jira/browse/LOG4NET-398 Project: Log4net Issue Type: Task Components: Core Affects Versions: 1.2.12 Environment: Visual Studio 2010 Reporter: Thomas Meum Priority: Minor Labels: triaged 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.3.4#6332)
[jira] [Commented] (LOG4NET-398) SerializationException after setting a LogicalThreadContext property
[ https://issues.apache.org/jira/browse/LOG4NET-398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14599203#comment-14599203 ] Dominik Psenner commented on LOG4NET-398: - You are right, AppDomains shouldn't be able to share information unless the objects are serialized/deserialized. But to me it sounds strange that a dictionary tries to cross into another AppDomain. At first sight, this shouldn't happen at all. Can you work out why this happens? SerializationException after setting a LogicalThreadContext property Key: LOG4NET-398 URL: https://issues.apache.org/jira/browse/LOG4NET-398 Project: Log4net Issue Type: Task Components: Core Affects Versions: 1.2.12 Environment: Visual Studio 2010 Reporter: Thomas Meum Priority: Minor Labels: triaged 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.3.4#6332)
[jira] [Commented] (LOG4NET-398) SerializationException after setting a LogicalThreadContext property
[ https://issues.apache.org/jira/browse/LOG4NET-398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14599204#comment-14599204 ] Dominik Psenner commented on LOG4NET-398: - You are right, AppDomains shouldn't be able to share information unless the objects are serialized/deserialized. But to me it sounds strange that a dictionary tries to cross into another AppDomain. At first sight, this shouldn't happen at all. Can you work out why this happens? SerializationException after setting a LogicalThreadContext property Key: LOG4NET-398 URL: https://issues.apache.org/jira/browse/LOG4NET-398 Project: Log4net Issue Type: Task Components: Core Affects Versions: 1.2.12 Environment: Visual Studio 2010 Reporter: Thomas Meum Priority: Minor Labels: triaged 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.3.4#6332)
[jira] [Commented] (LOG4NET-398) SerializationException after setting a LogicalThreadContext property
[ https://issues.apache.org/jira/browse/LOG4NET-398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14599324#comment-14599324 ] Lars Nellemann Nielsen commented on LOG4NET-398: I'm not certain, frankly i'm a bit amazed that this is even an issue Ive attached a simple project, so you can reproduce the executing console application has no references to log4net, it doesn't even have any references to the other console applications as they are being loaded and executed with [AppDomain.ExecuteAssembly(String)|https://msdn.microsoft.com/en-us/library/sxx9f4c2%28v=vs.110%29.aspx] i.e only by their path Placing log4net.dll in the root of the executing console application is just the same as placing it in GAC SerializationException after setting a LogicalThreadContext property Key: LOG4NET-398 URL: https://issues.apache.org/jira/browse/LOG4NET-398 Project: Log4net Issue Type: Task Components: Core Affects Versions: 1.2.12 Environment: Visual Studio 2010 Reporter: Thomas Meum Priority: Minor Labels: triaged 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.3.4#6332)
[jira] [Commented] (LOG4NET-398) SerializationException after setting a LogicalThreadContext property
[ https://issues.apache.org/jira/browse/LOG4NET-398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13829101#comment-13829101 ] Daniel Kugel commented on LOG4NET-398: -- I had the same issue on a dev machine when launching and debugging an ASP.NET web application from within Visual Studio 2010 and I wanted to confirm that Dominik's suggestion about installing the log4net assembly into the GAC resolved it. 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)
[jira] [Commented] (LOG4NET-398) SerializationException after setting a LogicalThreadContext property
[ https://issues.apache.org/jira/browse/LOG4NET-398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13829747#comment-13829747 ] Dominik Psenner commented on LOG4NET-398: - Looks like we can't solve this problem in code, but we may provide some information about this issue in the FAQ section of the webpage. Thus I'm modifying the issue accordingly. 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 Priority: Minor Labels: triaged 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)
[jira] [Commented] (LOG4NET-398) SerializationException after setting a LogicalThreadContext property
[ https://issues.apache.org/jira/browse/LOG4NET-398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13801865#comment-13801865 ] Mike Podonyi commented on LOG4NET-398: -- Hi Dominik/Stefan I am getting the same issue but in another context. I am runing a unit test in mstest when i received this error:wantedt to use using MSTest 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)
[jira] [Commented] (LOG4NET-398) SerializationException after setting a LogicalThreadContext property
[ https://issues.apache.org/jira/browse/LOG4NET-398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13801873#comment-13801873 ] Mike Podonyi commented on LOG4NET-398: -- I am getting the same issue but NOT in an ASP context. I am having a service which i unit test. After adding: LogicalThreadContext.Properties\[SID]=this.Sid; I am getting the following issue running my unit test: -- Run test started -- An exception occurred while invoking executor 'executor://mstestadapter/v1': Type is not resolved for member 'log4net.Util.PropertiesDictionary,log4net, Version=1.2.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a'. == Run test finished: 0 run (0:00:07.559) == Weird is, when i am running the Unit Test in the Debugger (F5) it works just fine. It only throws when i don't use the Debugger (Ctrl+F5). I am using Visual Studio 2012 Update 3 and .Net Framework 4.0. So i don't think it is a Visual Studio Issue. 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)
[jira] [Commented] (LOG4NET-398) SerializationException after setting a LogicalThreadContext property
[ https://issues.apache.org/jira/browse/LOG4NET-398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13801950#comment-13801950 ] Dominik Psenner commented on LOG4NET-398: - Try if installing log4net into the GAC resolves the issue. 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)
[jira] [Commented] (LOG4NET-398) SerializationException after setting a LogicalThreadContext property
[ https://issues.apache.org/jira/browse/LOG4NET-398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13801966#comment-13801966 ] Mike Podonyi commented on LOG4NET-398: -- This fixed the issue on my dev machine. Please tell me that this is not necessary on the production machine because i am not allowed to install anything in the GAC there. 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)
[jira] [Commented] (LOG4NET-398) SerializationException after setting a LogicalThreadContext property
[ https://issues.apache.org/jira/browse/LOG4NET-398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13802014#comment-13802014 ] Dominik Psenner commented on LOG4NET-398: - Looks like some environments (i.e. Visual Studio 2010) are not smart enough to load referenced local assemblies. Placing these local assemblies in the right spot (nearby the executable), installing it into the GAC or maybe working around this with the [AppDomain.AssemblyResolve|http://msdn.microsoft.com/en-us/library/system.appdomain.assemblyresolve.aspx] should solve the issue. 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)
[jira] [Commented] (LOG4NET-398) SerializationException after setting a LogicalThreadContext property
[ https://issues.apache.org/jira/browse/LOG4NET-398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13791231#comment-13791231 ] Dominik Psenner commented on LOG4NET-398: - Hi Where is the SerializationException thrown? Would you mind to post a stacktrace? 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)
[jira] [Commented] (LOG4NET-398) SerializationException after setting a LogicalThreadContext property
[ https://issues.apache.org/jira/browse/LOG4NET-398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13791515#comment-13791515 ] Thomas Meum commented on LOG4NET-398: - I have checked the internal logging now, and there is nothing out of the ordinary there. 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)
[jira] [Commented] (LOG4NET-398) SerializationException after setting a LogicalThreadContext property
[ https://issues.apache.org/jira/browse/LOG4NET-398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13791783#comment-13791783 ] Dominik Psenner commented on LOG4NET-398: - As a matter of fact I'm working with VS2012. I just tried this on a virtual and ran into this issue. Installing log4net.dll into to the GAC solves this issue for me. 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)