超时已过期。操作完成之前经过的超时时间或服务器没有响应 [英] Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding

查看:204
本文介绍了超时已过期。操作完成之前经过的超时时间或服务器没有响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨先生,



i我在使用visual studio2010的Windows C#应用程序工作。



连接时使用我的主服务器,在Timeout过期时获得异常。操作完成之前已经过了超时时间,或者服务器没有响应。



在使用dataadaptor填充数据集时发生这种情况。



app.config中的连接字符串

add name =constringconnectionString =server = XXX.XXX.XX.XX; uid = XXXXXX; pwd = XXXXXXX;初始目录= XXXXXXX;连接超时= 0; providerName =System.Data.SqlClient





请给出解决方案



Nandakumar S.

Hi Sir,

i am working in windows C# application with visual studio2010.

When connect with my main server,getting exception as Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

this happening while fill with dataset with dataadaptor.

connection string as in app.config
add name="constring" connectionString="server=XXX.XXX.XX.XX;uid=XXXXXX;pwd=XXXXXXX ;initial catalog=XXXXXXX;Connect Timeout=0;" providerName="System.Data.SqlClient"


please give the solution

Nandakumar S.

推荐答案

Please also set Command object timeout to Zero and try
i.e
cmd.CommandTimeout = 0;


您的问题不明确。

但是你测试过你的服务吗?呃没有关闭?

你有没有测试过连接字符串?

你有没有ping服务器?

转到命令提示符并输入。

ping servername

如果你得到答复。

然后测试连接字符串。

如果你能详细说明上述提示点。

我可以对你的问题有更多了解。
Your question not clear.
But have you test that you server is not down?
Have you test you connection string?
Have you ping to you server?
Go to command prompt and type.
ping servername
If you get reply.
Then test you connection string.
If you can elaborate on above mention point.
I can have more understanding about you question.


这篇关于超时已过期。操作完成之前经过的超时时间或服务器没有响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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