SharePoint Dragons

Nikander & Margriet on SharePoint

Deploying XBAP in SharePoint 2010

Repeatedly we’re seeing advice suggesting not to build XBAPs in favor of Silverlight. In our view, there’s nothing wrong with using XBAP and displaying it in a page viewer web part. In fact, a lot of times XBAPs are actually more powerful. Of course Silverlight has better platform support, but in our experience projects using Silverlight are targeting MSIE/Windows audiences anyway.

In the case of SharePoint, when you choose to use XBAP you’ll miss out on some of the integration opportunities SharePoint/Silverlight combinations offer (such as the Silverlight web part and the client object model).

It seems that it’s not possible to host XBAPs in SharePoint itself, for instance, in the layouts folder, and this is a question that has come up a couple of times in the MS forums. The solution is simple:

  • Just open IIS Manager and choose Add Application and create your own virtual directory, in my case I’ve called it xbaphost.
  • Deploy your XBAP application using ClickOnce. For me, that leads to the following URL:http://moon/xbaphost/myxbap.xbap
  • Check that this works.
  • Point the page viewer web part to http://moon/xbaphost/myxbap.xbap (replace with your URL)

Works like a charm!

2 responses to “Deploying XBAP in SharePoint 2010

  1. bob November 30, 2011 at 3:25 am

    On XBAP is it a possibility that when Sharepoint nears its final throws that an XBAP light might become available that would serve the same pupose as Silverlight? or are they 2 completely different animals?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: