Atrotygma
Atrotygma

Reputation: 1153

How to host both application contract and web page (simple html page) in a WCF service?

I have a WCF service host that hosts the following service binding:

http://localhost:2756/mywcfinterface (wshttpbinding)

Now I mapped this internal binding to the following domain

http://mywcfservice.mydomain.com

This works perfectly fine when connecting with a service client to that endpoint. But when I open up the address in a browser, it doesn't.

Is there a way to provide the interface to any wcf client, but a simple html website to a web browser (e.g. for informing the client).

Upvotes: 0

Views: 99

Answers (1)

Dude Pascalou
Dude Pascalou

Reputation: 3179

In order to view some information about the service contract in a browser (e.g. for a human), you can add a MEX endpoint : see msdn for Publishing Metadata

HTH

Upvotes: 1

Related Questions