SharePoint 2016 - RSS Viewer WebPart Issue

This article presents SharePoint 2016 - RSS Viewer WebPart issue.

Issue

We have an issue with RSS Viewer Webpart, we are trying to use the http://rss.cnn.com/rss/cnn_topstories.rss on SharePoint site within RSS Web part. We encountered this error: “an unexpected error occurred processing your request. Check the logs for details and correct the problem.”


Troubleshooting

I did the steps given below to troubleshoot the issue.

  • Our Server uses proxy address to connect internet on the Servers, I updated the web.config files on all Web front ends with proper proxysettings (Configure the defaultproxy tag in web.config) but we still have the same issue.
  • Cleared the cache on all Servers but luck did not favor us.
  • Browse the RSS feed site on the Server and I can get the result without any issue.
  • Reset IIS on all servers but luck did not favor us.
  • No error in the event log but I can see entries in the USL logs.

    Cannot find the site lookup information for the requested URL http://rss.cnn.com/rss/cnn_topstories.rss.

    Possibly the host name ‘www.cnn.com‘ is invalid and it’s could not be found. The exception is System.Net.Sockets.SocketException (0x80004005)- No such host is known at System.Net.Dns.GetAddrInfo(String name) at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6) at System.Net.Dns.GetHostAddresses(String hostNameOrAddress) at Microsoft.SharePoint.Utilities.CommonUtility.IsIntranetAddress(String hostName)

    RssWebPart- Exception handed to HandleRuntimeException.HandleException System.Net.Sockets.SocketException (0x80004005): No such host is known atSystem.Net.Dns.GetAddrInfo(String name) at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6) at System.Net.Dns.GetHostAddresses(String hostNameOrAddress) at Microsoft.SharePoint.Utilities.CommonUtility.IsIntranetAddress(String hostName) at Microsoft.SharePoint.Utilities.SPWebRequest.PreventIntranetCalls(Uri requestUri, SPContext context, String sharePointMarkValue, String appContextLoggingValue) at Microsoft.SharePoint.Utilities.SPWebRequest.SafeCreate(Uri requestUri, SPContext context, Type callingType, String callingInstanceTag) at Microsoft.SharePoint.WebControls.XmlUrlDataSource.FetchData(String requestUrl) at Microsoft.SharePoint.WebControls.BaseXmlDataSource.Execute(String request) at Microsoft.SharePoint.WebControls.BaseXmlDataSource.GetXmlDocument() at Microsoft.SharePoint.WebControls.SingleDataSource.GetXPathNavigatorInternal() at Microsoft.SharePoint.WebControls.SingleDataSource.GetXPathNavigator() at Microsoft.SharePoint.WebPartPages.DataFormWebPart.GetXPathNavigator(String viewPath) at Microsoft.SharePoint.WebPartPages.DataFormWebPart.PrepareAndPerformTransform(Boolean bDeferExecuteTransform)

At this point, I was convinced that for some reason, SharePoint is unable to either read the proxy or use the proxy to reach the internet. For this, we create test Application, which reads the proxy settings from the web.config file, using IIS site. It works, as expected.

At this time, we decide to open a premier case with MSFT and get the solutions. MSFT ran couple of traces and diag tools. They found that RSS request is being verified by a DNS lookup in spite of the fact that the proxy information is read (normally when a URL is determined to be external; it is just sent directly to the proxy and the proxy determines the destination). Since we don’t have DNS resolution of the internet address and we do not use any host file entry, it failed.

Solutions

I would called it a workaround rather than a solution (because solution should be using the proxy settings in web.config). As per the recommendation, we have to enable the intranet calls property (By default, this property is set as true.) 

  1. #This command will set the disable intranet - calls value to false.  
  2. Add - PSSnapin Microsoft.sharepoint.powershell  
  3. $farm = Get - SPFarm  
  4. $farm.Properties.DisableIntranetCalls = $false  
  5. $farm.Properties.DisableIntranetCallsFromApps = $false  
  6. $farm.Update()   

Explanation

There is a code change in SharePoint 2013 & 2016, SharePoint uses a .NET call to get more information about the address and it failed because our network configuration doesn't allow the DNS resolution of an internet address as well as we are not using the host file entries.

  1. System.Net.Dns.GetHostAddresses(System.String)  

Thus, if DisableIntranetCalls is set to true (default), then use .NET call given above to confirm the DNS. However, if DisableIntranetCalls is set to false, then SharePoint will not make this call and use other code to reach the site.

Applies to

  • SharePoint 2013 & SharePoint 2016