连接超时在ASP.Net中到期 [英] Connection TimeOut Expires in ASP.Net

查看:109
本文介绍了连接超时在ASP.Net中到期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个aspx页面,该异常页面在执行具有大量数据的远程SQL SERVER存储过程时抛出ODBC连接超时异常.如何解决此问题.
请帮忙.

I have an aspx page that throws an exception of ODBC Connection Timeout expires while executing an Remote SQL SERVER Stored Procedure having large volume of data.How to Solve this problem.
Please Help.

推荐答案

将Web配置文件更改为
将maxRequestLength设置为您的请求.
在此示例中,最大大小为60 mb.
change in web config file as
set maxRequestLength as Your request.
in this example max size is 60 mb .
<httpruntime executiontimeout="110" maxrequestlength="60000" />


嗨Deepak.xip,


请遵循:

1)创建索引 [使用PagedDataSource类进行分页 [优化SQL查询1 [优化SQL查询2 [ ^ ]
hi Deepak.xip,


Follow this:

1) Create index[^] in your database.

2) Paging using PagedDataSource class[^]

) try to Optimize SQL queries 1[^] Optimize SQL queries 2[^]


您可以尝试以下方法之一:

0)以较小的块检索数据

1)尝试将SqlCommand对象中的CommandTimeout属性更改为更高的值(默认值为30秒).

2)在SqlCommand(BeginExecuteReader)中使用异步功能.

编辑==================

为什么这个答案投票为1?我提供了几种可行的策略.如果您期望使用代码,那么您将非常失望,因为这里没有人能够为您提供代码.为什么?因为我们对您的项目不熟悉,而且这里没有人免费工作.
You could try one of these:

0) Retrieve data in smaller chunks

1) Try changing the CommandTimeout property in the SqlCommand object to a higher value (the default is 30 seconds).

2) Use the asynchronous functionality in SqlCommand (BeginExecuteReader).

EDIT ===================

Why was this answer voted 1? I provided several viable strategies. If you were expecting code, you''re going to be sorely disappointed because nobody here is going to be able to provide it to you. Why? because we''re not familiar with your project, and nobody here works for free.


这篇关于连接超时在ASP.Net中到期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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