Skip to main content

Patrick Tisseghem's Blog [MVP SharePoint]

Go Search
U2U Blog Center
U2U website
  

The Happy SharePoint Traveller

U2U Blog Center > Patrick Tisseghem's Blog [MVP SharePoint] > Posts > How to configure your SharePoint extended IIS Web App for working with Silverlight 2 applications
How to configure your SharePoint extended IIS Web App for working with Silverlight 2 applications

There were a number of questions on the blog or per email regarding the configuration of the web.config in a SharePoint IIS Web app in order for the Silverlight BluePrint samples to work. Not that much though and that is of course a good sign. As I understand from it, many people are up-and-running with the samples.

UPDATE: Before you deploy your Silverlight XAPs, please recompile them using Visual Studio 2008. That should solve the problems a number of you have with the blank Web Part. 

Here is a checklist for the things you need to do:

  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 Beta 1 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. For the development of Silverlight 2 applications, you'll work in Visual Studio 2008 extended with the Microsoft Silverlight Tools Beta 1 for Visual Studio 2008. Note that by installing these tools, you'll also install the required runtime and the SDK, and you should have all of the DLL's in place to get the Silverlight 2 applications delivered server-side.
  6. 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.
  7. 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-2-b1) for the IIS Web application. Don't forget that one!

I have the web.config used within the screencast available for download here in case you want to check the configurations. 

Comments

Great post!

Hi,

Thanks for this checklist. Last week i have seen some great stuff regarding Silverlight. Also in combination with SharePoint. I'm gonna look into some possibilities. Thanks to these kind of posts, life is getting easier :)

Thanks

Alex
http://www.bloggix.com/blogs/microsoft
at 10/03/2008 8:52

It's alive!

Thanks for the post, it resolved the issues that I was experiencing around getting moss to play nice with silverlight.
at 10/03/2008 23:47

Windows 2008

Thanks for this info Patrick, I'm not sure I would have worked all of this out by myself.

I am having problems with my Windows 2008 server running the BluePrint HelloWorld. The Silverlight app doesn't display and IE crashes every time I go near the web part.

You can see what has been happening here;

http://blog.ozippy.com/2008/03/how-to-configure-your-sharepoint.html

Any thoughts on what I might be doing wrong?

Thanks
at 12/03/2008 11:49

It displays Silverlight content but IE crashes

First of all, thanks for the step by step on how to configure the environment. I've been looking for that for a while.

My SL was not showing too. But I figured out why my SL content was not loading. For some reason I had to recompile the .xap package in VS2008. Noticed that the new packages are on average 2k bigger in size. After I got a new .xap file, I've replace the old ones in the ClientBin folder the SL content displays.

But my IE 7 is crashing too and it's the npctrl.dll.
at 12/03/2008 17:23

Webpart not displaying anything !?!?

Ive got the media viewer webpart and done all the config changes and installs ( thanks for the tutorial btw !!! ).  Anyway, after i assign the picture list and click apply ( multiple times even ) i dont get anything displayed where the webpart should be except for the title ?!?!?! 

Any help would be MUCH appreciated !!!

Thanks in advance,
Mike
at 12/03/2008 23:08

Recompiling the HelloWorld sample

Thanks for the tip, I recompiled the HelloWorld sample and it started working. As described above, the size was different by 2K.

IE is still crashing but not as often.
at 13/03/2008 10:35

Recompiling did the job!

I also recompiled the project and copied the new .xap file to the clientbin, restarted IE and it worked! Thanx!
at 13/03/2008 15:58

IE Crashes - Fixed it...

hi guys,

Just a follow-up on the crashes I was experiencing in IE. I could fix it. Here's how I did it...

http://rialight.net/2008/03/14/ie-crashing-with-silverlight-2-fixed-it/
at 14/03/2008 17:12

RE: Webpart not displaying anything !?!?

Mines is the same as Mike's, I would add that when viewed by IE without Silverlight addon a Silverlight logo is displayed
at 14/03/2008 17:41

Please Help Me display webpart

Hi guys

I am having a major problems with the sharepoint displaying the webparts correctly.  i have followed the configuration instuctions  but my controls are still not appearing.  All I get is a brief flash of the control on load up(aprox 1 sec) so I know the control is there but just whites out.  Please can anyone help ?

Regards

andy 
at 18/03/2008 15:54

