Imports System.IO
Imports System.Net
Imports System.Text
public class MainClass
Shared Sub Main()
Dim myWebRequest As WebRequest = WebRequest.Create("http://www.domain.com")
myWebRequest.PreAuthenticate = True
Dim UserName As String = Console.ReadLine()
Dim Password As String = Console.ReadLine()
Dim networkCredential As New NetworkCredential(UserName, Password)
myWebRequest.Credentials = networkCredential
Dim myWebResponse As WebResponse = myWebRequest.GetResponse()
End Sub
End Class