Welcome to EMC Consulting Blogs Sign in | Join | Help

Arul Vivekananth Blog

Silverlight & MOSS Integration

If you are struggling to integrate the Silverlight and MOSS

Here is the solution for your problem    Big Smile

1.      Part 1 (Silverlight project DLL to be copied into this ClientBin Directory)

1.         Create ClientBin Directory under this folder   (C:\Inetpub\wwwroot\wss\VirtualDirectories\80)    Default web app

2.         Open IIS Manager  and locate the ClientBin Directory Created in step 1

3.         Choose the property window of CilentBin

4.         Change the  Execute Permissions: to Scripts Only

2.      Part 2

1.         Create a Project in Expression Blend

2.         Build and Test the project.

3.         Copy the DLL ( created under ClientBin directory of the Silverlight project) into the Sharepoint application  ClientBin Directory (C:\Inetpub\wwwroot\wss\VirtualDirectories\80)

3.      Part 3

1.         Upload the  XAML file to sharepoint application

1.           SiteAction ->View All Site content

·         Option 1

Create -> Documentment Library

Type SilverlightPages ( anyname ) into Name Textbox and click create button

Upload the XAML file into the Silverlightpages folder

·         Option 2

Click on pages

Upload the XAML file into the Pages folder

2.           Publish and Approve the file  ( if needed )

   Add the following code into your sharepoint page  or  custom master page

Option 1

<div  id="SilverLightTopPanel">  // you can specify id

<script type="text/javascript">

         Sys.Silverlight.createObjectEx({

         source: "MasterPageTop.xaml", // Specify your xaml file

         parentElement: document.getElementById("SilverLightTopPanel"),  // specify your Div element ID

         id: "SilverlightControl",

         properties: {

               width: "1024",

               height: "60",

               version: "0.95",

               enableHtmlAccess: true

         },

         events: {}

   });        

</script>

</div>

Option 2

      <div  id="SilverLightTopPanel">  // you can specify id

         <script type="text/javascript">

                  createsilverlightmenu()

         </script>

      </div>

            You can create function as a seprate (JS) file and upload into proper location

            For example  createsilverlghtobjects.js

                        function createsilverlightmenu()

{

Sys.Silverlight.createObjectEx({

            source: "MasterPageTop.xaml", // Specify your xaml file

            parentElement: document.getElementById("SilverLightTopPanel"),  // specify your Div element ID

            id: "SilverlightControl",

            properties: {

                  width: "1024",

                  height: "60",

                  version: "0.95",

                  enableHtmlAccess: true

            },

            events: {}

               });

}

           

     Copy this (createsilverlghtobjects .js) file into C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\1033 (Sharepoint sever)

3.           You have to copy the silverlight.js file (from Microsoft ) into C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\1033 (Sharepoint sever)

4.           You have to specify the file location into your master page ( Add the blow code into your custom master page ( inside head tag)

<SharePoint:ScriptLink ID="ScriptLink2" language="javascript" name="silverlight.js"  runat="server"/>

<SharePoint:ScriptLink ID="ScriptLink3" language="javascript" name=" createsilverlghtobjects.js"  runat="server"/> ( for Option 2 )

Published 19 July 2007 12:40 by arul.vivekananth
Anonymous comments are disabled
Powered by Community Server (Personal Edition), by Telligent Systems