WCF 休息帮助页面
如何将 WCF REST 服务 UriTemplate 更新为 www.mysite.com/... 而不是系统名称 http://mysystem/ ...
当我转到服务帮助页面时,我看到系统名称,但我不希望最终用户看到该名称。
我想看看
我想这是我可以在 web.config 中更新的东西?
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.
I want to see
I would imagine this is something I can update in the web.config?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
像这样装饰你的操作合约:
Decorate your operation contracts like this:
我不相信你可以。 UriTemplate 属性仅用于路径解析。服务帮助页面完全从服务的主机生成链接,因此从这个意义上说,如果您希望服务主机的基地址反映在帮助服务页面中,则必须更改服务主机的基地址。
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.