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

  • Home
  • SEARCH
  • 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 6801987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:10:06+00:00 2026-05-26T19:10:06+00:00

I am using log4net for logging my asp.net application. However the log file is

  • 0

I am using log4net for logging my asp.net application. However the log file is working well when I run on my localhost. But when I publish to IIS, the log4net is not able to create a log file. May I know what is the problem? Did I miss any configuration?

Here is my log4net.config.

 <log4net debug="true">
<appender name="LogFileAppender" type="log4net.Appender.FileAppender">
  <param name="File" value="D:\\LewreLogFile1.log"/>
  <appendToFile value="true" />
  <rollingStyle value="Size" />
  <maxSizeRollBackups value="10" />
  <maximumFileSize value="10MB" />
  <staticLogFileName value="true" />
  <layout type="log4net.Layout.PatternLayout">
    <conversionPattern value="%-5p %d %5rms %-22.22c{1} %-18.18M - %m%n" />
  </layout>
</appender>
<logger name="File">
  <level value="All" />
</logger>
<root>
  <level value="All" />
  <appender-ref ref="LogFileAppender" />
</root>

and my global.asax

 void Application_Start(object sender, EventArgs e)
    {
        string l4net = Server.MapPath("~/log4Net.config");
        log4net.Config.XmlConfigurator.ConfigureAndWatch(new System.IO.FileInfo(l4net));

    }
  • 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-05-26T19:10:07+00:00Added an answer on May 26, 2026 at 7:10 pm

    You have to give IIS permission to do IO. Change your App pool identity or give IUSR permission the the file system it’s trying to access.

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

Sidebar

Related Questions

I am currently building an ASP.Net-MVC Application using log4net for logging, but the logger
We have been using log4net for logging our asp.net web forms application. Our logging
i want to log an asp.net , framework 4.0 web application. i'm using log4net
I want to Implement Logging future using log4net for my asp.net mvc application.. Can
I'm currently using log4net in my ASP.NET MVC application to log exceptions. The way
Using log4net we would like to log all calls to our ASP.NET MVC controller
What is the best logging pattern for asp.net mvc 2 using log4net? When should
I'm using MS Enterprise Logging Application Block in an ASP.NET website. For production launch,
I'm using XSLT to process my ASP.Net web.config file to insert some extra log4net
I'm using log4net to log in my app. My FileAppender is working fine, but

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.