Hello, I'm trying to access a text file from web site using the code below but I get an error message stating "The remote server returned an error: (401) unauthorized
If I manually click on the link I can get to the document but I get the error above when trying to access the document via code.
I did make sure that my text document was set up with read write for network services also but still get the error message.
Any ideas what I might be doing wrong?
The error I get appears on this line of code
By the way the link in the code example is not the real link I'm using but meant just for demonstration purposes so it will not work if you try it.
If I manually click on the link I can get to the document but I get the error above when trying to access the document via code.
I did make sure that my text document was set up with read write for network services also but still get the error message.
Any ideas what I might be doing wrong?
Using Client = New Net.WebClient() Dim Text As String = Client.DownloadString("http://website.com/Testfolder/SystemList.txt") MsgBox(Text) End Using
The error I get appears on this line of code
Client.DownloadString("http://website.com/Testfolder/SystemList.txt")
By the way the link in the code example is not the real link I'm using but meant just for demonstration purposes so it will not work if you try it.