C
Cat
I'm developing a basic WebRequest and WebResponse to access and
display an RSS Feed. I know the xml exists cause I can navigate to the
page but debugging through my code returns a 404 error.
Below is my code:
Dim objRequest As WebRequest
Dim objResponse As WebResponse
Dim objStreamWriter As StreamWriter
Dim objStreamReader As StreamReader
Dim strReturned As String
Dim domResponse As XmlDocument
Dim myProxy As New System.Net.WebProxy("http://............gov.uk:
0000", True)
myProxy.Credentials = New System.Net.NetworkCredential("login",
"password", "domain")
objRequest = WebRequest.Create("XMLFeedLocation")
objRequest.Method = "GET"
objRequest.Proxy = myProxy
objResponse = objRequest.GetResponse()
objStreamReader = New StreamReader(objResponse.GetResponseStream(),
System.Text.Encoding.UTF7)
strReturned = objStreamReader.ReadToEnd()
domResponse = New XmlDocument
domResponse.LoadXml(strReturned)
GetXMLViaHTTP = domResponse
Is there anything I am missing?
Cheers
Cat
display an RSS Feed. I know the xml exists cause I can navigate to the
page but debugging through my code returns a 404 error.
Below is my code:
Dim objRequest As WebRequest
Dim objResponse As WebResponse
Dim objStreamWriter As StreamWriter
Dim objStreamReader As StreamReader
Dim strReturned As String
Dim domResponse As XmlDocument
Dim myProxy As New System.Net.WebProxy("http://............gov.uk:
0000", True)
myProxy.Credentials = New System.Net.NetworkCredential("login",
"password", "domain")
objRequest = WebRequest.Create("XMLFeedLocation")
objRequest.Method = "GET"
objRequest.Proxy = myProxy
objResponse = objRequest.GetResponse()
objStreamReader = New StreamReader(objResponse.GetResponseStream(),
System.Text.Encoding.UTF7)
strReturned = objStreamReader.ReadToEnd()
domResponse = New XmlDocument
domResponse.LoadXml(strReturned)
GetXMLViaHTTP = domResponse
Is there anything I am missing?
Cheers
Cat