I wrote a wcf service that uses BasicHttpBinding with some url and a client using this service.
Users should launch a client application and specify the same url that is specified in server endpoint.
However, if a user inadvertently opens this url in a web browser, he/she sees information on how to retrieve service metadata, which is absolutely useless to them.
What should be done in order for him/her to see, for example a help topic?
You need to turn off the publication of the service’s metadata.
You can disable it in the Web.config:
You can find more information on MSDN here:
http://msdn.microsoft.com/en-us/library/system.servicemodel.description.servicemetadatabehavior.httpgetenabled.aspx
http://msdn.microsoft.com/en-us/library/ms731317.aspx
Of course this will still generate a default landing page if a user manually enters the service’s URL in the address bar (e.g.: http://www.examle.com/service.svc). However now it will mention that the metadata is currently disabled.
If you want to customize that page I’d suggest you check out the following thread, it contains a complete code sample on how to set it up:
http://social.msdn.microsoft.com/forums/en-US/wcf/thread/5778651a-b212-438a-b3e8-f7029775d52a/