473,856 Members | 1,601 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Odd error in transport connection.

After six months flawless operation, I'm suddenly getting this error:
"Unable to read data from the transport connection." The code* hasn't
changed, and from what I can see, neither have the IP address, network
card, security protocols, etc. The code works fine on other machines,
but the critical one -- the one it's supposed to work on -- fails. The
stack trace** doesn't seem to help me out, but I thought perhaps someone
here could shed some light on where the problem might be occurring.

Thanks for any pointers!



=============== =============== ===
HttpWebResponse oResponse = null;
HttpWebRequest oRequest = null;
Stream data = null;
StreamReader reader = null;

// Get HTML data
int tmp = ServicePointMan ager.DefaultCon nectionLimit;
oRequest = (HttpWebRequest )WebRequest.Cre ate(strURL);
oRequest.KeepAl ive = false;
oRequest.Timeou t = 10000; // 10 seconds
oRequest.UserAg ent = "Web Client";
oResponse = (HttpWebRespons e)oRequest.GetR esponse();
if (oResponse.Stat usCode == HttpStatusCode. OK)
data = oResponse.GetRe sponseStream();

reader = new StreamReader(da ta);

//Read from start the finish, line by line.
while ((thisRow = reader.ReadLine ()) != null)
//do a bunch of stuff
}//end HttpWebResponse status code test
strError = "Bad HttpWebRequest status.";
oResponse.Close ();
catch(WebExcept ion e)
emit(e.Message + " Status: " + e.Status);
catch (Exception ex)
emit(ex.Message + "\n" + ex.StackTrace);
if (reader != null){reader.Cl ose();}
if(data != null){data.Clos e();}
if(oResponse != null){oResponse .Close();}

=============== =============== =

**Error & Stack Trace
=============== =============== =
Unable to read data from the transport connection
at System.Net.Sock ets.NetworkStre am.BeginRead(By te[] buffer, Int32
offset, Int32 size, AsyncCallback callback, Object state)
at System.Net.Conn ection.BeginRea d(Byte[] buffer, Int32 offset,
Int32 size, AsyncCallback callback, Object state)
at System.Net.Conn ectStream.Inter nalBeginRead(In t32 bytesToRead,
NestedSingleAsy ncResult castedAsyncResu lt, Boolean fromCallback)
at System.Net.Conn ectStream.Begin ReadWithoutVali dation(Byte[]
buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state)
at System.Net.Conn ectStream.Begin Read(Byte[] buffer, Int32 offset,
Int32 size, AsyncCallback callback, Object state)
at System.Net.Conn ectStream.Read( Byte[] buffer, Int32 offset, Int32
at System.IO.Strea mReader.ReadBuf fer()
at System.IO.Strea mReader.ReadLin e()
at nsImport13F.Imp ortThirteenF.wr iteHoldingstoDB (String strURL)" at
=============== =============== =
Jun 1 '06 #1
0 1322

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

Similar topics

by: Muscha | last post by:
Hello, Every now and then my application throw this exception: "Unable to read data from the transport connection" And when I break into the Visual Studio, the thread where it failed has none of my code and the following is the call stack:
by: Latha Rajeev | last post by:
Hi, I have an application which sends out mails(using CDO), the SMTP Server being a machine which is one the same network. Most times, the mails are sent out successfully but every once in a while, the app reports the following error: "The message could not be sent to the SMTP server. The transport error code was 0x800ccc0b. The server response was not available.". Also at times i get the following error:"The transport
by: Alan Pretre | last post by:
I have an application installed at a customer site that has been getting a general network error for a couple of years. I was hoping that .NET 2.0 would clear it up, but unfortunately it didn't. The .NET 2.0 exception does give a little more info than .NET 1.1 did, but not much. Can anybody give any pointers about how to track this down? It occurs every 10 hrs around the clock, like clockwork. I have included the stack trace, but...
by: Shilpa | last post by:
I am getting the following error. A transport-level error has occurred when sending the request to the server. (provider: Shared Memory Provider, error: 0 - The system cannot open the file.) On performing the same operation again, it happens fine without any error. Please help. Regards,
by: Terrance | last post by:
I'm trying to create a small messenger program that uses the tcpclient and tcplistenter objects. When I start the application and run the thread that fires the tcplistener; once the client sends data then closes the stream and the connection I receive the message Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. How can I keep the connection listener listening for new traffic?...
by: Nathan Sokalski | last post by:
I am attempting to send an email using ASP.NET 1.1's Mail.SmtpMail.Send() method. My code contains all of the following: Dim mailmsg As New Mail.MailMessage Mail.SmtpMail.SmtpServer = System.Configuration.ConfigurationSettings.AppSettings("smtpserver") mailmsg.BodyFormat = Mail.MailFormat.Text mailmsg.Subject = "My Subject"
by: palmem | last post by:
I am trying to write a simple FTP server in order to learn about sockets This is my first time trying sockets This code should take a connection on port 8110, dump it to a client "thread" (not a thread yet), print "Test\n" to the thread, and close everything. It fails on creating the client thread with error 106: 'Transport endpoint is already connected'
by: satnamsarai | last post by:
Using System.Net.Mail: Sometimes I get error 'failure sending mail. Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.' Not sure how to fix this error. I am able to send messages sometimes both other times randomly following error appear EXCEPTION:
by: louis08 | last post by:
When i connect to the server i get a BufferOverflowException, HELP!!!! This is where the error is thrown. final Transport transport = new TCPTransport(client);
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.