G
Greg
Hi. This error is intermittent, and we can't figure out why it
happens. Otherwise, the request is successful, and we get the
response we expect. Here's the code (some variable declarations not
shown, but exist):
Dim sr As IO.StreamReader
Dim objResponse As Net.HttpWebResponse
Dim objRequest As Net.HttpWebRequest =
Net.WebRequest.Create(strURL)
objRequest.Method = "GET"
objResponse = objRequest.GetResponse()
sr = New IO.StreamReader(objResponse.GetResponseStream())
strXML = sr.ReadToEnd()
sr.Close()
sr = Nothing
strURL points to a server on our network (Intranet). Exception occurs
when sr.ReadToEnd() is called, and even when this happens,
objResponse.StatusCode and objResponse.StatusDescription are "200" and
"OK", respectively. And the streamreader always gets closed,
exception or not.
Thanks for any help.
happens. Otherwise, the request is successful, and we get the
response we expect. Here's the code (some variable declarations not
shown, but exist):
Dim sr As IO.StreamReader
Dim objResponse As Net.HttpWebResponse
Dim objRequest As Net.HttpWebRequest =
Net.WebRequest.Create(strURL)
objRequest.Method = "GET"
objResponse = objRequest.GetResponse()
sr = New IO.StreamReader(objResponse.GetResponseStream())
strXML = sr.ReadToEnd()
sr.Close()
sr = Nothing
strURL points to a server on our network (Intranet). Exception occurs
when sr.ReadToEnd() is called, and even when this happens,
objResponse.StatusCode and objResponse.StatusDescription are "200" and
"OK", respectively. And the streamreader always gets closed,
exception or not.
Thanks for any help.