Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change default WCF page returned in browser?

Tags:

wcf

The old ASP.NET ASMX Web services used to produce a Web page that allowed a user to navigate to the various methods and invoke them (as long as the parameters were all simple types).

WCF web services produce a much less useful page (You have created a service... blah, blah, blah...). My question is two part...

Can I get WCF to produce results like ASMX did?

OR

Can I produce custom HTML that documents my service? If so, How?

This service is a nice example of the kind of thing I'd like to do... http://footballpool.dataaccess.eu/data/info.wso

like image 384
Eric Farr Avatar asked Oct 18 '25 19:10

Eric Farr


1 Answers

No, and no.

The service page that WCF produces is hard-wired, and I haven't ever heard of any trick or technique to change it. And no, you cannot get back the old ASMX service page, either.

There's a couple of things you can do:

  • based on your WSDL that completely describes your service, you could create an HTML help or man page (or pages) and have those displayed under a static URL (e.g. http://myserver/myservice/helppage.html)

  • you could create a totally separate page to describe your service, like the one you linked to, and make that available

Mind you: WCF services are by default SOAP based service calls - you cannot just call those from a web browser.

like image 175
marc_s Avatar answered Oct 20 '25 14:10

marc_s



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!