[This article originally appeared in the "Closer to the Edge" blog at: http://blog.msedge.org.uk/2010/11/problems-accessing-sharepoint-2007-rss.html]

During a recent deployment, I experienced problems accessing SharePoint RSS feeds when using Forefront UAG. After some assistance from Ben Ari at Microsoft and a little of my own research, I thought it might be useful share the solution as it is a likely common problem when using Forefront UAG to publish SharePoint.

Forefront UAG trunks enable access to multiple web applications by using host address translation (HAT). While users communicate with the external websites to request, receive, and upload data to and from the applications they access via Forefront UAG, Forefront UAG transparently parses the requests and responses, using content-type parsers, and manipulates the URLs in those transactions, on the fly. The parsers manipulate the data so that, to the user, all links to the applications that are enabled in the portal point to one host, the public host.

However, sometimes this parsing process can do more harm than good; as shown with the example presented in this wiki article!

Having used the native Microsoft Office SharePoint Server 2007 template in order to publish the SharePoint web servers, I then received Feed code errors in the browser when attempting to access SharePoint RSS feeds. After investigating this further, it was found that UAG was applying changes to the RSS page as part of the parsing process and consequently corrupting the feed data. 

In order to fix the issue, it was necessary to define a series of entries to prevent particular SharePoint responses from being parsed by UAG. In order to create these entries, we need to consider the application server being published and construct a regular expression that can be used to define the URL that should be excluded from parsing. This is achieved by using the Do not parse the response bodies to these requests: option available in the Portal tab of the Advanced Trunk Configuration page, as shown below:

Click Edit to begin the process:

In order to define the URLs which will not be subject to UAG parsing, we need to define a Server and URL combination to represent the requests used when accessing RSS data via SharePoint. These URLs can often be determined by looking at the browser address bar, or more likely using some form of web debugging utility like Fiddler, HttpWatch or Charles.

Click Add to define the Server field for our request:

In order to define the server name that matches the specific requests for our scenario, we need to enter the server as defined in the Web Servers tab of the SharePoint application within the portal. In our example, the server name listed under the Web Servers tab for our SharePoint application is sharepoint.internal.msedge.org.uk. The syntax for the server field needs to comply with RegEx which is common place within UAG as discussed here. However, in RegEx, dots are non-literals, which must be escaped using an escape character. Consequently, the server name needs to be entered into the server field including the use of backslash escape characters because our server name is an FQDN and contains dots:

Once entered, we then need to define a URL which matches one of the specific requests for our RSS scenario. Highlight the appropriate Server item and then click Add to begin defining the URLs:

For our particular RSS scenario we need to define the first URL using a regular expression (RegEx) of .*listfeed.* This essentially matches any URL that contains the text listfeed as this is used in the majority of SharePoint pages that contain RSS elements (called listfeed.aspx).

With the above changes, you should now have the following configuration:

 For our particular RSS scenario we need to define the first URL using a regular expression (RegEx) of .*listfeed.* This essentially matches any URL that contains the text listfeed as this is used in the majority of SharePoint pages that contain RSS elements (called listfeed.aspx).

We also need to define a second URL using a RegEx expression of .*srchrss.* This essentially matches any URL that contains the text srchrss which is used when accessing RSS information from the SharePoint search page (called srchrss.aspx).

With the above changes, you should now have the following configuration:

Click OK, followed by OK on the Advanced Trunk Configuration page and then click Activate to apply the changes.

Once applied, you should now find that RSS pages appear correctly and the feed code browser errors should be gone!

This article was originally written by:

Jason Jones, Forefront MVP
Principal Security Consultant
Silversands Limited
--------
My Forefront Edge Blog: http://blog.msedge.org.uk/
My ISA Server Blog: http://blog.msfirewall.org.uk/
MVP Profile: https://mvp.support.microsoft.com/profile/Jason.Jones
Twitter: http://twitter.com/jjatsilversands