开发者

How to build URL of WCF REST web services

I am using the new .NET 4 WCF REST web services. In order to link resources, I'd like to put links in my responses. In ASP.NET I can generate URLs from my routing configuration (e.g. UrlHelper.Action(...))

With WCF REST web services I have an ASP.NET routing configuration plus Uri templates:

[WebGet(UriTemplate = "{id}")]
MyResult Index(string id) {...}

I want to store related URIs in my result objects. How can I construct URLs from my routing configuration + UriTemplates without hardcoding base URLs or oth开发者_StackOverflow社区er information? Are there similar helper classes available?

Regards Hartmut

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