Share via


Performance Point Server 2007 and AJAX on SharePoint

If you have Microsoft Performance Point Server 2007 installed, and you do not have ASP.Net AJAX extension installed (probably like me, I use .Net 3.5), you will probably get errors in your site when you have a Performance Point Dashboard Item webpart loaded:

Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file.

Well instead of installing ASP.Net AJAX Extension 1.0, we can still make it work via Assembly Redirections. Here's how:

1. Locate the web.config file for your SharePoint site, as well as the PerformancePoint Monitoring Designer web service and its Preview directory.

2. Use any text editor (or Visual Studio), and do a search/replace to replace all references to System.Web.Extensions 1.0.61025.0 to .Net's3.5.0.0.

3. Add the following line to your web.config under the <configuration> node:

<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="1.0.61025.0" newVersion="3.5.0.0" />
      </dependentAssembly>
    </assemblyBinding>
</runtime>

Remember there are 3 web.configs that needs to change here:

  1. under PPSMonitoring/WebService
  2. under PPSMonitoring/Preview
  3. your SharePoint site

Now your PerformancePoint webparts will load fine in SharePoint (and you can use the Dashboard Designer) without having to install ASP.Net AJAX Extension!

But wait.. there's one more thing - if you tried to put in a custom-built webpart that uses AJAX (System.Web.Extensions 3.5.0.0) on the same page as your PerformancePoint dashboard items, you will get errors complaining that it cannot cast ScriptManager to ScriptManagerLoader. Huh?

What happens is that PerformancePoint's webparts load its own ScriptManagerLoader, derived from the ScriptManager class. One easy solution to make all webparts AJAX-happy is to declaratively instantiate our ScriptManager in SharePoint's Master Page instead.

From SharePoint Designer, locate your current Master Page and add the following line at the very top:

<%@ Register TagPrefix="PPS" Namespace="Microsoft.PerformancePoint.Scorecards.WebParts" Assembly="Microsoft.PerformancePoint.Scorecards.WebParts, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>

Next, right after the <form> tag, add the following:

<PPS:ScriptManagerLoader runat="server" id="ScriptManager1" EnablePartialRendering="true"/>

Here, before our AJAX webparts attempt to load its own ScriptManager, it first checks whether an instance is already created on the page. Since we have this on our master page, it won't try to add its ScriptManager again, and ditto to our PerformancePoint web parts. Since PerformancePoint's ScriptManagerLoader is derived from ScriptManager, it will still work if our webpart expects ScriptManager.

AJAX-ified SharePoint and PerformancePoint webparts living in harmony

Comments