WCSF WebSite Hosted on SharePoint

Topics: Web Client Software Factory, User Forum
Jun 30, 2008 at 3:08 PM

Hi All,

Currently I'm working on finding ways on how host a WCSF website on an existing SharePoint application. Pardon me but I'm not that familiar with WSS 3.0 that is why I would like ask some help from you regarding such scenario.

Our team customized WCSF in order to provide a standard implementation for internal development projects moving forward. With plans to distribute to all projects along with those that already utilize SharePoint / MOSS with their applications, it serves a great deal of challenge on how to integrate WCSF and SharePoint. We are trying to find a solution that will not require a large effort for developers to transition or even re-platform from SharePoint to WCSF but to integrate them both without compromising there capabilities and functionalities.

We are trying to host a WCSF website on SharePoint but to no avail come a lot of obstacles. One of which is with the use of global.asax that either ambiguous with SharePoint and WCSF or inability to direct cast objects of type to Microsoft.Practices.CompositeWeb.WebClientApplication.
Below are the following related links that I read on the Discussions but with little information that I am looking for.

Related Links:

Hoping for your immediate response and help on the said matter.

Best Regards,

Jun 30, 2008 at 8:34 PM
This was fairly well covered in the links you have already looked at.  You would need to customize the "heart" of WCSF (the WebClientApplication class in the Composite Web Application Block (CWAB)) to derive from the Sharepoint Application class instead of the "regular" WebApplication class.  Since you have the source code, the biggest challenge will be around changing references in a project to point at your custom version of CWAB instead of the "official" version.  We have not tried this, but I have heard of others being successful with it.

I hope that helps.  Good Luck,
Michael Puleio -- patterns & practices
Jul 21, 2008 at 1:14 PM

Hi Michael,


Thanks for your response regarding my previous inquiry and sorry for my delay due to pile of work on my plate.

Anyways, I was able to have a WCSF website hosted on SharePoint. Meaning a WCSF website published as a web application under the layouts folder of SharePoint. But a lot of adjustments and configurations were made on both the CompositeWeb and created website respectively. 
I'll let you know once everything is polished since I am still encountering several errors upon accessing the said app on SharePoint.

Many thanks,


Sep 9, 2008 at 2:14 PM
Edited Sep 9, 2008 at 2:15 PM



We published two new releases that provides guidance on:

·         Enabling CWAB in a SharePoint Application

·         Enabling Unity in a SharePoint Application


These releases include the following elements:

·         A PDF document with guidance to enable CWAB/Unity in a SharePoint application to make Web Parts more testable.

·         Extensions for CWAB/Unity to work on a SharePoint application

o   CompositeWeb.SharePoint solution: it includes a class that implements the IWebClientApplication interface and inherits from SPHttpApplication class.

o   Unity.SharePoint solution: it includes a class that inherits from SPHttpApplication and hosts a Unity container.

·         A sample implementation that uses the extensions for CWAB/Unity This solution includes a web part that injects dependencies (also has a Unit Test project).

·         Sample files like the global.asax and web.config for a SharePoint application enabled with CWAB/Unity.


We also published the documentation guidance in the WCSF KB as wiki pages. You can find them here:

·         How To: Enable CWAB in a SharePoint Application

·         How To: Enable Unity in a SharePoint Application to make Web Parts more testable


Please, let me know if it helps.


Mariano Converti