I am trying to get a datagrid on my webform to be populated from a website which is basically a text file (i.e.
I tried:
but it claims "the underlying connection was closed". I think the problem lies with the proxy settings, but I can not figure out what (it works fine as a windows form)
I tried:
Code:
Username = "name"
Password = "pswd"
myWebRequest = WebRequest.Create("[URL unfurl="true"]www.aaa.com/bbb.txt")[/URL]
myProxy = CType(myWebRequest.Proxy, WebProxy)
myProxy.Credentials = New NetworkCredential(Username, Password)
myStream = myClient.OpenRead("[URL unfurl="true"]www.aaa.com/bbb.txt")[/URL]
sr = New StreamReader(myStream)
Dim line As String
fileText = sr.ReadToEnd
sr.Close()
' then a regular expression to put everything in the correct column