"A transport-level error has occurred when sending the request to the server"的解决办法
来源:互联网 发布:java 多用户商城 编辑:程序博客网 时间:2024/05/17 01:08
最近在做项目时,遇到一个随机发生的异常:"A transport-level error has occurred when sending the request to the server...",异常被抛出,但却不影响程序的正常使用.可以客户却不这么认为.所有的问题都应该解决,尽管不影响正常使用.
然而,这个异常的抛出,最初搞得我一头雾水."A transport-level error",感觉好像不是我代码的问题,更像是传输中出了问题.但要解决问题,这让我从何下手呢?
有问题,百度一下.终于找到了问题的真正原因:
这个情况是通常是因为SQL Server遇到了一些Issues而不得不去刷新所有的连接,但是ADO.net仍然认为这些连接是有效的,而其实,可能在使用的过程中,某些连接早已失效。
看来问题出在SQL的连接上了.而且是过期的连接影响了正常的刷新.知道了问题的根源,解决它就是不问题了.
通过调用连接对象的ClearPoool方法来清除这些连接池是失效的连接,也可以调用SqlConnection.ClearAllPools()方法来清理所有连接的连接池.
问题就这样迎刃而解了.
- "A transport-level error has occurred when sending the request to the server"的解决办法
- C#恢复数据库之后,出现错误transport-level error has occurred when sending the request to the server
- XMLHttpRequest - Sending a Request to the Server
- 安卓模拟器不能启动:The connection to adb is down, and a severe error has occurred的解决办法
- An error has occurred while establishing a connection to the server处理方法
- An SSL error has occurred and a secure connection to the server cannot be made
- An SSL error has occurred and a secure connection to the server cannot be made.
- iOS9 getting error “an ssl error has occurred and a secure connection to the server cannot be made”
- NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be mad
- An error occurred on the server when processing the URL.
- android The connection to adb is down, and a severe error has occured.问题的解决办法
- The connection to adb is down, and a severe error has occured.的原因与解决办法
- The connection to adb is down, and a severe error has occured的解决办法
- An error occurred during the parsing of a resource required to service this request
- eclipse 出现An error has occurred. See the log file f:\eclipse\configuration\的解决办法
- 解决方法:An error occurred on the server when processing the URL. Please contact the system administrato
- An error occurred on the server when processing the URL. Please contact the system administrator.
- 解决方法:An error occurred on the server when processing the URL. Please contact the system administrato
- 谈谈我对apache+tomcat+jk2整合的理解
- combbox设置为不可输入
- 大家是如何释放工作压力的方法总结
- JSR 248 -- Mobile Service Architecture Specification
- [转]Oracle With 语法 示例
- "A transport-level error has occurred when sending the request to the server"的解决办法
- GridView和CheckBox控制选择行上下移动
- Sir Winston Churchill 温斯顿▪丘吉尔爵士
- 通过START WITH 和CONNECT BY PRIOR遍历上级父节点(上级目录)
- Oracle的MERGE用法
- 我不喜欢理智的女人,一点都不喜欢
- 开BLOG语:being a CODER
- 华硕笔记本重装XP经历分享----------(光驱不启动、xp驱动)
- 版本1.0配置文件