Home All Groups Group Topic Archive Search About

SQL Connection An existing connection was forcibly closed by the r

Author
15 Jan 2007 10:27 AM
Martin
Hi
I keep seeing this exception in my logs
Sql client Connection -An existing connection was forcibly closed by the
remote host.

What is this a bug -  how do you trap this exception and get ado to open a
real connection and retry the query?   why does ado.net not know the
connection is no longer valid if the tcp scoket has closed?

any ideas of a work around or fix for this bug?

Author
15 Jan 2007 7:24 PM
Mary Chipman [MSFT]
For ADO.NET to know if the connection was valid, it would have to
continuously poll the server to check up on it, which would kill
performance :)

You need to create an exception handler in your code that tries to
reopen a closed connection (or takes other action as appropriate).

--Mary

On Mon, 15 Jan 2007 02:27:01 -0800, Martin
<Mar***@discussions.microsoft.com> wrote:

Show quote
>Hi
>I keep seeing this exception in my logs
>Sql client Connection -An existing connection was forcibly closed by the
>remote host.
>
>What is this a bug -  how do you trap this exception and get ado to open a
>real connection and retry the query?   why does ado.net not know the
>connection is no longer valid if the tcp scoket has closed?
>
>any ideas of a work around or fix for this bug?

AddThis Social Bookmark Button