Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The underlying connection was closed
Message
De
10/07/2010 03:08:27
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
The underlying connection was closed
Versions des environnements
Environment:
VB 9.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01472129
Message ID:
01472129
Vues:
84
I am using loFtpWebRequest to download a file from a server. Yesterday, I had to adjust the method to support big files such as 2.2 GB. The download works but will fail after 2 hours giving this message:

The underlying connection was closed: An unexpected error occured on a receive.

This happens when the download is at about 55%.

This is a portion of the code which demonstrates the object used for the download:
                ' FTP setup
                loFtpWebRequest = System.Net.FtpWebRequest.Create(New Uri(lcURI))
                loFtpWebRequest.Credentials = New System.Net.NetworkCredential(cUsername, cPassword)
                loFtpWebRequest.Method = System.Net.WebRequestMethods.Ftp.DownloadFile
                loFtpWebRequest.UseBinary = True
                loFtpWebRequest.UsePassive = True

                loFtpWebResponse = loFtpWebRequest.GetResponse()

                loStream = loFtpWebResponse.GetResponseStream()
I am not sure if this could be related since I changed the mode to UsePassive=True yesterday.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform