How do I set IncludeExceptionDetailInFaults in code without using App.Config?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, sure – on the server side, before you open the service host. This would however require that you self-host the WCF service – won’t work in IIS hosting scenarios:
If you need to do the same thing in IIS hosting, you’ll have to create your own custom
MyServiceHostdescendant and a suitableMyServiceHostFactorythat would instantiate such a custom service host, and reference this custom service host factory in your *.svc file.