C#恢复数据库之后,出现错误transport-level error has occurred when sending the request to the server
2012-08-28 19:42
701 查看
当操作了数据库的恢复时,继续其他操作的时候,系统跑出一个错误:transport-level error has occurred when sending the request to the server
这个情况是通常是因为SQL Server遇到了一些Issues而不得不去刷新所有的连接,但是ADO.net仍然认为这些连接是有效的,而其实,可能在使用的过程中,某些连接早已失效。
看来问题出在SQL的连接上了.而且是过期的连接影响了正常的刷新.知道了问题的根源,解决它就是不问题了.
在恢复数据库之后立刻调用调用连接对象的ClearPoool方法来清除这些连接池是失效的连接,也可以调用SqlConnection.ClearAllPools()方法来清理所有连接的连接池.
问题就这样迎刃而解了.
这个情况是通常是因为SQL Server遇到了一些Issues而不得不去刷新所有的连接,但是ADO.net仍然认为这些连接是有效的,而其实,可能在使用的过程中,某些连接早已失效。
看来问题出在SQL的连接上了.而且是过期的连接影响了正常的刷新.知道了问题的根源,解决它就是不问题了.
在恢复数据库之后立刻调用调用连接对象的ClearPoool方法来清除这些连接池是失效的连接,也可以调用SqlConnection.ClearAllPools()方法来清理所有连接的连接池.
问题就这样迎刃而解了.
相关文章推荐
- 网站错误记录:A transport-level error has occurred when sending the request to the server.
- "A transport-level error has occurred when sending the request to the server"的解决办法
- "A transport-level error has occurred when sending the request to the server"的解决办法
- "A transport-level error has occurred when sending the request to the server,指定的网络名不在可用"的解决办法
- "A transport-level error has occurred when sending the request to the server"的解决办法
- 解决Windows server 2012 R2 系统使用IIS8浏览Asp程序出现"An error occurred on the server when processing the URL"错误
- 1.flex工程报错出现每次打开窗口的时候都会弹出一个窗口提示错误,提示“a problem has occurred when opening project "your project name",try to restart the applicat
- 解决IIS7中出现An error occurred on the server when processing the URL错误提示的方法
- 解决IIS7中出现An error occurred on the server when processing the URL错误提示的方法
- 解决IIS7中出现An error occurred on the server when processing the URL错误提示的方法
- IIs 中运行asp程序出现“An error occurred on the server when processing the URL. Please contact the system administrator.”错误
- 解决IIS7中出现An error occurred on the server when processing the URL错误提示的方法
- [Asp]解决IIS7中出现An error occurred on the server when processing the URL错误提示的方法
- 解决IIS7中出现An error occurred on the server when processing the URL错误提示的方法
- 解决IIS7中出现An error occurred on the server when processing the URL错误提示的方法
- 解决IIS7中出现An error occurred on the server when processing the URL错误提示的方法
- [找到问题了.Net丫丫]TCP Provider, error: 0 - A transport-level error has occurred when receiving results f 您的主机中的软件放弃了一个已建立的连接
- 打开asp出现An error occurred on the server when processing the URL
- ARCSDE直连Oracle时出现错误Failed to connect to the specified server. Underlying DBMS error[ORA-12154: TNS:could not resolve the connect identifier specified. No extended error]
- Python 出现错误 SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform.