小提琴手 - ReadResponse失败:服务器未返回该请求的响应 [英] Fiddler - ReadResponse failed: The server did not return a response for this request

查看:5575
本文介绍了小提琴手 - ReadResponse失败:服务器未返回该请求的响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我第一次遇到这样的错误与RESTful Web服务在几​​次处理之后。我觉得很难追查错误的原因,希望你能帮助我。

This was the first time I encountered this kind of error after dealing with RESTful web service in couple of times. I find it hard to trace the cause of error, hope you could help me.

我对登录服务这个属性。

I have this attribute for Login service

[WebGet(UriTemplate = "Login?username={username}&password={password}&ip={ip}", ResponseFormat = WebMessageFormat.Json)]  

使用招使用的服务:

GET的 HTTP://本地主机:3445 /身份验证/登录用户名= JSM&放大器;密码= A和IP = 1

提琴手响应:

[Fiddler] ReadResponse() failed: The server did not return a response for this request.  



在这里输入的形象描述

我不知道,如果它造成的,内容类型:应用程序/ JSON ,因为当我尝试将其更改为xml:

I'm not sure if it caused by, Content-type: application/json because when I try to change it to xml:

[WebGet(UriTemplate = "Login?username={username}&password={password}&ip={ip}", ResponseFormat = WebMessageFormat.Xml)]  

这给了我这样的结果:

有点奇怪。我做了什么错?我不得不返回JSON对象..谢谢!

Kinda weird. What I have done wrong? I have to return json object.. Thanks!

推荐答案

错误的原因是一堆数据类型的负载(请参阅预览以上XML数据)。 JSON有大约65K对象的限制,在我的项目超出极限。所以,最终的解决方案是创建DTO - 数据传输对象,将最大限度地减少传递数据

The cause of error is the loading of bunch data types (see the preview of xml data above). Json has a limit of approximately 65K objects, and in my project it exceeds the limit. So the final solution is to create DTO - "Data Transfer Object" that will minimize the data to be passed.

这篇关于小提琴手 - ReadResponse失败:服务器未返回该请求的响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