All,
Integrating Silver Light with SharePoint is now one of the most Google key words and none of the tutorials are good enough to provide all the stuff, i decided to make some time and write this post and i hope it will help someone.
Note : This is with Silver Light 2.0 i will work on latest versions and will update soon.
Here we go..
1.Download the latest Silver Light go to http://silverlight.net/GetStarted/
2.Download the SilverLight SDK
(http://www.microsoft.com/downloads/details.aspx?FamilyId=8D933343-
038F-499C-986C-C3C7E87A60B3&displaylang=en)
3.Download and install .NET 3.5
(http://www.microsoft.com/downloads/details.aspx?FamilyId=333325FDAE52-
4E35-B531-508D977D32A6&displaylang=en)
4.Download and install the SP2 of WSS
(http://www.microsoft.com/downloads/details.aspx?FamilyId=79BADA8
2-C13F-44C1-BDC1-D0447337051B&displaylang=en)
5.Download and install the SP2 of MOSS
(http://www.microsoft.com/downloads/details.aspx?familyid=B7816D90-
5FC6-4347-89B0-A80DEB27A082&displaylang=en)
Installation :
Once you are with the requirements install the Silver Light SDK.
Copy DLL’s to the GAC
1. Drag the “C:\Program Files\Microsoft
SDKs\Silverlight\v2.0\Libraries\Server\System.Web.SilverLight.dll” to
“C:\Windows\Assembly”
NOTE: Sometimes simply copying to the GAC doesn’t work for SP
You will need to copy to local bin directory of the web application.
2. Copy the “C:\Program Files\Microsoft
SDKs\Silverlight\v2.0\Libraries\Server\System.Web.SilverLight.dll” to the
“C:\inetpub\wwwroot\wss\virtualdirectories\100\bin”
1. Create a folder called “ClientBin” in the
“C:\Inetpub\wwwroot\wss\VirtualDirectories\100” directory
2. Open IIS Manager
3. Expand SHAREPOINT2007
type="System.Web.Configuration.SystemWebExtensionsSectionGroup,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35">
type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
type="System.Web.Configuration.ScriptingScriptResourceHandlerSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="MachineToApplication" />
type="System.Web.Configuration.ScriptingWebServicesSectionGroup,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35">
type="System.Web.Configuration.ScriptingJsonSerializationSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="Everywhere" />
type="System.Web.Configuration.ScriptingProfileServiceSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="MachineToApplication" />
type="System.Web.Configuration.ScriptingAuthenticationServiceSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="MachineToApplication" />
type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
requirePermission="false" allowDefinition="MachineToApplication" />
3. Add the following to the SafeControls section:
PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TypeName="*"
type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions,Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions,Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions,Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"validate="false" />
assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral,PublicKeyToken=31BF3856AD364E35" />assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral,PublicKeyToken=31BF3856AD364E35" />
type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0,Culture=neutral, PublicKeyToken=31BF3856AD364E35" />preCondition="integratedMode"type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions,Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />preCondition="integratedMode"type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions,Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler,System.Web.Extensions, Version=3.5.0.0, Culture=neutral,PublicKeyToken=31BF3856AD364E35" />
Assembly="System.Web.Silverlight"/>
Height="340"
Width="320"
Source="../Shared Documents/calculator.xaml"
ScriptType="Custom.yourprogram"
OnPluginError="errorHandler"/>
function errorHandler(sender, args)
{
alert(args._error.errorType);
alert(args._error.errorCode);
alert(args._error.errorMessage);
}
<%@ Register Assembly="System.Web.Silverlight"
Namespace="System.Web.UI.SilverlightControls" TagPrefix="asp" %>