S
Simon Harris
Hi,
I am trying to build a function to output an RSS feed to a dataset. Code
below shows how far I have got.
I am having problems getting past our proxy (ISA). Sorry, cant remember
the
exact error now, but I'm pretty sure I need to be requesting the data as
an
authenticated user.
As you can see, I've tried using WebProxy for this - I'm just not sure how
to tell the XmlTextReader to use the proxy object.
Any help will be appreciated.
Many Thanks,
Simon.
Function GetRSSFeed(ByVal RSSURL As String) As DataSet
'Setup Proxy
Dim myProxy As New
System.Net.WebProxy("http://MYPROXYADDRESS:8080",
True)
myProxy.Credentials = New
System.Net.NetworkCredential("MYUSERNAME",
"MYPASSWORD", "MYDOMAIN")
'Set up XML reader
Dim reader As System.Xml.XmlTextReader = New
System.Xml.XmlTextReader(RSSURL)
Dim ds As DataSet = New DataSet
'Get and return data
ds.ReadXml(reader)
Return ds
End Function
I am trying to build a function to output an RSS feed to a dataset. Code
below shows how far I have got.
I am having problems getting past our proxy (ISA). Sorry, cant remember
the
exact error now, but I'm pretty sure I need to be requesting the data as
an
authenticated user.
As you can see, I've tried using WebProxy for this - I'm just not sure how
to tell the XmlTextReader to use the proxy object.
Any help will be appreciated.
Many Thanks,
Simon.
Function GetRSSFeed(ByVal RSSURL As String) As DataSet
'Setup Proxy
Dim myProxy As New
System.Net.WebProxy("http://MYPROXYADDRESS:8080",
True)
myProxy.Credentials = New
System.Net.NetworkCredential("MYUSERNAME",
"MYPASSWORD", "MYDOMAIN")
'Set up XML reader
Dim reader As System.Xml.XmlTextReader = New
System.Xml.XmlTextReader(RSSURL)
Dim ds As DataSet = New DataSet
'Get and return data
ds.ReadXml(reader)
Return ds
End Function