Get rss feed through proxy server
- From: "Gekke Henkie" <GekkeHenkie@xxxxxxxxxxx>
- Date: Thu, 20 Mar 2008 14:04:20 +0100
Hi All,
Hopefully someone can help me out with an issue we have at a customer of
ours.
The following code is tested to retrieve a rss feed through a proxy server.
Public Function GetRssFeed(ByVal UriAddress As String, ByVal ProxyServer As
String) As IO.Stream
Dim wClient As New Net.WebClient()
''' ProxyServer ="http://myproxy.com:port"
If Trim(ProxyServer).Length > 0 Then
Dim newUri As Uri = Nothing
Dim myProxy As System.Net.WebProxy = Nothing
myProxy = New System.Net.WebProxy
newUri = New Uri(ProxyServer)
myProxy.Credentials = New System.Net.NetworkCredential(UserID, Password)
myProxy.Address = newUri
wClient.Proxy = myProxy
End If
Return wClient.OpenRead(UriAddress)
End Function
Is this the proper way to achieve that?
Because it seems the rss feed can be retrieved in IE or another rss reader
tool at a PC at the customer's site, but not with this piece of code.
They weren't able to get any data from the feed.
They did get "407 proxy authentication required" when specifying any proxy
server details at all or "502 Bad gateway" when they did.
Since we don't have access to this customer's proxy server (URI nor
credentials) or any of our own, I would like to ask you to verify if the
code is correct to start with.
Thanks in advance!
Hans.
.
- Prev by Date: Re: Cant use DoEvents in WPF application
- Next by Date: Re: Variable Inside Variable
- Previous by thread: Call a javascript function via vb.net in a webbrowser control
- Next by thread: Setting up a Serial COM port for the first time I get an error message
- Index(es):
Relevant Pages
|