Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Log4Net doesn't write when iis hosting WCF service

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.

like image 947
Rodniko Avatar asked Nov 20 '25 21:11

Rodniko


1 Answers

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"/>
like image 106
EventHorizon Avatar answered Nov 22 '25 17:11

EventHorizon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!