Log4Net does not record when iis supports WCF service

Log4Net does not write when iis hosts the WCF service. It works fine when I use my own hosting (Visual Studio Development Server), but when I start it using IIS, it does not write anything.

I read about this span, and the conclusion is that this should be a resolution problem, but I don't know how to solve it.

How can I verify that I have permission to write a log file? where can i change the resolution? change AppPool users? Can you give me some simple steps how to check if I have a permission problem?

I am the administrator of my computer. I am trying to create a file in a project folder. The file is a copied file application.

thank.

+3
source share
5 answers

The problem was resolved when I moved the log path from the c: \ Log.txt hard drive to the c: \ log \ Log.txt folder on the hard drive.

-1
source

For my IIS with WCF services with HTTP endpoints, registering with App_Data was the easiest solution.

<file value="App_Data\log.txt"/>
+6
source

, AD, , // , . , , / . , .

: , , , .

+1

, , Logging Application ASP.NET. EntLib 4.1, ACL- , , , , , .

0

, IIS 7+ , . , enter image description here

0

Source: https://habr.com/ru/post/1763972/


All Articles