Phil Jirsa

Microsoft Dynamics Vertical

Inetium can implement a CRM solution that fits your business needs.

Learn More >>

Inetium is the go to partner for Microsoft SharePoint consulting services.

Learn more >>

Recent Posts

Tags

Community

Email Notifications

Archives

Enabling Silverlight 2 Beta 1 on SharePoint

For those of you would-be SharePoint developers who want to dabble with Silverlight, here's a post that describes how to get your environment up and running.

First, check out this great blog post I found. This will cover the steps that you need to do to get things working.

http://www.u2u.info/Blogs/Patrick/Lists/Posts/Post.aspx?ID=1794

If you don't want to spend an hour or two comparing web.config files, I will detail what needs to be changed and where.

Find the <configSections> group under <configuration> and add the following before the closing </configSections> tag.

   1: <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
   2:     <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
   3:         <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
   4:         <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
   5:           <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" />
   6:           <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
   7:           <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
   8:           <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
   9:         </sectionGroup>
  10:     </sectionGroup>
  11: </sectionGroup>

Next, find the <SafeControls> section under <configuration><SharePoint> and add the following safe control entry.

   1: <SafeControl Assembly="System.Web.Silverlight, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" Namespace="System.Web.UI.SilverlightControls" TypeName="*" Safe="True" />

Then, add the following section to the <configuration><system.web><httpHandlers> section immediately before the closing </httpHandlers> tag.

   1: <remove verb="*" path="*.asmx" />
   2: <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
   3: <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
   4: <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" />

Add this next entry to the <httpModules> section under <configuration><system.web>.

   1: <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

In the <configuration><system.web><compilation><assemblies> section, add these entries.

   1: <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
   2: <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
   3: <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
   4: <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
   5: <add assembly="System.Web.Silverlight, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

Now, add these entries to the <configuration><system.web><pages><controls> group.

   1: <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
   2: <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

Finally, to the <configuration><runtime> section add the following to the <assemblyBinding> group before any other <dependencyAssembly> entries.

   1: <dependentAssembly>
   2:     <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35" />
   3:     <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />
   4: </dependentAssembly>
   5: <dependentAssembly>
   6:     <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35" />
   7:     <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />
   8: </dependentAssembly>

 

There are some additional configuration changes that will need to be made if you are using Windows Server 2008 or IIS 7. My test environment is running Windows Server 2003 with IIS 6 and therefore does not require them. Creating a new Silverlight web project in Visual Studio will create a web.config file with the required entries for IIS 6 and IIS 7.

IMPORTANT FINAL STEP

Please pay special attention to step 7 in the referenced blog post above. This step is critical and your Silverlight apps will not work unless you register this MIME type correctly.

Comments

Mahesh Tatiparthy said:

I am not getting Sharepoint tag under configaration section. Can u please help me ?

# June 17, 2008 1:53 AM

Lorraine said:

I have tried to follow exactly what you said above, and I can't get it to work, I have wss-sp1 and office server-sp1, silverlight and silverlight-sdk, and also added the System.Web.Silverlight.dll, to the assembly but I still don't get it to work, please help

# June 23, 2008 5:37 AM

Andrew Whitechapel said:

Having looked at Silverlight in Office client , I thought I’d round out the exercise by looking at Silverlight

# March 12, 2009 11:42 PM