Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8980025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:58:48+00:00 2026-06-15T19:58:48+00:00

We have set up log4net within our current project to use the AdoNetAppender to

  • 0

We have set up log4net within our current project to use the AdoNetAppender to write log entries to a SQL Server database. This all works correctly, but for some reason in order to get it working we have to set Copy Local to true on System.Data.dll – if this DLL isn’t present in the bin directory then log4net won’t output to SQL Server and will throw an error about the missing DLL.

Is this a bug in log4net? I would assume that since System.Data.dll is a .Net framework component that log4net would be able to find it in the GAC.

For reference, we’re using log4net 1.2.10.0 and .Net 4.5

EDIT – For better readability if anyone else comes across this issue, the original XML config I was using defined the connectionType as:

<connectionType value="System.Data.SqlClient.SqlConnection, System.Data" />

Changing it to the following fixed the issue.

<connectionType value="System.Data.SqlClient.SqlConnection, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T19:58:49+00:00Added an answer on June 15, 2026 at 7:58 pm

    Can you try this? I’m not sure what version of System.Data is for .NET 4.5, but anyways this should work:

    <connectionType value="System.Data.SqlClient.SqlConnection, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the AdoNetAppender to write to a SQL Server 2005 database table.
So I'm using log4net to write log output to the trace. Show sql is
We are trying to use Log4Net to log from our IIS 6-deployed WCF Application.
In a project, i'm using log4net to write down in the event log. I
I'm using log4Net for my logging. I also have the following set... <log4net debug=true>
I have set of flat files (114 files) each file is named with database
How to overwrite existing log file ??? I have tried to set attribute property
I have a .net service that processes messages. For any failures, i use log4net
I would like to set the log file name for a log4j and log4net
I have set up log4net in my C# 3.5 windows form application. I am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.