我正在开发WCF REST服务。我有个约定:WCF REST网址前缀属性
[ServiceContract]
public interface IContract
{
[OperationContract]
[WebInvoke(Method = "GET",
ResponseFormat = WebMessageFormat.Json,
RequestFormat = WebMessageFormat.Json,
UriTemplate = "/somemethod/{param1}")]
SomeResult SomeMethod(int param1) { ... }
/*
More methods...
*/
}
有没有配置普通URL前缀对于一个给定合同的所有方法的方法。也许像Web API [RoutePrefix("...")]
属性中的东西?
你是什么意思由Common Url前缀? – Tommassiov 2015-02-23 15:58:56
@Tommassiov就像我想我所有的网址都从“/ users /”开始。 – Andrei 2015-02-23 18:02:16