T
TCB
I am getting this error while tryin to read the contents of a Web page so I
can send them in an email:
"Too many automatic redirections were attempted."
This is the code I am using
Private Function readHtmlPage(ByVal url As String) As [String]
Dim result As [String]
Dim objResponse As WebResponse
Dim objRequest As WebRequest = System.Net.HttpWebRequest.Create(url)
objResponse = objRequest.GetResponse()
Dim sr As New StreamReader(objResponse.GetResponseStream())
Try
result = sr.ReadToEnd()
' Close and clean up the StreamReader
sr.Close()
Finally
sr.Dispose()
End Try
Return result
End Function
I cannot find any documentation on how to fix this problem.
THANKS!
can send them in an email:
"Too many automatic redirections were attempted."
This is the code I am using
Private Function readHtmlPage(ByVal url As String) As [String]
Dim result As [String]
Dim objResponse As WebResponse
Dim objRequest As WebRequest = System.Net.HttpWebRequest.Create(url)
objResponse = objRequest.GetResponse()
Dim sr As New StreamReader(objResponse.GetResponseStream())
Try
result = sr.ReadToEnd()
' Close and clean up the StreamReader
sr.Close()
Finally
sr.Dispose()
End Try
Return result
End Function
I cannot find any documentation on how to fix this problem.
THANKS!