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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T15:55:02+00:00 2026-05-14T15:55:02+00:00

We are deploying web parts to SharePoint 2007 and would like to include logging

  • 0

We are deploying web parts to SharePoint 2007 and would like to include logging (log4net). The ideal solution would be to use a database appender to avoid the problems with knowing which actual server is executing the web part.

This questions has been helpful: SharePoint and Log4Net.

I’ve got log4net working in a stand-alone web app using Visual Studio dev server using the web.config for the log4net settings and a file appender for the output. I’d like to transition to SharePoint and still use the log file output so I can make sure it’s all working first, then change the config around to log to a database.

Is this going to be too much trouble? How have other developers added log4.net into their solutions for SharePoint? Is using a database the only good solution to correlating log output to a server?

Update: We have implemented Log4Net and it works to a point. The security model of SharePoint makes configuring the necessary permissions more difficult. In our case we saw that messages would not make it to the log file in certain cases. We used the logging code in a web service that runs as a given account. When we let it run as a dev, e.g. ‘us\bob’ and that dev uses a page that calls the web service, then the messages make it to the log file. Another unresolved issue is how to take into account the permissions needed for writing to a log directory used by the system, i.e. IIS logs or SharePoint logs.

  • 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-14T15:55:03+00:00Added an answer on May 14, 2026 at 3:55 pm

    Switching the configuration to use a database appender is certainly easy. You will need to decide how you want to connect to the database: Integrated Authentication vs. SQL Server Login, but both is easy to configure.

    I recommend to deploy log4net as a separate solution since Sharepoint does not track dependencies on assemblies. The same applies for other “core” assemblies that your solutions are going to use. Have a look at this question here.

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

Sidebar

Related Questions

What is best practice, in sharepoint 2007 web part deployment. Deploying the dll's to
We are deploying sharepoint MOSS 2007 at our work. I'm trying to come up
We have several VSeWSS 1.3 projects that add web parts to SharePoint. We have
I have several custom web parts that I'm in the process of deploying to
I'm having some serious trouble properly deploying Web Application Bundle (OSGi-fied WAR) on GlassFish
When deploying a web-role to the Windows Azure cloud, what is the default behavior
When deploying a web project written in ASP.Net, what happens to user sessions? Do
i am deploying my web application in jboss as 7.1.1 i want to add
I'm deploying a web site and I need to run large TSQL scripts contained
I got this problem after deploying my web package to IIS: HTTP Error 500.19

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.