Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 887126 - Last Review: October 15, 2004 - Revision: 1.2
Setting the SqlCommand.CommandTimeout property to zero may cause a General Network Error
The
CommandTimeout property of the
SqlCommand class is
set to zero. Zero is an infinite timeout. When a response from an instance of Microsoft
SQL Server is broken into more than one network packet, the connection will be
incorrectly closed, and a General Network Error will occur.
To resolve this problem, use one of the following methods:
- Use a large value such as 7200 for the
CommandTimeout property.
- Apply the hotfix in the
following Microsoft Knowledge Base article:
823679Â
(http://kbalertz.com/Feedback.aspx?kbNumber=823679/
)
FIX: Multiple fixes for SQL Server .NET Data Provider
Note This problem occurs in both the Microsoft .NET Framework 1.0 and
the Microsoft .NET Framework 1.1. However, the hotfix is only available for the .NET Framework 1.1.
This
behavior is by design.
You can detect this problem in a network monitor trace if
you run a query, and then you retrieve more than one packet of data at a time. By
default, the SqlClient packet size is 8 kilobytes (KB). However, in the network
monitor trace the packet may appear as multiple physical network packets that
total 8 KB when added together. After you receive the first packet, the
connection is closed with an ACK+FIN packet. SQL Server will continue to send
data afterward. The behavior causes a TCP/IP connection reset and causes the error.
For additional information, click the following article numbers to view the
articles in the Microsoft Knowledge Base:
827422 Â
(http://kbalertz.com/Feedback.aspx?kbNumber=827422/
)
How to troubleshoot connectivity issues in SQL Server 2000
875285 Â
(http://kbalertz.com/Feedback.aspx?kbNumber=875285/
)
TechNet Support WebCast: Known connectivity issues related to "General Network Error" error messages
APPLIES TO
- Microsoft .NET Framework 1.1
- Microsoft .NET Framework 1.0
| kbsqlclient kbconnectivity kbtshoot kbprb KB887126 |
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate