Chris Klepeis
Chris Klepeis

Reputation: 9993

WCF Rest Help Page

How can I update a WCF REST services UriTemplate to be www.mysite.com/... instead of the system name http://mysystem/...

When I go to the service help page I see the system name and I don't want the end user to see that.

http://myServerName.local/WCF/Svc.svc/blah/function

I want to see

http://www.mysite.com/WCF/Svc.svc/blah/function

I would imagine this is something I can update in the web.config?

Upvotes: 0

Views: 1003

Answers (2)

theKing
theKing

Reputation: 1636

Decorate your operation contracts like this:

[Description("www.mysite.com")]
string EchoWorld();

Upvotes: 1

casperOne
casperOne

Reputation: 74560

I don't believe you can. The UriTemplate attribute is used for path resolution only. The service help page generates the links completely from the host for the service, so in that sense, you would have to change the base address of the service host if you wanted it reflected in the help service page.

Upvotes: 0

Related Questions