Can uriWebsite point to a password protected area, for example a htaccess protected area.
Dim uriWebsite AsNew Uri("http://www.mywebsite.com/testfile.txt")
Dim WReq As WebRequest = WebRequest.Create(uriWebsite)
Dim wResp As WebResponse = WReq.GetResponse()
Dim sr AsNew StreamReader(wResp.GetResponseStream(), Encoding.ASCII)
Dim aTokens() AsString
Dim Tokens AsInteger = 0
Dim LoopCount AsInteger = 0
MsgBox(wResp.ContentLength.ToString)
For LoopCount = 0 To wResp.ContentLength
3166 - aTokens = sr.ReadLine().Split(",")
Tokens += 1
Next
MsgBox(Tokens.ToString)
Dim uriWebsite AsNew Uri("http://www.mywebsite.com/testfile.txt")
Dim WReq As WebRequest = WebRequest.Create(uriWebsite)
Dim wResp As WebResponse = WReq.GetResponse()
Dim sr AsNew StreamReader(wResp.GetResponseStream(), Encoding.ASCII)
Dim aTokens() AsString
Dim Tokens AsInteger = 0
Dim LoopCount AsInteger = 0
MsgBox(wResp.ContentLength.ToString)
For LoopCount = 0 To wResp.ContentLength
3166 - aTokens = sr.ReadLine().Split(",")
Tokens += 1
Next
MsgBox(Tokens.ToString)
Last edited: