views:

225

answers:

1

I have a standalone (non-IIS) WCF service that - besides the services - provides some simple HTML pages via a WebServiceHost.

When I enter http://localhost:1234/SomeRandomWords as an URL into the browser I get a default error page that says

Dienst

Es wurde kein Endpunkt gefunden

(Translated to english: Service / Endpoint not found)

Can I override this error page to provide some more info? I'd like to provide a list to the user with my HTML endpoint and the endpoints of the several web services available via my service.

A: 

You cant in W32 Service Host. You can in IIS Host.

You cant change the default WCF endpoint error message because your code is not yet executed.

For you API documentation, you could use the new WCF REST Starter Kit which provides a cool operation attribute WebHelpAttribute. This attribute produce some auto-generated operation description (request/response paypload format etc.)

Check the samples for examples.

PulsarBlow