本文介绍了C#中的超时异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在SQL中执行一个过程需要50秒才能完成并返回5000条记录。
当我在C#中使用Linq调用相同的程序时,它会抛出超时异常,下面是详细信息。
System.Data.SqlClient.SqlException:超时已过期。操作完成前经过的超时时间或服务器没有响应。
请帮我解决问题。
谢谢。
Executing a procedure in SQL takes 50 seconds in getting completed and returns 5000 records.
when I call same procedure using Linq in C#, it throws Timeout Exception, below is the detail.
System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Please help me how to fix it.
Thanks.
推荐答案
这篇关于C#中的超时异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!