服务器在一定时间后没有响应JSON响应 [英] Server not responding JSON response after certain time

查看:138
本文介绍了服务器在一定时间后没有响应JSON响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有一个调用.net webapi的控制台应用程序。 Api旨在返回  HttpResponseMessage消息。


但如果api运行时间超过3分钟则无响应从服务器收到。任何不到2分钟的时间,响应都会回来。 


是否有人知道问题所在?



谢谢


解决方案

您最有可能在客户端超时。


https://msdn.microsoft.com/en-us/library/system.net.http.httpclient.timeout%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396


可以在ASP.NET论坛上讨论Webapi问题。


http://forums.asp.net/



Hi,

I have a console app that is calling a .net webapi. The Api is designed to return a HttpResponseMessage message.

But if the api takes more than 3 mins to run then no response is received from the server. Anything under 2mins, the response comes back. 

Would  anyone know what the issue might be?

Thanks

解决方案

It's timing out on you most likely on the client side.

https://msdn.microsoft.com/en-us/library/system.net.http.httpclient.timeout%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396

Webapi issues can be discussed at the ASP.NET forum.

http://forums.asp.net/


这篇关于服务器在一定时间后没有响应JSON响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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