Uploaded image for project: 'Log4net'
  1. Log4net
  2. LOG4NET-398

SerializationException after setting a LogicalThreadContext property

    Details

    • Type: Task
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.2.12
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
    • Environment:
      Visual Studio 2010

      Description

      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

        Attachments

        1. log4net.zip
          2.21 MB
          Lars Nellemann Nielsen

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              meum Thomas Meum
            • Votes:
              3 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated: