Link to home
Start Free TrialLog in
Avatar of v07m9s
v07m9sFlag for Australia

asked on

Custom webpart in SharePoint can't connect to rss feed

Hi All,

A developer put together some custom web parts for us several months ago including a web part that consumes data from an rss feed and formats and displays the data. The webparts are used on our SharePoint intranet homepage.

Since 4/4/2011 the web part is showing the below error and is not displaying any of the current exchange rates. A list has been setup to store a history of daily exchange rates and this list hasn’t been populated since the 3/4/2011. The custom webpart is coded to update the list every day.

Error:System.NullReferenceException: Object reference not set to an instance of an object. at DeviceTech.RBAExchangerate.RBAExchangerateUserControl.ExtractData(XDocument xmlFeed)

Are you aware of what could be preventing the webpart from accessing the rss feed? The URL for the feed is http://www.rba.gov.au/rss/rss-cb-exchange-rates.xml. If I create an rss viewer and point to that address it shows the correct data, but it isn’t doing so for the custom web part. All other rss consuming web parts on the site are showing data correctly. I have attached an image of the webpart and error.

Also, Is there a way to export the web part + dll’s and access the code in VS2010?

Thanks,

Phil.
 
 User generated image
ASKER CERTIFIED SOLUTION
Avatar of AngryBinary
AngryBinary

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of v07m9s

ASKER

Hey AngryBinary,

I didn't have the wsp file from the developer, so I located the dll in the GAC.

Thanks very much for your assistance. The steps you described worked perfectly! First, I located the dll file in the GAC, then decompiled using Reflector. I was then able to locate the method that was causing the issue. I created a console app to test this and found that the issue was that the RBA CB XML file used by RBA has changed from specification 1.1 to 1.2 and with this some of the namespace values for elements has changed and the data structure has changed slightly, which was causing the object reference error.

I can now return the correct data using my console app, so now I probably need to contact the developer to get the source code or I can create a new version of the webpart.

Thanks again,

Phil.
Avatar of v07m9s

ASKER

Great solution!