Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using FTP and clearing out memory
Message
De
25/04/2013 14:39:55
 
 
À
25/04/2013 13:56:13
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01571897
Message ID:
01571903
Vues:
38
I am not sure it this could help but it cannot hurt, I am using the Using\End Using approach to encapsulate the StreamReader class:
                        ' FTP setup
                        loFtpWebRequest = System.Net.FtpWebRequest.Create(New Uri(lcURI))
                        loFtpWebRequest.Credentials = New System.Net.NetworkCredential(cUsername, cPassword)
                        loFtpWebRequest.Method = System.Net.WebRequestMethods.Ftp.ListDirectoryDetails

                        ' If we use FTP/SSL  (AUTH SSL)
                        If nNoFTPProtocol = 2 Then
                            loFtpWebRequest.EnableSsl = True
                        End If

                        loFtpWebResponse = loFtpWebRequest.GetResponse()

                        Using loStreamReader As New StreamReader(loFtpWebResponse.GetResponseStream())

                            ' Load the files into the string builder
                            loStringBuilder.LoadString(loStreamReader.ReadToEnd())

                        End Using
This is the part that deals with memory so maybe this could have been a factor.
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform