Writing WCF messages to a text log in configurable directory.

Posted by Arsh on Stack Overflow See other posts from Stack Overflow or by Arsh
Published on 2011-01-17T10:50:40Z Indexed on 2011/01/17 10:53 UTC
Read the original article Hit count: 202

Filed under:

Hello everyone, I have a WCF web service that is deployed at IIS. Part of the web service is to validate the inputs using EntLib 4.1 For ex, the string values can be of specific length and so on. In case of the validation being failed a fault exception is raised and the service is supposed to write the message in log file.

How do I go about creating the log file to a location that can be configured from a config file. Basically how do we write messages from IIS (since the service is hosted at IIS, I am assuming that that will be the source !!!!)

Regards.

© Stack Overflow or respective owner

Related posts about wcf