Here is my code, I would like to get all the files under to local destination.
And I keep getting this error message "UnauthorizedAccessException: Access to the path 'c:\inetpub\wwwroot\IVRS_XML\Download' is denied. at "
Any suggestion will help..... :?
Public Function FtpDownload() As String
Dim localPath
Try
localPath = Server.MapPath("/") & ("\IVRS_XML\Download")
Dim ftp = New FTPClient()
ftp.RemoteHost = "ftp.******com"
ftp.Connect()
ftp.Login("******", "******")
ftp.ConnectMode = FTPConnectMode.ACTIVE
ftp.TransferType = FTPTransferType.BINARY
ftp.ChDir("/users/******/******/")
ftp.Get(localPath, "*.xml")
ftp.Quit()
Catch ex As Exception
Return (ex.ToString())
End Try
Return "download sucessfull"
End Function