RSS Web Part & Proxy: For Internal URL: Error "The remote server returned an error: (503) Server Unavailable"
-
Monday, January 12, 2009 9:44 AMHi All,
I am developing RSS Web Parts and facing an issue.
The RSS Web Part will be able to accept various RSS URLs in its property then load into the web part.
The issue is I can't definitely define which URLs is from internet(will have to go through proxy) or local one.
So I am trying to use HttpWebRequest to handle this automatically. I am not sure if it's possible. Please advise.
Currently my code is:
Dim request As HttpWebRequest = CType(WebRequest.Create(url), HttpWebRequest)
Dim response As HttpWebResponse = Nothing
request.Credentials = CredentialCache.DefaultCredentials
request.Proxy = proxy
response = CType(request.GetResponse(), HttpWebResponse)
And I am unable to get response from the internal RSS URLs, but it works fine for URLs from internet.
With the internal RSS URLs, its throw "The remote server returned an error: (503) Server Unavailable".
Any suggestion on how to deal with issue?
Thanks in advance!
Vuthy
Vuthy
All Replies
-
Monday, January 12, 2009 12:33 PM
in case your MOSS server needs proxy to access internet, you have to mention that in its web.config.
<system.net>
<defaultProxy>
<proxy autoDetect="true" proxyaddress="YOURPROXYSERVER" bypassonlocal="true" />
</defaultProxy>
</system.net>
Gautham S Pai | Posting is provided "AS IS" with no warranties, and confers no rights.- Marked As Answer by Michael Washam - MSFT Tuesday, January 13, 2009 3:57 PM
-
Thursday, January 15, 2009 3:23 AMHi Gautham,
Thanks for your help, but I still have no luck. The moment I add it to my web.config, both external and internal URLs through error. I am still struggling on it.
Thanks,
Vuthy
Vuthy -
Thursday, January 15, 2009 4:18 AMwhat is the error you are getting
Gautham S Pai | Posting is provided "AS IS" with no warranties, and confers no rights. -
Wednesday, February 04, 2009 6:57 AMSorry, I forget to update you and thanks a lot for your response.
I've fixed it by adding
WebProxy.BypassProxyOnLocal
Just follow the same concept of yours.
Thanks.
Vuthy

