title: Log4net AdoNetAppender not saving to Db
body: <p>I'm having trouble with my AdoNetAppender- it's just not logging. I've gone through the log4net manual and various other links but can't see what I'm doing wrong. The following is my config file and how I'm calling it so any help would be greatly appreciated!</p>
  
  <pre><code>&lt;appender name="AdoNetAppender" type="log4net.Appender.AdoNetAppender"&gt;
    &lt;bufferSize value="1" /&gt;
    &lt;connectionType value="System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /&gt;
    &lt;connectionString value="***" /&gt;
    &lt;commandText value="dbo.spx_CreatePageLog" /&gt;
    &lt;commandType value="StoredProcedure" /&gt;
    &lt;!--&lt;parameter&gt;
      &lt;parameterName value="@log_date" /&gt;
      &lt;dbType value="DateTime" /&gt;
      &lt;layout type="log4net.Layout.RawTimeStampLayout"&gt;
        &lt;conversionPattern value="%message" /&gt;
      &lt;/layout&gt;
    &lt;/parameter&gt;--&gt;
    &lt;parameter&gt;
      &lt;parameterName value="@HTTPMethod" /&gt;
      &lt;dbType value="String" /&gt;
      &lt;size value="10" /&gt;
      &lt;layout type="log4net.Layout.PatternLayout"&gt;
        &lt;conversionPattern value="%message" /&gt;
      &lt;/layout&gt;
    &lt;/parameter&gt;
    &lt;parameter&gt;
      &lt;parameterName value="@URI" /&gt;
      &lt;dbType value="String" /&gt;
      &lt;size value="512" /&gt;
      &lt;layout type="log4net.Layout.PatternLayout"&gt;
        &lt;conversionPattern value="%URI{URI}" /&gt;
      &lt;/layout&gt;
    &lt;/parameter&gt;
    &lt;parameter&gt;
      &lt;parameterName value="@RequestData" /&gt;
      &lt;dbType value="String" /&gt;
      &lt;size value="1024" /&gt;
      &lt;layout type="log4net.Layout.PatternLayout"&gt;
        &lt;conversionPattern value="%RequestData{RequestData}" /&gt;
      &lt;/layout&gt;
    &lt;/parameter&gt;
    &lt;parameter&gt;
      &lt;parameterName value="@UserID" /&gt;
      &lt;dbType value="int" /&gt;
      &lt;layout type="log4net.Layout.PatternLayout"&gt;
        &lt;conversionPattern value="%UserID{UserID}" /&gt;
      &lt;/layout&gt;
    &lt;/parameter&gt;
    &lt;parameter&gt;
      &lt;parameterName value="@UserToDealerID" /&gt;
      &lt;dbType value="int" /&gt;
      &lt;layout type="log4net.Layout.PatternLayout"&gt;
        &lt;conversionPattern value="%UserToDealerID{UserToDealerID}" /&gt;
      &lt;/layout&gt;
    &lt;/parameter&gt;
    &lt;parameter&gt;
      &lt;parameterName value="@AdminID" /&gt;
      &lt;dbType value="String" /&gt;
      &lt;size value="256" /&gt;
      &lt;layout type="log4net.Layout.PatternLayout"&gt;
        &lt;conversionPattern value="%AdminID{AdminID}" /&gt;
      &lt;/layout&gt;
    &lt;/parameter&gt;
    &lt;parameter&gt;
      &lt;parameterName value="@SessionID" /&gt;
      &lt;dbType value="String" /&gt;
      &lt;size value="256" /&gt;
      &lt;layout type="log4net.Layout.PatternLayout"&gt;
        &lt;conversionPattern value="%SessionID{SessionID}" /&gt;
      &lt;/layout&gt;
    &lt;/parameter&gt;
    &lt;parameter&gt;
      &lt;parameterName value="@BrowserInfo" /&gt;
      &lt;dbType value="String" /&gt;
      &lt;size value="1024" /&gt;
      &lt;layout type="log4net.Layout.PatternLayout"&gt;
        &lt;conversionPattern value="%BrowserInfo{BrowserInfo}" /&gt;
      &lt;/layout&gt;
    &lt;/parameter&gt;
    &lt;!--&lt;parameter&gt;
      &lt;parameterName value="@exception" /&gt;
      &lt;dbType value="String" /&gt;
      &lt;size value="2000" /&gt;
      &lt;layout type="log4net.Layout.ExceptionLayout" /&gt;
    &lt;/parameter&gt;--&gt;
  &lt;/appender&gt;
  &lt;root&gt;
    &lt;level value="DEBUG" /&gt;
    &lt;appender-ref ref="AdoNetAppender" /&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>string RequestData = auditModel.ParameterValues.GetDictionaryIntoString&lt;string&gt;();
          string BrowserInfo = auditModel.BrowserInfo.GetDictionaryIntoString&lt;string&gt;();
  
          //log4net.LogicalThreadContext.Properties["HTTPMethod"] = auditModel.Method;
          log4net.GlobalContext.Properties["URI"] = auditModel.RequestUrl;
          log4net.GlobalContext.Properties["RequestData"] = RequestData;
          log4net.GlobalContext.Properties["UserID"] = auditModel.UserID;
          log4net.GlobalContext.Properties["UserToDealerID"] = auditModel.UserToDealerID;
          log4net.GlobalContext.Properties["AdminID"] = auditModel.AdminID;
          log4net.GlobalContext.Properties["SessionID"] = "123456"; //auditModel.SessionID;
          log4net.GlobalContext.Properties["BrowserInfo"] = BrowserInfo;
  
          Logger.Debug(auditModel.Method);
  </code></pre>