在IIS 7.5中,WCF 的 WebGet 方式无法返回集合数据
一下两个接口,在开发环境和IIS 7.0中,测试都很正常,可以返回数据;但是在IIS 7.5中,TestGetAllUser却返回404的错误,TestGetSingleUser则可以正常返回数据,区别就是在于一个返回 集合,另一个返回单个实体,同时在IIS 7.5中,WebGet中的/help也无法使用,崩溃……
[WebGet(UriTemplate = "/TestGetSingleUser/{id}",
RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
SampleUser TestGetSingleUser(string id);
[WebGet(UriTemplate = "/TestGetAllUser",
RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
List<SampleUser> TestGetAllUser();