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 8065913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T11:48:59+00:00 2026-06-05T11:48:59+00:00

I use log4net to log the errors in my web application and it works

  • 0

I use log4net to log the errors in my web application and it works fine. However if I place the same code in website I get error “Unrecognized configuration section log4net”

here is my web.config section

<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,Log4net" requirePermission="false"/>  

<root>

  <level value="RELEASE" />

  <appender-ref ref="LogFileAppender" />

</root>

<appender name="LogFileAppender" type="log4net.Appender.RollingFileAppender" >

        <param name="File" value="D:\ESSReport\Logs\ESSlog.log" />

        <param name="AppendToFile" value="true" />

  <rollingStyle value="Size" />

  <maxSizeRollBackups value="5" />

  <maximumFileSize value="4MB" />

  <staticLogFileName value="true" />

  <layout type="log4net.Layout.PatternLayout">

   <param name="ConversionPattern" value="%newline%-5p%d{yyyy-MM-dd hh:mm:ss} [%thread] [%logger] [%line] %newline - %message"  />

  </layout>

</appender>

I have added dll to my website

  • 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-05T11:49:00+00:00Added an answer on June 5, 2026 at 11:49 am

    You are probably missing configuration section registration.

    Here is sample code how you can register custom section:

    <configuration>
      <configSections>
        <sectionGroup name="LoggerConfiguration">
          <section name="GPWFLogger" type="GP.Solutions.WF.Entities.LoggerConfiguration,GPWFLogger" allowDefinition="Everywhere" allowLocation="true"/>
        </sectionGroup>
      </configSections>
    
      <LoggerConfiguration>
        <GPWFLogger
          ConnectionStringName="ASPNETDB"
          LogLevel="Full"
          LogPrimaryTarget="SqlServer"
          LogFilePath="GPWFwebClient.log" />     
      </LoggerConfiguration>
    

    Take notice that LoggerConfiguration is registred inside sectionGroup.
    You can use this principle in your case.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We use the log4net to log the winform application's event and error. Our customer
We have a ASP .Net application whereby we use Log4Net to log details within
I am writing an error log procedure (for security reasons I cannot use log4net
We are trying to use Log4Net to log from our IIS 6-deployed WCF Application.
We use log4net for logging application exceptions for a variety of web applications. At
How to use multiple appender in same log4net config file? Also provide how to
I want to use Log4Net in my asp.net application & I have done the
In my application, I use log4net, with all types creating their own logger based
I have been attempting to get log4net logging any info or error into my
I currently use log4net with a RollingFileAppender. As each Log call is made I'd

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.