Wednesday, 24 November 2010

Could not load type ‘Microsoft.AnalysisServices.SharePoint.Integration.ReportGalleryView’

A number of people have hit this issue and so it deserves a quick walkthrough of why it (unfortunately) can happen and how you fix it.

The error occurs when you try to select a Document Library of type PowerPivot Gallery (sometimes referred to as Report Gallery). After installing Power Pivot for SharePoint, all new site collections you create have the option to create a new document library of this type and if you use the PowerPivot Site template when creating the site collection, we automatically add a library of this type (that is the main thing we do in this template). The ability to add this type of library in all new site collections is there because we defined the library in a feature which is subsequently stapled to all sites. This means it is automatically activated on all site collections. The problem is that the page which is loaded when you click on the library as its default view uses an ASP.Net control whose code behind is found in a dll which is not being found. So when does this happen. Every case I have seen so far, this occurs when the user creates a new Web Application and does not deploy our WebApp solution to the new Web Application. Because of how we reference the classes for our pages, we need to have the associated assembly in the <vdir>\bin directory. This assembly is Microsoft.AnalysisServices.SharePoint.Integration.dll. The dll is “pushed” to the web applications on every WFE in the farm via the SharePoint solution infrastructure.

Ignoring any of the questions around “how should we have done this to avoid this error” .. to fix this situation, you simply need to deploy our web app solution to the Web Application you just created. To do this, go first to the System Settings page in Central Admin

Under Farm Management, select Manage farm solutions.

Click on the powerpivotwebapp.wsp solution to see its properties

On the properties page, you will see the “Deployed To” list and notice that your new web application is not on this list. Select the “Deploy Solution” link at the top of this page

You can now chose to deploy our solution to the new Web Application you have created (and you can chose to do it “Now”). After this, the bits will be pushed to all machines in the farm and you can use the PowerPivot Gallery in your new site collections.  One thing to note (since I got burned by this) … instinct is, after this is done, to just go back to the error page and hit refresh thinking that it should be fixed now. The error page, though, is an actual error page and when you hit refresh, all you are doing is reloading the error page. To actually reload the PowerPivot Gallery, use the back button in your browser or click on the “Go back to site” link in the error page.

No comments:

Post a Comment