SharePoint – The MOSS

My SharePoint Treasurechest

Archive for the ‘Deployment’ Category

SilverLight 2.0 and SharePoint

Posted by kusek on November 28, 2008

I have started to explore the Silverlight 2.0 & LINQ after a break. Planning to post all my learning with regard to it. To start off with let’s see how to configure Silverlight 2.0 application work in SharePoint 2007.

    I was searching for some article regarding this topic and almost all
the links I found were with option of deploying the SilverLight as web part. I wanted to go with the other way of doing it. With this post I will wrap up to configuration part and in the next post we will see a simple example of SilverLight 2.0. To save typing I am going to copy the part of text from Legend Late Patrick’s Blog and will edit only the broken links, Patrick’s article was written when Silverlight was in beta 2 so few links gone out dated.

  1. Of course, you need to download the Silverlight 2 plug-in. This can be done from here.
  2. Have service pack 1 installed for WSS 3.0 or service pack 1 for MOSS 2007. This adds support for what you’re going to do with AJAX and Silverlight 2. Note that a number of the samples assume you have a publishing site up and running and therefore work only in a MOSS 2007 scenario.
  3. You’ll need .NET 3.5 on your server. The System.Web.Extensions.dll is required server-side. The redistributable .NET 3.5 framework can be downloaded from here.
  4. The .NET 3.5 framework must be extended with the System.Web.Silverlight.dll. This DLL is part of the Microsoft Silverlight 2 Software Development Kit and if you only download this, you’ll have to make sure that the System.Web.Silverlight.dll is available as an assembly in the Global Assembly Cache (GAC).
  5. Install Silverlight Tools for Visual Studio 2008 SP1 this add-on for Visual Studio 2008 SP1 or Visual Web Developer Express with SP1 will install the necessary Visual Studio updates, Silverlight project templates, developer runtime, and SDK. For additional information read the overview and the Silverlight 2 Readme Notes.
  6. Install Microsoft Expression Blend 2 and then install Microsoft Expression Blend 2 Service Pack 1 Expression Blend 2 along with Service Pack 1 allows designers to graphically create UI’s for Silverlight 2 applications.
  7. You need all of the .NET 3.5 (AJAX) + Silverlight configurations in the web.config. A good approach is to create in Visual Studio 2008 a Silverlight application project with a Web site to test out the XAML. The Web site includes a web.config that is ready and that contains the sections you have to copy to the web.config of the IIS Web application that hosts your SharePoint sites on which you want to try out the BluePrint samples. On the plane going back home from the conference in Seattle, I have made a screencast that illustrates this. It explains all of the steps. Download the zip containing it from here.
  8. Last but also important thing (also illustrated in the screencast) is that you have to register the .xap extension as a MIME type (application/x-silverlight-app) for the IIS Web application. Don’t forget that one!
  9. Here is another link that gives all in one shot.
  10. Download the sample web.config from here.
  11. This link gives you the steps for the same and few samples.
  12. Do all in one shot for the web.config here is the link

Posted in Deployment, SharePoint, SilveLight | 3 Comments »

ActivationDependencies – Feature Scope

Posted by kusek on October 13, 2008

    This weekend I got in to an Issue while helping a friend of mine. Some back ground about the issue.

    We have three features. Say for example.

  • FieldsX Scoped at Site.
  • ContentTypeX Scoped at Site.
  • ListX Scoped at Web.

ListX has its Dependency as ContentTypeX; ContentTypeX has its dependency as FieldsX.

I installed all the features, and when I try to activate the ListX feature I get an Error

           “Dependency feature ‘ContentTypeX‘ (id:GUID of ContentTypeX) for feature ‘ListX‘ (id:Guid of ListX) is not activated at this scope.”

    I changed ListX Scope to Site and activated the Feature, thinking that ActivationDependencies should be  between Features of Same scope, though it worked but that is not the case, because we can have Cross Scoped Dependencies as well provided we follow the rule of thumb mentioned in this Article.

“Extract from the Above Article…If the Feature that is depended upon is not activated, activation of the depending Feature fails. For example,if a Web site–scoped Feature depends on a site collection–scoped Feature that is not activated, provisioning of the Web site Feature (or of a site definition that contains such a Web site Feature) fails.

Posted in Deployment, Features, SharePoint | Tagged: , , | Leave a Comment »