获取“超时过期或服务器无响应错误”在asp.net网站上 [英] Getting "Time out expired or server not responding error" in asp.net web site

查看:81
本文介绍了获取“超时过期或服务器无响应错误”在asp.net网站上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我们在我们的应用程序中使用了4次超时以防止超时错误

1.连接超时= 6000

2. SqlCommandTimeOut = 6000

3. httpRuntime executiontimeout = 600000

4. SessionState Timeout = 1440



正如您所看到的,我们每次都设置了相当高的时间,我们没有预料到弹出的超时错误。但遗憾的是,超时过期或服务器无响应被抛出。当特定SP执行时会发生这种情况。我已经使用分析器来获取查询并直接在sql server管理工作室中运行它,花了3分44秒来获取数据,最后甚至没有抛出任何错误。但是当从网站上运行时,网站就会出错。你能否说一下出了什么问题。



注意: - 使用的SP是动态的。我的意思是它包含了很多动态的sql。

我们的应用程序是用ASP.NET编写的。

Hi,
We are using 4 time outs in our application to keep it from throwing timeout error
1. Connection Timeout=6000
2. SqlCommandTimeOut = 6000
3. httpRuntime executiontimeout = 600000
4. SessionState Timeout = 1440

As you can see we have set pretty high time for each time out, we didnot anticipate the timeout error to popup. But unfortunately the "timeout expired or no response from server" is thrown. This happens when a particular SP executes. I have used the profiler to fetch the query and ran it directly in the sql server management studio, it took 3 min 44 secs to get the data and in the end did not even throw any error. But when the same is run from the website , the website is throwing error. Can you please suggest what went wrong.

Note:- The SP used is dynamic. I mean it contains a lot of dynamic sql.
Our application in written in ASP.NET.

推荐答案

美好的一天

你将不得不使用异步完成此任务的任务。

它将在退出代码之前等待该过程完成





https://msdn.microsoft.com/en-us/library/hh191443.aspx [ ^ ]





亲切的问候

Divan
Good day
You will have to use Asynchronous tasks to accomplish this.
It will wait for the process to complete before it exits the code


https://msdn.microsoft.com/en-us/library/hh191443.aspx[^]


Kind regards
Divan


这篇关于获取“超时过期或服务器无响应错误”在asp.net网站上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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