Profiler seems not to work with log4net

I started a profiling session for a .Net executable, but it seems to be conflicting with log4net.

I get the following error when the profiling job is started:

log4net:ERROR [RollingFileAppender] Unable to acquire lock on file d:\logs\xxxx.log. The process cannot access the file 'd:\logs\xxxx.log' because it is being used by another process.

What can I do to successfully enable the profiling session?

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 New member
    I can't say as we have never seen this problem before. Profiler also uses Log4Net, but it logs to a location that would more than likely not interfere with yours.

    Are you able to work out which process is using the file? Maybe it's antivirus as that does wonderful, random things once you introduce the profiler core component into a process.
  • Brian, going another route....

    I don't see an option to profile a web service that is hosted on IIS.

    How would I do that?
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Same as profiling a web application. Only minimize the IE when it opens, as closing this will stop profiling. Get whatever consumes the webservice running and you should see results. Of course if you choose profile on unused port you have to change the contract on your service consumer to use the new port.

    Good Luck!!
Sign In or Register to comment.