how to show a custom error page in a WCF service

182 Views Asked by At

i have a WCF service, when i try to browse the service outside the application i get directory listing,disabled the directory listing by making the change in my code
i get 403 error(403 - Forbidden: Access is denied.You do not have permission to view this directory or page using the credentials that you supplied.) which is as expected. But instead of server error i want to show a custom error, i tried adding custom error code in my config but it does not work, is it because it is a web service. Does custom error page only work at application level and not for services?

0

There are 0 best solutions below