一下两个接口,在开发环境和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();

  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-02-06
  • 2022-12-23
  • 2021-10-20
  • 2021-06-02
  • 2022-12-23
  • 2022-03-03
猜你喜欢
  • 2021-06-18
  • 2022-12-23
  • 2021-09-30
  • 2021-10-22
  • 2021-08-28
  • 2021-05-24
  • 2022-12-23
相关资源
相似解决方案