Script controls may not be registered before PreRender.

Hi,
I would need some help too. I am getting the "Script controls may not be registered before PreRender." error message when trying to preview the HelloSilverlight2 webpart. I have followed all the instructions and I have no idea what could be the problem.
Any ideas?
Thank you,
Kinga
at 18/03/2008 22:37

WebHost failed to process a request.

For the media viewer WP and HelloWorld. I followed what was described here + recompiled the xap. (I've seen this somewhere else, and it was ok for me). As said on the blog where I found this idea, my xap was 2k bigger than the original one. (don't know why).

Now, I wanted to try the "Colleague Viewer" sample and I'm facing a new issue.

Event Type: Error
Event Source: System.ServiceModel 3.0.0.0
Event Category: WebHost
Event ID: 3
Date: 19.03.2008
Time: 15:56:05
User: GVA\adm-c.badjaksezian
Computer: AG-TST-MOSS01
Description:
WebHost failed to process a request.
 Sender Information: System.ServiceModel.Activation.HostedHttpRequestAsyncResult/32500813
 Exception: System.ArgumentException: virtualPath
   at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)
   at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result)
 Process Name: w3wp
 Process ID: 784

Anybody can help ?
Thanks
at 19/03/2008 16:10

I linked to your article from my blog

at 21/03/2008 23:51

Blank web part solution

For the non developers who just want to install these web parts on their server but get a blank web part, check step 4 in my instructions (resulting from hours of trouble shooting)
http://www.wssdemo.com/Blog/archive/2008/03/24/installing-the-sharepoint-blueprint-for-silverlight-silverlightpart.aspx
at 23/03/2008 9:17

Hi there

I have followed all this steps (thanx Patric), but i have not VS2008 i my environment, so how can i solve this blank webpart phenomen without recompile..? Any ideas? Just got to have this working, cause its seems just so cool! Btw, is it possible to make Silverlight 2 grapics i blend, and export to this format and make it work in SharePoint?
at 24/03/2008 21:44

Hi

I Have followed all the steps of the check list but still when i try to add a silverlight 2.0 webpart it throws a error stating the DLL is missing. how do i go about this please help me
Thanks in advanve
at 25/03/2008 16:58

Great!


So I did the recompilation, I configured the web.config file and I want to test the Picture Viewer. WHen I load it it works but I don't see the images just a marron square.... How are included the controls with the xaml file? I mean where do we put the dll SL.XAML.SilverlightControls?

Otherwise it looks very nice!
at 26/03/2008 2:22

Nice one - worked for me

Thanks Patrick.   Had been fiddling with this for a few evenings - and have blogged about it...>
     http://grumpywookie.wordpress.com/2008/03/26/getting-started-with-silverlight-blueprint/

Worth noting that there's a ONE FILE download for all the Silverlight bits for dev'ing - on VS-2008...
     http://grumpywookie.wordpress.com/2008/03/26/installing-silverlight-for-vs2008/

Thanks again...!!    Have sung your praises...>
http://grumpywookie.wordpress.com/2008/03/26/success-hello-world-silverlight/

at 26/03/2008 14:00

Still can't get this to work

OK, I followed the directions above, I recompiled the XAP file but I still get a blank SL 2.0 web part. I see the following error on the page:

Line: 377
Char: 17
Error: Sys.InvalidOperationException: InitializeError error #2105 in control 'ctl00_m_g_086d9122_5aab_4360_b1c2_41331a65cb41_HelloSilverlightXaml'
Failed to load pre-requisites for the application
Code: 0

Any ideas?? I really need to get this working. Thanks!!
at 3/04/2008 20:54

More info - Still can't get this to work

I am running Windows Server 2008, IIS7. When I recompile the solution in VS2008, it runs just fine. Just won't run in my SharePoint implementation. I get the little yellow page error icon and clicking on it has the details above.
at 3/04/2008 23:02

SharePoint webpart still empty

