httpclient上的超时在Windows Phone 8上的应用程序中无效 [英] timeout on httpclient not working in my app on windows phone 8

查看:55
本文介绍了httpclient上的超时在Windows Phone 8上的应用程序中无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


在我的应用程序中,我正在调用一个服务方法,这需要一个多分钟的时间来处理并将结果返回给我的应用程序。我正在使用httpclient来做到这一点。我在httpclient对象上设置了超时2分钟。一分钟后,我看到webexception与
404错误代码。看起来默认设置为60秒。

之前我使用的是webclient,httpwebrequest,但在阅读了几个网站后,转移到了httpclient。我的问题还没有解决。

我在这里错过了什么吗?是60秒  Windows Phone中任何网络通话的固定超时?


感谢您的帮助。提前致谢。



问候,


Sai

解决方案

这与HttpClient无关。 如果您收到404,则会收到服务器的回复,说明您要查找的内容不在服务器上。 使用类似fiddler的东西来查看来自模拟器的http流量的详细信息:


配置Windows Phone 8模拟器与Fiddler合作



Hi,

In my app, I am calling a service method, which takes more than a minute to process and return the result to my app. I am using httpclient to do this. I have set the timeout for 2 minutes on the httpclient object. After one minute, I see webexception with 404 error code. looks like the default is set to 60 secs.
I was using webclient,httpwebrequest before, but after reading couple of sites, moved to httpclient. And my problem is not solved yet.
Am I missing something here? is 60 secs the fixed timeout for any network call in windows phone?
Appreciate your help. Thanks in advance.

Regards,

Sai

解决方案

This has nothing to do with HttpClient.  If you get a 404 you are getting a reply from the server saying whatever you are looking for is not on the server.  Use something like fiddler to see the details of the http traffic from the emulator:

Configure the Windows Phone 8 Emulator to work with Fiddler


这篇关于httpclient上的超时在Windows Phone 8上的应用程序中无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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