A
Alan Gillott
Can anyone offer a words of one syllable explanation of this error? I've
scoured all the samples I can find, and my code appears to reflect everyone
elses and no samples seem to handle errors. Here's the code:
Private Function DoFTPRequest(ByVal url As String, ByVal method As String,
ByVal usebinary As Boolean, ByRef data As stream) As FtpStatusCode
'Imports System.Net
'Imports System.IO
Dim result As FtpStatusCode
Dim req As FtpWebRequest
Dim resp As FtpWebResponse
Dim creds As New NetworkCredential("anonymous", "(e-mail address removed)")
creds.UserName = "anonymous" 'For testing
creds.Password = "(e-mail address removed)"
req = DirectCast(WebRequest.Create(url), FtpWebRequest)
With req
''''''.Credentials = creds
.UseBinary = usebinary
.UsePassive = True
.KeepAlive = True
'.Method = method
.Method = "LIST"
resp = .GetResponse()
data = resp.GetResponseStream
result = resp.StatusCode
End With
Return result
End Function
It seems to give me the samer error with or without credentials. I'm
inclined to suspect an infrastructure or installation issue.
A
scoured all the samples I can find, and my code appears to reflect everyone
elses and no samples seem to handle errors. Here's the code:
Private Function DoFTPRequest(ByVal url As String, ByVal method As String,
ByVal usebinary As Boolean, ByRef data As stream) As FtpStatusCode
'Imports System.Net
'Imports System.IO
Dim result As FtpStatusCode
Dim req As FtpWebRequest
Dim resp As FtpWebResponse
Dim creds As New NetworkCredential("anonymous", "(e-mail address removed)")
creds.UserName = "anonymous" 'For testing
creds.Password = "(e-mail address removed)"
req = DirectCast(WebRequest.Create(url), FtpWebRequest)
With req
''''''.Credentials = creds
.UseBinary = usebinary
.UsePassive = True
.KeepAlive = True
'.Method = method
.Method = "LIST"
resp = .GetResponse()
data = resp.GetResponseStream
result = resp.StatusCode
End With
Return result
End Function
It seems to give me the samer error with or without credentials. I'm
inclined to suspect an infrastructure or installation issue.
A