url="FTP://MyFTPSite" Public Function DownloadFile(ByVal url As String) As Byte() 'If you have a valid user name and password, then supply it here ' This assumes an annonymous user Dim userName As String = "MyUserName" Dim password As String = "xxxxx" 'Create Credentials to include user name and password Dim Creds As System.Net.NetworkCredential Creds = New System.Net.NetworkCredential(userName, password) 'Create the WebClient and provide the credentials Dim request As New Net.WebClient request.Credentials = Creds 'Check to see if file exits. If request.DownloadData(url).Rank > 0 Then 'Download the file to a byte array Dim fileData As Byte() = request.DownloadData(url) Return fileData Else Return Nothing End If End Function
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.