Get rss feed through proxy server



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.


.



Relevant Pages

  • Re: up2date / Tum
    ... > am unable to retrieve them. ... > I recieve the error: ... > I am behind a proxy server that requires User and Password settings. ...
    (Fedora)
  • How get file via FTP in vbscript
    ... Can anyone give me a heads-up on how to retrieve a file ... via FTP through a proxy server? ...
    (microsoft.public.scripting.vbscript)
  • Setting of internet proxy via active directory
    ... I could set all pc within my domain to use a particular proxy server ... using active directory policy. ... to retrieve that proxy server information while other pc could not? ...
    (microsoft.public.windows.server.active_directory)