I have my WCF Service hosted in Windows Service. The client application is a website project to which I added the Service reference.
I was not using any error logging/tracing… but now I feel I should implement as it will help me not to make void guesses.
Please guide me for the best practice so that I can quickly handle errors and pin point the exact issue.
Thank you!
If you just need to see the error message for troubleshooting purposes, you can set IncludeExceptionDetailInFaults attribute in your app.config. This will give you the full exception details, including a stack trace on your client. However, be aware that exception details may include sensitive information, so don’t leave it on in a production system without understanding the risk.
If you want to take it a step further, you can implement the IErrorHandler interface. You can use this as a single point of logging exceptions or translating them into published Fault Contracts.