none
weird stream issues RRS feed

  • Question

  • I will paste the exceptions that I hav received. Baically what is happening is my code will run a program that downloads data from all tables in my database. The problem I occurs when it gets halfway through the list of tables. It downloads the data just fine but when it runs for around 10-12 hours, it will give different exceptions. Some of them are below:

    System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
       at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
       --- End of inner exception stack trace ---
       at System.Net.ConnectStream.Read(Byte[] buffer, Int32 offset, Int32 size)
       at System.IO.StreamReader.ReadBuffer()
       at System.IO.StreamReader.ReadLine()
       at SuperStockScraper.Engine.wc_OpenReadCompletedHistoric(Object sender, OpenReadCompletedEventArgs e) in C:\Users\cheatcountry\Desktop\SuperStockScraper\SuperStockScraper\Engine.cs:line 59


    System.Reflection.TargetInvocationException: An exception occurred during the operation, making the result invalid.  Check InnerException for exception details. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 69.***.**.***:80
       at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
       at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
       --- End of inner exception stack trace ---
       at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
       at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)
       at System.Net.WebClient.OpenReadAsyncCallback(IAsyncResult result)
       --- End of inner exception stack trace ---
       at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()
       at System.Net.OpenReadCompletedEventArgs.get_Result()
       at SuperStockScraper.Engine.wc_OpenReadCompletedAnnual(Object sender, OpenReadCompletedEventArgs e) in C:\Users\cheatcountry\Desktop\SuperStockScraper\SuperStockScraper\Engine.cs:line 349



    System.Reflection.TargetInvocationException: An exception occurred during the operation, making the result invalid.  Check InnerException for exception details. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 69.***.**.***:80
       at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
       at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
       --- End of inner exception stack trace ---
       at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
       at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)
       at System.Net.WebClient.OpenReadAsyncCallback(IAsyncResult result)
       --- End of inner exception stack trace ---
       at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()
       at System.Net.OpenReadCompletedEventArgs.get_Result()
       at SuperStockScraper.Engine.wc_OpenReadCompletedProperties(Object sender, OpenReadCompletedEventArgs e) in C:\Users\cheatcountry\Desktop\SuperStockScraper\SuperStockScraper\Engine.cs:line 433





    System.Reflection.TargetInvocationException: An exception occurred during the operation, making the result invalid.  Check InnerException for exception details. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
       at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
       at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
       --- End of inner exception stack trace ---
       at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
       at System.Net.PooledStream.EndRead(IAsyncResult asyncResult)
       at System.Net.Connection.ReadCallback(IAsyncResult asyncResult)
       --- End of inner exception stack trace ---
       at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
       at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)
       at System.Net.WebClient.OpenReadAsyncCallback(IAsyncResult result)
       --- End of inner exception stack trace ---
       at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()
       at System.Net.OpenReadCompletedEventArgs.get_Result()
       at SuperStockScraper.Engine.wc_OpenReadCompletedAnnual(Object sender, OpenReadCompletedEventArgs e) in C:\Users\cheatcountry\Desktop\SuperStockScraper\SuperStockScraper\Engine.cs:line 349
    • Edited by cheatcountry Friday, September 19, 2008 8:56 AM
    • Moved by jack 321 Tuesday, September 23, 2008 7:21 AM off topic (Moved from Visual C# General to Off-Topic Posts (Do Not Post Here))
    Friday, September 19, 2008 8:19 AM

All replies