I’ve tried everything to run the HelloWorld-Example
…after recomiling the .xap file with VS2008 the testpage.htm works fine. unfortunately in sharepoint the webpart is still empty :(
any ideas?
at 8/04/2008 14:09

Visual How To Center Issue

I got the visual how to center working and I added a page called Custom Activities in SharePoint Designer. The preview image showed up and the video played. Then I tried to create a new page but I called it Top 10. when I try and run the visual how to center I get this error message:

Object reference not set to an instance of an object.   at SL.SharePoint.VisualHowTo.VisualHowToCenter.GetPagesContent()
   at SL.SharePoint.VisualHowTo.VisualHowToCenter.get_HowToContent()
   at ASP._layouts_sl_sharepoint_visualhowto_visualhowtocenter_aspx.__Renderform1(HtmlTextWriter __w, Control parameterContainer)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
   at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer)
   at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
   at System.Web.UI.Page.Render(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Since I am pretty new to programming, I am at a loss to what might be wrong. is this beyond the functionality of the demo? Any help would be greatly appriciated. 
 
 
at 10/04/2008 23:20

Visual How to Center

I figured out my error on the previous post. Once I added text in the short discription field everything worked correctly. This is a great day.
at 10/04/2008 23:25

What is the url to Screencast

In your article you have mentioned about Screencast. What is the Url for that Screencast?
at 11/04/2008 16:56

Quick Possiable Fix for this problem/

The XAP file is a zip file with AppManifest.xaml and the DLL for the silverlight app. The AppManifest.xaml seems to be the culprit. On the first line <deployment add the tag RuntimeVersion="2.0.30226.2". You then need to use the chiron.exe tool (located in the Silverlight SDK under tools) to re-create the XAP.
Seems to have worked for me. I didn't have vs 2008 installed at all.
Hope this helps someone else.
at 22/04/2008 16:40

#2105 Error

For the person who was getting the #2105 error, I was getting that too with the 2.0 version of the HelloSilverlight control. A comment here:

http://grumpywookie.wordpress.com/2008/03/26/getting-started-with-silverlight-blueprint/

pointed to the .xap file being the culprit; the .xap file that the install.bat file in the solution references is never refreshed, even when you recompile the whole solution.

I copied the SL.XAML.HelloSilverlight2.xap file from SL.XAML.HelloSilverlight2\ClientBin to SL.SharePoint.HelloSilverlight2\ClientBin\SL.HelloSilverlight2 in the solution and then ran the install.bat file, and it cleared up the issue.
at 23/04/2008 3:00

Service Pack 1

Hi,
My question would be if it is neccessary to install the Sp 1 update? Or was it neccessary only for some of the blueprints?
Thanks, Kinga
at 23/04/2008 10:16

Social Networking web part flash and dissappear

I noticed Andy comment on a web part flashing and then dissappearing.  I had the same problem with the Social Networking web part and followed the instructions here (http://blogs.msdn.com/gzunino/archive/2007/09/17/hosting-a-wcf-service-in-windows-sharepoint-services-v3-0.aspx).

Since that web part uses a WCF service in _vti_bin that was my culprit.
at 2/05/2008 6:35

WebHost failed to process a request.

One other thing for the error "WebHost failed to process a request."  this link should also fix your problem
(http://blogs.msdn.com/gzunino/archive/2007/09/17/hosting-a-wcf-service-in-windows-sharepoint-services-v3-0.aspx).

Thanks,
Bo
at 2/05/2008 7:07

Can you please post a recompiled .xap?

It will be a great help if you can post a recompiled .xap for the blue prints. Especially for the Picture viewer. I do not have VS2008 installed.
Thanks,
Dan
at 6/05/2008 8:48

Thanks - Works on Server - But not on Clients

Many Thanks for all this detail. It was pretty frustrating getting it to work. We could really could do with the SharePoint/Blueprint  update to properly support  compelling Silverlight Technology.

I can now see my Siverlight WebPart on my server machine, from different users.

The problem now is that I accnnot access theSilverlight Webpart from different machines. - The Page repeatidly asks for Authentification, if I leave the Silverlight WebPart on the page.  Other pages and Web parts are OK, just the Silverlight Webpart page. (I can only regain access if I remove the Silverlight cotrol)  I notice I can only add/configure the Silverlight webpart on the Server Machine.
at 7/05/2008 23:06

Have any idea without VS2008

Hi..i already trying in MOSS 2007 but doesn't working cause i don't have VS2008, do you have other way by using VS2005?
I really appreciate it and waiting for that.

Thanks
at 8/05/2008 8:29

showing Error : Script controls may not be registered before PreRender.

hi  Patrick,
i am trying Sharepoint and silverlight Webpart
i followed all steps given by you ...
i am still getting white screen,but on right click its showing Silverlight text
i have silverlight 2 beta 2, i tried mime tyoe -application/x-silverlight-2-b2 also still not working
please guide me
suyog.kale@gmail.com
at 20/05/2008 7:51

how to create setup projects for Silverlight webpart

hi  Patrick,
i done it , with recompiling the xap,
its working in development environment
but on client pc , its still showing white screen.

also i like to know how to create setup projects for Silverlight webpart
please guide me

suyog.kale@gmail.com
at 22/05/2008 8:33

Client prompts for auth with HelloSilverlight2

The HelloSilverlight2 works great on my machine but SP users (with full control) are prompted to login, and still cannot see the control or add it as a web part. Is this a permissions problem with the ClientBin directory in VirtualDirectories? I am running IIS 7 on Windows 2008 Server.
at 25/06/2008 22:19

HelloSilverlight2 work but media viewer dont

Hi,

The HelloSileverlight2 works beautifully but media viewer not. I've recompiled the project and copied the xap into the clientbin in the inetpub. What appears in the page of the Sharepoint is a marron square. Any help would be appreciate!
at 1/07/2008 10:56

Client prompts for authorization

I have the same problem mentioned at 25/06/2008. The SharePoint is on Windows 2003 server.  Someone knows why.   I really appreciate any help.  Thanks in advance.
at 3/07/2008 11:56

Finally got it all installed and Working - Wow what a marathon

Thanks for all your posts here guys,

From all the pain I had, I decided to compile all the 'old' bits and post the updated versions including a Sample.Web.Config for you.
http://blogs.breezetraining.com.au/mickb/2008/07/13/GettingSilverlight2Beta2WorkingOnWSSMOSSSP1.aspx

I am running on Win2008/IIS7
at 13/07/2008 14:44

Error with Silverlight 2 Beta 2

Hi,

Thanks for preparing the checklist to configure the sharepoint to work with silverlight web parts.

But after following everything mentioned here, I still posses the same error with Silverlight 2 Beta 2 version.

Please let me know does I need to do anything from my end .. or Do I missing anything .

Thanks
Mohammed Idrees
at 17/07/2008 9:34

ssblueprints: Only Version 1 Apps render content

I have enjoyed many of your videos on Channel 9.
I have an issue with all of the Silver light Version 2 apps.
None of those apps render content when loaded in MOSS 2007 as a web part. The work when testing (TestPage.html) but are always blank when loaded into my MOSS 2007 site as a web part.
I have made all the modifications (web.config, MIME, recompiled, etc. etc.) and have all the dependencies and have checked everything over and over and over and over again.
A couple of differences:
1. In my environment all boxes are 64 bit (including all our VMware Win 2003 MOSS 2007 Development servers).
I am starting to suspect that the web parts are not finding "C:\Program Files (x86)\Microsoft SDKs\Silverlight\v2.0\Libraries\Server\System.Web.Silverlight.dll" (also GACed)?
2. I am using the current Silver light Pluggin (version "Version: 2.0.30523.8") instead of the Version 2 Beta 1.
Note: I added the MIME Type Extension: .xap MIME Type: application/x-silverlight-app since I am not running the V2 Beta 1 pluggin.
Also, when I recompile the solution AppManifest.xaml is getting rewritten as RuntimeVersion="2.0.30523.6"??
If I manually update this to RuntimeVersion="2.0.30523.8" it makes no difference.
Could you help me with some ideas?
Thanks, I have been googling for days so will spare you a listing of all the fixes I have attempted.
PS: Fiddler 2 shows that the .xap FILE is getting download fine (code 200)
at 6/08/2008 23:42

opinion

Gotta love that Firefox winning formula. See what Opera does...then do exactly that. For a moment I thought Firefox was innovating with its "awesome bar" and even read several books on this problem ( http://www.ebook-search-queen.com/ ) But upon inspection, I found that typing "awesome bar" in opera displays...this page.
at 23/06/2009 16:32

opinion

Gotta love that Firefox winning formula. See what Opera does...then do exactly that. For a moment I thought Firefox was innovating with its "awesome bar" and even read several books on this problem ( http://www.ebook-search-queen.com/ ) But upon inspection, I found that typing "awesome bar" in opera displays...this page.
at 23/06/2009 16:33
Captcha

Enter the code shown above: *

(Note: If you cannot read the numbers in the above
image, reload the page to generate a new one.)