【发布时间】:2013-01-07 16:24:48
【问题描述】:
我无法从 wcf json 服务返回嵌套类型。当我从 RestClient (firefox) 执行 http get 时,服务操作会执行两次,并且响应正文为空。 从 chrome 中的 url 调用相同的服务返回 未收到数据。错误 324 ERR_EMPTY_RESPONSE
这是代码
[WebInvoke(Method=”GET”, ResponseFormat=WebMessageFormat.Json, RequestFormat= WebMessageFormat.Json, UriTemplate=”GetProducts/storedId”] 公共服务响应>> GetAllProducts(string storeId) { // 从数据库中获取产品列表的代码。 }
[数据合约] 公开课产品 { [数据成员] 公共字符串名称 {get;设置;}
[数据成员] 公共 IList ProductDetails {get;放;} }
有人可以提出问题所在吗?谢谢
【问题讨论】: