473,406 Members | 2,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

frequent Sql exception

Hey all,

We get the following error on a lot of our .net application and we are not
sure why? I notice that it happens like a timeout issue like if you leave for
several minutes. Can someone please confirm this is what actuall is happening?

Exception of type 'System.Web.HttpUnhandledException' was thrown.

System.Data.SqlClient.SqlException: A transport-level error has occurred
when sending the request to the server. (provider: TCP Provider, error: 0 -
An existing connection was forcibly closed by the remote host.) at

thanks,
rodchar
Jun 19 '07 #1
2 4279
Well, what are you trying to do when the exception is thrown? Have you
debugged this and seen where the exception is thrown?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"rodchar" <ro*****@discussions.microsoft.comwrote in message
news:37**********************************@microsof t.com...
Hey all,

We get the following error on a lot of our .net application and we are not
sure why? I notice that it happens like a timeout issue like if you leave
for
several minutes. Can someone please confirm this is what actuall is
happening?

Exception of type 'System.Web.HttpUnhandledException' was thrown.

System.Data.SqlClient.SqlException: A transport-level error has occurred
when sending the request to the server. (provider: TCP Provider, error:
0 -
An existing connection was forcibly closed by the remote host.) at

thanks,
rodchar

Jun 19 '07 #2
On 19 Jun., 16:19, rodchar <rodc...@discussions.microsoft.comwrote:
Hey all,

We get the following error on a lot of our .net application and we are not
sure why? I notice that it happens like a timeout issue like if you leave for
several minutes. Can someone please confirm this is what actuall is happening?

Exception of type 'System.Web.HttpUnhandledException' was thrown.

System.Data.SqlClient.SqlException: A transport-level error has occurred
when sending the request to the server. (provider: TCP Provider, error: 0 -
An existing connection was forcibly closed by the remote host.) at

thanks,
rodchar
Its a little difficult to say without further information, but is it
possible that you use the same connection in different methods, not
closing it when a method is done?
This would leave the connection always open, but as long as you do
something that transmits information it would never time out, when you
stop working with the application no more data is sent and the
connection would eventually time out, causing the server to close it.
In general I would suggest always opening connections when they are
needed and closing them as soon as you have received the information
you need.
Due to connection pooling the impact on performance is virtually nil,
but it keeps strange bugs like this one from occuring.

hth,
Kevin Wienhold

Jun 20 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Rune | last post by:
Hi, I'm developing web surveys where users logon to a web survey and answer up to about 50 questions, one after the other, shown only one question at a time. The answers are saved in a database....
3
by: D Denholm | last post by:
I am a Access newbie... Hopefully somebody can help me figure this out. I have a database that looks like: Asset Economic Minimum ----- ---------------- 10555 ...
5
by: Upendra Agnihotram | last post by:
Hi, I am having Client-Server Access application. The source db resides on WinNT Server and some of the client systems are on Windows 2000 Professional. These days i am experiencing frequent...
26
by: Ben Pfaff | last post by:
Over the last couple of years, and especially recently, I've built up a few "stock" answers that supplement the C FAQ. If anyone wants to review and comment on them, I've just now put them up on...
44
by: craig | last post by:
I am wondering if there are some best practices for determining a strategy for using try/catch blocks within an application. My current thoughts are: 1. The code the initiates any high-level...
0
by: Thotatri | last post by:
hi, I am facing a session time out problem once after installing .net framework 1.1 . The problem is session is getting expired on frequently say 5 mts like that.I have good configuration &...
2
by: Matthew Wilson | last post by:
I'm a noob SQL user, crossing over from SAS. I have a table with about 200k rows and one of the columns is empssn, which holds the employee social security number. The same empssn may appear in...
0
by: Thomas G. Marshall | last post by:
A friend of mine is making simple web pages for clients only interested in the basic web presence. She has bumped into a couple clients however that would like to branch into online purchasing,...
2
by: manojdagar | last post by:
Wrie a function which returns the most frequent number in a list of integers. Handle the case of more than one number which meets this criterion. public static int GetFrequency(int list)
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.