Reading a file in the internet
-
I need to read the contents of a file that is located in the internet. The problem is that this file is located in a folder that needs username "ukkeli" and password "hattu123". I'm using the code below: Dim myWebClient As New System.Net.WebClient 'the webclient Dim file As New System.IO.StreamReader(myWebClient.OpenRead("http://www.examplesite.com/subdir/file.txt")) Dim Contents As String = file.ReadToEnd() file.Close() How can I make the application to give the needed username and password automatically?
-
I need to read the contents of a file that is located in the internet. The problem is that this file is located in a folder that needs username "ukkeli" and password "hattu123". I'm using the code below: Dim myWebClient As New System.Net.WebClient 'the webclient Dim file As New System.IO.StreamReader(myWebClient.OpenRead("http://www.examplesite.com/subdir/file.txt")) Dim Contents As String = file.ReadToEnd() file.Close() How can I make the application to give the needed username and password automatically?