【发布时间】:2016-08-09 11:53:56
【问题描述】:
我是 REST 服务开发的新手,我目前正在编写一个必须支持现有调用格式的 WCF Rest 服务。
我知道通过添加
[WebInvoke(Method = "GET", UriTemplate = "{id}/testid.xml")]
string testid(string id);
对于我的网络方法,请求将使用:
http://[hostname]/255/testid.xml
我想要的是能够使用 http://255/[hostname]/testid.xml
请注意,该服务托管在 Windows 服务应用程序中。
感谢您的帮助!
【问题讨论】: