asp.net,ajax [英] asp.net,ajax

查看:90
本文介绍了asp.net,ajax的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友们,

我正在ajax的asp.net中使用凭证输入表单(使用Pagemethods,更新面板,脚本管理器),同时单击保存"按钮将显示连接已重置.

页面加载时重置了与服务器的连接.
*该站点可能暂时不可用或太忙.请稍后重试.
*如果无法加载任何页面,请检查计算机的网络
连接.
*如果您的计算机或网络受到防火墙或代理的保护,请确保
允许Firefox访问Web.
请帮助我

现在在我使用的web.config文件中

Hi friends,

I''m working on voucher entry form in asp.net in ajax(using pagemethods, update panel, script manager), while click on save button it will show the connection was reset.

The connection to the server was reset while the page was loading.
* The site could be temporarily unavailable or too busy. Try again in a few moments.
* If you are unable to load any pages, check your computer''s network
connection.
* If your computer or network is protected by a firewall or proxy, make sure
that Firefox is permitted to access the Web.
plz help me

now in my web.config file I used

---<appsettings>
      <add key="ConnectionInfo" value="Data Source=PENTIUM-SERVER\SQL2005;UId=lotus;Database=lotuscurrent;password=123;Max Pool Size=300" /></appsettings>

推荐答案

在连接字符串中指定连接超时= 0

SqlConnection conn =新的SqlConnection("connectionstring");
conn.ConnectionTimeout = 0;

表示无限超时
In connection string give the connection timeout = 0

SqlConnection conn = new SqlConnection("connectionstring");
conn.ConnectionTimeout = 0;

that mean unlimited timeout


也许此错误消息不是由于SqlServer的原因,而是与Ajax有关,
首先,您必须在不使用Ajax的情况下测试您的应用程序,然后使用Asp.net中的ajax工具对您的应用程序进行Ajaxify.
Maybe this error message is not becuase of SqlServer conncetion and it is related to Ajax ,
first you must test your app without Ajax , and after that use the ajax tools in Asp.net to ajaxify your app.


这篇关于asp.net,ajax的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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