SharePoint is hosted in a DMZ which does not have access to internet. User adds a new RSS viewer webpart on a sharepoint team site and gets the famous error "Unexpected error has occured."
The easiest resolution is to contact the corporate security team to open ports so that the web part can get the requested rss feed. But some rss feeds are hosted on environments which keep changing their IP addresses. This will cause the webpart to stop working after some time and we cannot keep requesting security to open ports based on new IP addresses.
ULS logs indicates either one of the following errors,
a. Connection timed out
b. Connection was closed forcibly.
c. 407 proxy authentication failed.
I could not use the following solution because it is not allowed as per security policies,
Here are two options out of which I implemented option 1,
1. The external DMZ machines could talk to a special server on http port which could then talk to another environment from where we could access the rss feed from the internet. Use System.Net.WebClient and WebProxy classes.
2. Client side programming logic. This would work if the rss feed is accessible from the client and not from the server.
c. Cache rss feed result on server.