SharePoint Dragons

Nikander & Margriet on SharePoint

Tag Archives: xbap

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!