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 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?


 image of webpart and error
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

This is going to be a tough one to debug, because the component is essentially blackboxed. What components do you have from the developer? I'm assuming he didn't provide source code, but do you have a deployment WSP file? WSP is the same format as CAB, so you would be able to extract all the packaged deployment files (DLL's, ASPX, images, etc) the same as you would from a CAB file.

If you don't have a WSP or some manner of deployment artifact, getting the DLLs and other source material is a matter of how the web part is deployed. DLLs would be either in the GAC - which can be accessed as though it was a file system directory by typing "c:\windows\assembly\gac" into the Run dialog (Windows key + R) - or in the filesystem at C:\inetpub\wwwroot\wss\VirtualDirectories\80\bin, or sometimes in both. I would bet on GAC deployment first, at least for the DLL that contains the actual web part.

Once you have the assemblies, you can revert them back to source using Reflector:

I doubt the developer went though the trouble to obfuscate the code to protect it from decompilation. It's inexpensive, and there's a trial version if you'd like to check it out. I haven't used it myself, but it has gotten good feedback for just this sort of thing.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
v07m9sAuthor Commented:
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,

v07m9sAuthor Commented:
Great solution!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.