开发者

WCF Rest Help Page

开发者 https://www.devze.com 2022-12-21 01:13 出处:网络
How can I update a WCF REST services UriTemplate to be www.mysite.com/... instead of the system name http://mysystem/...

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://myS开发者_开发知识库erverName.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?


Decorate your operation contracts like this:

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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消