Log4Net doesn't write when iis hosting a WCF Service. it works great when i use the self hosting ( Visual Studio Development Server), but when i run it using the IIS it doesn't write anything.

i read about this prolem and the conclusion is that it must be a permission problem, but i don't know how to solve it.

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

i'm an administrator on my computer. i'm trying to create the file in the project folder. The file is a rolling file appender.

thank you.

Accepted Answer

For my IIS hosted WCF services with HTTP endpoints, logging to App_Data has proven to be the easiest solution.

<file value="App_Data\log.txt"/>
Written by Dag
This page was build to provide you fast access to the question and the direct accepted answer.
The content is written by members of the stackoverflow.com community.
It is licensed under cc-wiki