<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Chris Forbes blogs on SharePoint &#38; .NET &#187; SharePoint 2010</title>
	<atom:link href="http://chrisforbesblogs.net/tag/sharepoint-2010/feed/" rel="self" type="application/rss+xml" />
	<link>http://chrisforbesblogs.net</link>
	<description>Developers chat on SharePoint and .NET</description>
	<lastBuildDate>Tue, 08 May 2012 10:58:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='chrisforbesblogs.net' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/3aa4775025bad14a027d0ade34632a33?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Chris Forbes blogs on SharePoint &#38; .NET &#187; SharePoint 2010</title>
		<link>http://chrisforbesblogs.net</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://chrisforbesblogs.net/osd.xml" title="Chris Forbes blogs on SharePoint &#38; .NET" />
	<atom:link rel='hub' href='http://chrisforbesblogs.net/?pushpress=hub'/>
		<item>
		<title>Integrating Silverlight and Webcams with SharePoint 2010</title>
		<link>http://chrisforbesblogs.net/2011/01/11/integrating-silverlight-and-webcams-with-sharepoint-2010/</link>
		<comments>http://chrisforbesblogs.net/2011/01/11/integrating-silverlight-and-webcams-with-sharepoint-2010/#comments</comments>
		<pubDate>Tue, 11 Jan 2011 22:02:00 +0000</pubDate>
		<dc:creator>Chris Forbes</dc:creator>
				<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[jpeg encoding]]></category>
		<category><![CDATA[sharepoint client object model]]></category>
		<category><![CDATA[webcams]]></category>

		<guid isPermaLink="false">https://chrisforbesblogs.wordpress.com/?p=415</guid>
		<description><![CDATA[I’ve been working a lot with webcams and the SharePoint client object model and have read a number of postings on the subject. I thought I’d try and put one together which brings all the relevant components together to cover the following scenario. &#160; Scenario &#160; SharePoint picture library including the Silverlight webcam web part [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chrisforbesblogs.net&#038;blog=6742676&#038;post=415&#038;subd=chrisforbesblogs&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I’ve been working a lot with webcams and the SharePoint client object model and have read a number of postings on the subject. I thought I’d try and put one together which brings all the relevant components together to cover the following scenario.</p>
<p>&#160;</p>
<h2>Scenario</h2>
<p>&#160;</p>
<p><a href="http://chrisforbesblogs.files.wordpress.com/2011/01/image.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="image" border="0" alt="image" src="http://chrisforbesblogs.files.wordpress.com/2011/01/image_thumb.png?w=591&h=442" width="591" height="442" /></a> </p>
<p align="center"><em>SharePoint picture library including the Silverlight webcam web part</em></p>
<p align="center"><em></em></p>
<p>To create a SharePoint web part which enables a user to turn on their web cam and allow them to take a picture then save the picture back into a picture library.</p>
<p>To achieve this I have create a fairly simple Silverlight application using the new webcam capabilities now available in Silverlight 4. </p>
<p>When the picture is captured the resulting picture is stored wihtin a WriteableBitmap. I have used an open source assembly (<a href="http://code.google.com/p/fjcore/" target="_blank">FJ.Core</a>) to convert this into a more appropriate Jpeg.</p>
<p>Finally I hook into SharePoint using the client object model available in SharePoint 2010 and save the Jpeg back into the picture library</p>
<p>&#160;</p>
<h2>Walk through.</h2>
<p>&#160;</p>
<p>Create a standard Silverlight 4 application and add the following reference dll&#8217;s</p>
<ol>
<li>FJ.Core (for JPeg encoding)</li>
<li>SharePoint&#8217;s client object model dll&#8217;s     <br /> (Note. You can find these dll in the <a href="http://chrisforbesblogs.net/2009/04/27/12-hive-quick-file-path-reference/" target="_blank">14 Hive</a> layouts\clientbin directory)      <br />&#160; a. <strong>Microsoft.SharePoint.Client.Siverlight       <br /></strong>&#160; b. <strong>Microsoft.SharePoint.Client.Silverlight.Runtime       <br /></strong>&#160;&#160; <br /> 
<p><strong><em>Notes on MVVM</em></strong>        <br />In my example I have stuck with MVVM (Model View ViewModel)&#160; checkout <strong><a href="http://www.silverlight.net/learn/tutorials/silverlight-4/using-the-mvvm-pattern-in-silverlight-applications/" target="_blank">silverlight.net</a></strong> for more information On MVVM. I have a couple of base classes which I find useful when working with MVVM, One for handling commanding with delegates &#8216;DelegateCommand.cs&#8217; and &#8216;MVVMBase.cs&#8217;&#160; to handle some standard stuff in your model objects just i.e. NotifyChanged helper methods etc.</p>
</li>
</ol>
<h3>Changes to APP.XAML</h3>
<p> 
<p>Open the App.axml.cs file and add a    <br /> Using Microsoft.SharePoint.Client;    <br />&#160; <br />Add the following code to the StartUp&#160; method</p>
<pre>//Sharepoint context binding<br />ApplicationContext.Init(e.InitParams, <br />System.Threading.SynchronizationContext.Current);</pre>
<p>The above ensures the ApplicationContext gets initialised with the same init. Paramaters and synchronizationCotext as the current thread.</p>
<p>&#160;</p>
<h3>Main.XAML</h3>
<p></p>
<p>I have left the default Silverlight page created in a new project as MainPage.axml.<br />
  <br />The first thing to note that this usercontrol has a resource loading the associated viewModel class and is set as the default context of the control.</p>
<pre class="code">    <span style="color:blue;">&lt;</span><span style="color:#a31515;">UserControl.Resources</span><span style="color:blue;">&gt;
        &lt;</span><span style="color:#a31515;">local</span><span style="color:blue;">:</span><span style="color:#a31515;">MainViewModel </span><span style="color:red;">x</span><span style="color:blue;">:</span><span style="color:red;">Key</span><span style="color:blue;">=&quot;viewModel&quot; </span><span style="color:red;">d</span><span style="color:blue;">:</span><span style="color:red;">IsDataSource</span><span style="color:blue;">=&quot;True&quot;/&gt;
    &lt;/</span><span style="color:#a31515;">UserControl.Resources</span><span style="color:blue;">&gt;
    &lt;</span><span style="color:#a31515;">UserControl.DataContext</span><span style="color:blue;">&gt;
        &lt;</span><span style="color:#a31515;">Binding </span><span style="color:red;">Source</span><span style="color:blue;">=&quot;{</span><span style="color:#a31515;">StaticResource </span><span style="color:red;">viewModel</span><span style="color:blue;">}&quot;/&gt;
    &lt;/</span><span style="color:#a31515;">UserControl.DataContext</span><span style="color:blue;">&gt;
</span></pre>
<p align="left">&#160;</p>
<p align="left">In this xaml file I layout a grid with 2 columns and 2 rows. The first row comprised of a rectangle which will get filled with the videobrush which has a source of the web cam and the image on the right hand side gets bound to a WriteableBitmap which is a snapshot taken when the user takes a pic.<br />
  <br />A couple of buttons are added to Start the cam, Take a picture then save to sharepoint. To avoid code behind these are all bound to appropriate commands.</p>
<p align="left">&#160;</p>
<h3>MainViewModel.CS</h3>
<p>
  <br />All the interesting stuff is in a single viewModel class &#8216;MainViewModel.cs&#8217;</p>
<p>First thing to note is this class inherits from my MVVMBase.cs which gives access to a helper method&#160; </p>
<pre class="code"><span style="color:blue;">public void </span>NotifyPropertyChanged(<span style="color:blue;">string </span>propertyName)</pre>
<p>&#160;</p>
<p>I have a few properties which get bound to objects over in Main.axml which are</p>
<ol>
<li> CapturedImage &#8211; the image object binds its source to this. This is the actual picture taken</li>
<li> VideoBrush &#8211; the rectangle object binds its fill to this. This is the web cam</li>
<li>Commands : StartCommand, TakePictureCommand and SaveToSharePoint command are bound to their respective buttons<br />
    <br />&#160;</li>
<p><strong></strong></ol>
<ol><strong>The constructor</strong></p>
<p>In addition to wiring up the command objects the constructor initialises the CaptureSource object and associates a delegate to the CaptureImageCompleted event. This simply grabs the image capture and stores this to a WriteableBitmap object &#8216;capturedImage&#8217;. I then call a helper methods &#8216;RefreshCommandStatus&#8217; which causes the command object’s &#8216;canExecute&#8217; methods to fire resulting in the buttons being enabled or disabled appropriately.&#160; For example if the web cam has not yet been started then the Take Picture button shall remain &#8216;disabled&#8217;</ol>
<p><strong>Start the cam</strong></p>
<pre class="code"><span style="color:blue;">if </span>(_captureSource != <span style="color:blue;">null</span>)
     {
         <span style="color:blue;">if </span>(_captureSource.State != <span style="color:#2b91af;">CaptureState</span>.Stopped)
         {
             _captureSource.Stop(); <span style="color:green;">// stop whatever device may be capturing
         </span>}

         <span style="color:green;">// create the brush
         </span>VideoBrush = <span style="color:blue;">new </span><span style="color:#2b91af;">VideoBrush</span>();                
         VideoBrush.SetSource(_captureSource);

         <span style="color:green;">// request user permission and display the capture
         </span><span style="color:blue;">if </span>(<span style="color:#2b91af;">CaptureDeviceConfiguration</span>.AllowedDeviceAccess || <br />             <span style="color:#2b91af;">CaptureDeviceConfiguration</span>.RequestDeviceAccess())
         {
             _captureSource.Start();
         }
     }

     RefreshCommandStates();</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p align="left">Starting the web cam is simple…<br />
  <br />Firstly check the cam is initially stopped by looking at the &#8216;State&#8217; property of _CaptureSource. If it isn’t already stopped then stop it.</p>
<p>Then create a VideoBrush object and set its source to reference the webcam. (This is bound to the Fill property of the rectangle object in Main.axml)</p>
<p>Then you need to attempt to start the cam but you need to wrap this around a couple of checks. Either the user has already specified that the web cam can be used by this application or you can ask Silverlight to ask the user now</p>
<p align="center"><a href="http://chrisforbesblogs.files.wordpress.com/2011/01/image1.png"><img style="border-bottom:0;border-left:0;display:block;float:none;margin-left:auto;border-top:0;margin-right:auto;border-right:0;" title="image" border="0" alt="image" src="http://chrisforbesblogs.files.wordpress.com/2011/01/image_thumb1.png?w=418&h=161" width="418" height="161" /></a><em>Prompt displayed to user when attempting to start the cam.</em>&#160;</p>
<p>I then call the refreshcommandstates method to update the status of the buttons. Resulting in the &#8216;Start Cam&#8217; button being disabled and the &#8216;Take picture&#8217; button being enabled.</p>
<p align="left"><strong>Take a picture</strong></p>
<p>This is the rocket science bit (not!) Just call the&#160; capturesource.CaptureImageAsync method. Because I wired a delegate up in the consturctor when this event has completed an asyncrounous method gets called when the work has been done and the image is saved down to my writeable bitmap property. Binding of the image object ‘source’ property in Main.axml will automaticlally be notified of this change and therefore display the captured image.</p>
<pre style="font-family:consolas;"><span style="color:#a31515;">&#160;</span><span style="color:blue;">&lt;</span><span style="color:#a31515;">Image</span><span style="color:red;"> x</span><span style="color:blue;">:</span><span style="color:red;">Name</span><span style="color:blue;">=</span><span style="color:blue;">&quot;takenPicture&quot;</span><span style="color:red;"> Source</span><span style="color:blue;">=&quot;{</span><span style="color:#a31515;">Binding</span><span style="color:red;"> capturedImage</span><span style="color:blue;">}</span><span style="color:blue;">&quot;</span><span style="color:blue;"> /&gt;</span></pre>
<p><span style="color:blue;"></span></p>
<p><font color="#0000ff" face="Consolas"></font></p>
<p></p>
<p><strong></strong></p>
<p><strong></strong></p>
<p><strong>Save picture<br />
    <br /></strong>To avoid unnecessary requests back and forth to your SharePoint server you can pipe all your requests together such i.e. get web, get list and create item. When your done you then execute all the queries async fashion. Then, with call back delegates you can handle the results &#8216;Success&#8217; or &#8216;Failure&#8217; (Success hopefully). </p>
<p></p>
<p>So…</p>
<p>Initiate spClientConext &#8211; Ok I hard coded <a href="http://sp2010">http://sp2010</a> but you would be best to pass this stuff in dynamically via your web part.</p>
<pre class="code">spClientContext = <span style="color:blue;">new </span>sp.<span style="color:#2b91af;">ClientContext</span>(<span style="color:#a31515;">&quot;http://sp2010&quot;</span>);</pre>
<p>&#160;</p>
<p>Get the appropriate document library. In this case its called &#8216;pictures&#8217; which is a standard SharePoint picture library</p>
<p>&#160;</p>
<pre class="code">spPictureList = spClientContext.Web.Lists.GetByTitle(<span style="color:#a31515;">&quot;pictures&quot;</span>);</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>&#160;</p>
<p>Then I create a new FileCreationInformation object. Here I specifiy some properties the main ones are &#8216;Content&#8217; which is a stream, in this case I convert the writeablebitmap to a Jpeg then into a memory stream, see the helper methods &#8216;pictureStream&#8217; and &#8216;EncodeJpeg&#8217;<br />
  <br />The next property is Url. To ensure I gave this something unique I just used the TimeOfDays.Ticks property but you could prompt the user for a filename.</p>
<p>&#160;</p>
<pre class="code"><span style="color:green;">//Create the FileCreationInformation object
                </span><span style="color:#2b91af;">FileCreationInformation </span>fci = <span style="color:blue;">new </span><span style="color:#2b91af;">FileCreationInformation</span>();
                fci.Overwrite = <span style="color:blue;">true</span>;
                
                fci.Content = pictureStream().ToArray();
                fci.Url = <span style="color:#2b91af;">DateTime</span>.Now.TimeOfDay.Ticks + <span style="color:#a31515;">&quot;.jpg&quot;</span>;

                <span style="color:green;">//Add to picture library
                </span>spPictureList.RootFolder.Files.Add(fci);</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>Then I add the FIleCreationInformation object to the picture library&#8217;s rootFolder</p>
<p>Finally calling the ExectueeQueryAsync method. When the work is done either my saveSucceeded or saveFailed delgates will be called. </p>
<p>
  <br /><strong>SaveSucceeded</strong></p>
<p>Because this occurs on another thread from the UI thread you need to make sure your call back methods don’t try and access UI objects directly. </p>
<p>By running the code within the Dispatcher I can safley reference objects available in the UI thread. In this case I display a messagebox to the user, then I clear the capturedImage object to allow the user to take another picture. </p>
<p>I also disabled the save button just before the async. Method was&#160; called then enabled it again on completion. Because this is running async. You cant be sure how long the operation will take and&#160; you don’t want the pesky impatient user clicking save again <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Running it</strong></p>
<p>In this case I simply uploaded the compiled XAP file to a SharePoint document library then used the out of the box SharePoint Silverlight web part. But it would be a better idea to package up your own web part (See previous posting <a href="http://chrisforbesblogs.net/2010/08/11/deploying-a-silverlight-application-to-sharepoint-2010/" target="_blank">Deploying a silverlight application to SharePoint</a>). This will allow you to pass in dynamic parameters for the library name and site url and not hardcode things like I did in this example.</p>
<p><strong></strong></p>
<p><strong><a href="http://cid-dda1cbcbc88f4af1.office.live.com/self.aspx/chrisforbesblogs/SPWebCam.zip" target="_blank">Download Source Code Here</a></strong></p>
<p><strong></strong></p>
<p><strong></strong></p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:e95502d0-c0ca-4436-af44-d5517fd49754" class="wlWriterEditableSmartContent">del.icio.us Tags: <a href="http://del.icio.us/popular/silverlight" rel="tag">silverlight</a>,<a href="http://del.icio.us/popular/sharepoint+client+object+model" rel="tag">sharepoint client object model</a>,<a href="http://del.icio.us/popular/webcams" rel="tag">webcams</a>,<a href="http://del.icio.us/popular/jpeg+encoding" rel="tag">jpeg encoding</a></div>
</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:a51f94aa-75e4-472e-a4b1-1100bd0f6787" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/silverlight" rel="tag">silverlight</a>,<a href="http://technorati.com/tags/sharepoint+client+object+model" rel="tag">sharepoint client object model</a>,<a href="http://technorati.com/tags/webcams" rel="tag">webcams</a></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/chrisforbesblogs.wordpress.com/415/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/chrisforbesblogs.wordpress.com/415/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/chrisforbesblogs.wordpress.com/415/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/chrisforbesblogs.wordpress.com/415/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/chrisforbesblogs.wordpress.com/415/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/chrisforbesblogs.wordpress.com/415/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/chrisforbesblogs.wordpress.com/415/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/chrisforbesblogs.wordpress.com/415/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/chrisforbesblogs.wordpress.com/415/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/chrisforbesblogs.wordpress.com/415/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/chrisforbesblogs.wordpress.com/415/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/chrisforbesblogs.wordpress.com/415/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/chrisforbesblogs.wordpress.com/415/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/chrisforbesblogs.wordpress.com/415/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chrisforbesblogs.net&#038;blog=6742676&#038;post=415&#038;subd=chrisforbesblogs&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://chrisforbesblogs.net/2011/01/11/integrating-silverlight-and-webcams-with-sharepoint-2010/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ed3e25ef8a88f8fff819a7722f1805a9?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">chrisforbesblogs</media:title>
		</media:content>

		<media:content url="http://chrisforbesblogs.files.wordpress.com/2011/01/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://chrisforbesblogs.files.wordpress.com/2011/01/image_thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Deploying a Silverlight application to SharePoint 2010</title>
		<link>http://chrisforbesblogs.net/2010/08/11/deploying-a-silverlight-application-to-sharepoint-2010/</link>
		<comments>http://chrisforbesblogs.net/2010/08/11/deploying-a-silverlight-application-to-sharepoint-2010/#comments</comments>
		<pubDate>Wed, 11 Aug 2010 14:32:00 +0000</pubDate>
		<dc:creator>Chris Forbes</dc:creator>
				<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[VisualStudio2010]]></category>
		<category><![CDATA[WebParts]]></category>

		<guid isPermaLink="false">https://chrisforbesblogs.wordpress.com/?p=338</guid>
		<description><![CDATA[How to deploy Silverlight to SharePoint 2010 and also create a web part to display it.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chrisforbesblogs.net&#038;blog=6742676&#038;post=338&#038;subd=chrisforbesblogs&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2><a href="http://chrisforbesblogs.files.wordpress.com/2010/08/image.png"><img style="display:inline;margin-left:0;margin-right:0;border:0;" title="image" src="http://chrisforbesblogs.files.wordpress.com/2010/08/image_thumb.png?w=241&h=275" border="0" alt="image" width="241" height="275" align="right" /></a></h2>
<h2>Overview </h2>
<p>In this posting I hope to provide you with an guide on how to deploy a Silverlight application to SharePoint 2010. I’ll deploy this as a sandbox solution but will point out where you might do things a little differently if you want to deploy as a file based solution to the <a href="http://chrisforbesblogs.net/2009/04/27/12-hive-quick-file-path-reference/" target="_blank">14 Hive</a>.</p>
<p>To use the deployed Silverlight app. you could go ahead and use the new Silverlight web part. Great for testing but to make things easier for the user you could also wrap this up in a deployable web part. I’ll outline how you can achieve this within the same solution too.</p>
<h2>Creating the Visual Studio 2010 Solution and projects.</h2>
<p>In the following steps I’ll create an empty SharePoint solution in Visual Studio 2010. I’ll add Silverlight project to the solution then create some SharePoint Items to handle the deployment of the XAP file and also the wrapper web part.</p>
<p>1. Create a new empty SharePoint solution.</p>
<p><a href="http://chrisforbesblogs.files.wordpress.com/2010/08/image1.png"><img style="display:block;float:none;margin-left:auto;margin-right:auto;border-width:0;" title="image" src="http://chrisforbesblogs.files.wordpress.com/2010/08/image_thumb1.png?w=640&h=443" border="0" alt="image" width="640" height="443" /></a></p>
<p>2. Select the appropriate type of solution. In this case I am keeping the solution as a ‘Sandbox’ solution.</p>
<p><a href="http://chrisforbesblogs.files.wordpress.com/2010/08/image2.png"><img style="display:block;float:none;margin-left:auto;margin-right:auto;border-width:0;" title="image" src="http://chrisforbesblogs.files.wordpress.com/2010/08/image_thumb2.png?w=609&h=480" border="0" alt="image" width="609" height="480" /></a></p>
<p>3. Add the Silverlight application to the solution. In this case I’m create a new Silverlight application. From the menus select File – Add – New Project. Choose the appropriate Silverlight template then click ok, and click ok on the following dialog to create the test app (If required).</p>
<p><a href="http://chrisforbesblogs.files.wordpress.com/2010/08/image3.png"><img style="display:block;float:none;margin-left:auto;margin-right:auto;border:0;" title="image" src="http://chrisforbesblogs.files.wordpress.com/2010/08/image_thumb3.png?w=642&h=444" border="0" alt="image" width="642" height="444" /></a></p>
<p>4.As you probably know all you need to run the Silverlight application is the .XAP file which is the created at compile time. Therefore this is all you need to deploy from your Silverlight project to the SharePoint solution. In this example I have created a sandbox solution so will create a SharePoint Module to upload the XAP file into the SharePoint content database.  (If you want to deploy this a standard solution (ie non-sandbox) then you can create a mapping to a 14 Hive folder and deploy the file there)</p>
<p>In this step I add a SharePoint project item ‘Module’ to the SharePoint solution. Right click on the SharePoint project and select ‘Add new item’</p>
<p><a href="http://chrisforbesblogs.files.wordpress.com/2010/08/image4.png"><img style="display:block;float:none;margin-left:auto;margin-right:auto;border:0;" title="image" src="http://chrisforbesblogs.files.wordpress.com/2010/08/image_thumb4.png?w=640&h=351" border="0" alt="image" width="640" height="351" /></a></p>
<p>The created module provides you with a sample.txt file and an elements xml file. Any file you drop into this folder will be automatically included in the elements.xml file and therefore shall  be uploaded into SharePoint. Go ahead and delete the sample.txt file.</p>
<p>5. Next you want a post build script to run on your <strong>Silverlight</strong> project to copy over the XAP file from the appropriate bin directory (Debug or Release, based on you compile options). You need to initially build the silverlight application to see the XAP file. By default the bin directory is hidden so click the ‘show all files’ icon highlighted in the solution explorer and locate the bin\debug directory. There you can see the XAP file.</p>
<p><a href="http://chrisforbesblogs.files.wordpress.com/2010/08/image5.png"><img style="display:block;float:none;margin-left:auto;margin-right:auto;border:0;" title="image" src="http://chrisforbesblogs.files.wordpress.com/2010/08/image_thumb5.png?w=201&h=240" border="0" alt="image" width="201" height="240" /></a></p>
<p>Right click the Silverlight application and locate the post-build events box within the build events tab and key in something like the following.</p>
<p><em>copy &#8220;$(TargetDir)SilverlightApplication.xap&#8221; &#8220;$(SolutionDir)SilverlightWebPartSample\SilverlightFile&#8221;</em></p>
<p>Couple points to note here. Wrap your file paths in quotes, I found some issues with long file paths, spaces etc. Also the $(TargetDir) and $(SolutionDir) both post fix a backslash so you don&#8217;t need to supply one.</p>
<p>Once you have done this go ahead an compile the Silverlight project once more. Then look at the SharePoint project and in particular the ‘SilverlightFile’ module. If you are ‘showing all files’ you should see the SilverlightApplication.xap file.  You need to right click this file now and select ‘include’ If you then look at the elements.xml file within this module you will see Visual Studio has automatically added a reference to this file now. Neat and also eliminates any typos in this xml file <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://chrisforbesblogs.files.wordpress.com/2010/08/image6.png"><img style="display:block;float:none;margin-left:auto;margin-right:auto;border:0;" title="image" src="http://chrisforbesblogs.files.wordpress.com/2010/08/image_thumb6.png?w=211&h=240" border="0" alt="image" width="211" height="240" /></a></p>
<div>
<pre class="code"><span style="color:blue;">&lt;?</span><span style="color:#a31515;">xml </span><span style="color:red;">version</span><span style="color:blue;">=</span>"<span style="color:blue;">1.0</span>" <span style="color:red;">encoding</span><span style="color:blue;">=</span>"<span style="color:blue;">utf-8</span>"<span style="color:blue;">?&gt;
&lt;</span><span style="color:#a31515;">Elements </span><span style="color:red;">xmlns</span><span style="color:blue;">=</span>"<span style="color:blue;">http://schemas.microsoft.com/sharepoint/</span>"<span style="color:blue;">&gt;
  &lt;</span><span style="color:#a31515;">Module </span><span style="color:red;">Name</span><span style="color:blue;">=</span>"<span style="color:blue;">SilverlightFile</span>"<span style="color:blue;">&gt;
  &lt;</span><span style="color:#a31515;">File </span><span style="color:red;">Path</span><span style="color:blue;">=</span>"<span style="color:blue;">SilverlightFile\SilverlightApplication.xap</span>" <span style="color:red;">Url</span><span style="color:blue;">=</span>"<span style="color:blue;">SilverlightFile/SilverlightApplication.xap</span>" <span style="color:blue;">/&gt;
&lt;/</span><span style="color:#a31515;">Module</span><span style="color:blue;">&gt;
&lt;/</span><span style="color:#a31515;">Elements</span><span style="color:blue;">&gt;
</span></pre>
</div>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>6. You need to play around with the build order to ensure your Silverlight application builds first then its post build event will copy the XAP file to your SharePoint project. Obviously you don’t want this the wrong way around as your SharePoint solution will never get the current XAP file for deployment.</p>
<p>You can modify the build order by right clicking the Solution and selecting ‘Build Dependencies’ From here select the SharePoint project and make sure its dependent on the Silverlight application. Click ok then check this by right clicking the solution once more and this time select dependency order.</p>
<p><a href="http://chrisforbesblogs.files.wordpress.com/2010/08/image7.png"><img style="display:block;float:none;margin-left:auto;margin-right:auto;border:0;" title="image" src="http://chrisforbesblogs.files.wordpress.com/2010/08/image_thumb7.png?w=240&h=220" border="0" alt="image" width="240" height="220" /></a></p>
<p><a href="http://chrisforbesblogs.files.wordpress.com/2010/08/image8.png"><img style="display:block;float:none;margin-left:auto;margin-right:auto;border:0;" title="image" src="http://chrisforbesblogs.files.wordpress.com/2010/08/image_thumb8.png?w=240&h=222" border="0" alt="image" width="240" height="222" /></a></p>
<h2>Creating a web part to display the associated Silverlight application</h2>
<p>The previous steps would allow you to go-ahead an build and deploy the solution to SharePoint. At which point you could use the out of the box Silverlight web part but in the following steps I’ll create a simple web part which automatically displays the Silverlight application. Once deployed you can then select the web part and drop it onto your page.</p>
<p>1. using the existing solution outlined in the previous section select’ Add new item’ within the SharePoint solution. And add a new c# web part (Not a visual web part, this wont work as a sandbox solution anyway) And give it a name. I have been creative here and named it SilverlightApplicationWebPart</p>
<p><a href="http://chrisforbesblogs.files.wordpress.com/2010/08/image9.png"><img style="display:block;float:none;margin-left:auto;margin-right:auto;border:0;" title="image" src="http://chrisforbesblogs.files.wordpress.com/2010/08/image_thumb9.png?w=640&h=442" border="0" alt="image" width="640" height="442" /></a></p>
<p>Solution Explorer…</p>
<p><a href="http://chrisforbesblogs.files.wordpress.com/2010/08/image10.png"><img style="display:block;float:none;margin-left:auto;margin-right:auto;border:0;" title="image" src="http://chrisforbesblogs.files.wordpress.com/2010/08/image_thumb10.png?w=225&h=480" border="0" alt="image" width="225" height="480" /></a></p>
<p>2.  We basically want this web part to render out some HTML which will instruct the browser to load the Silverlight application. Luckily the HTML has already been written for us in the supporting Silverlight test web app. Just open up the HTML file and copy the &lt;object&gt; html code.</p>
<p><a href="http://chrisforbesblogs.files.wordpress.com/2010/08/image11.png"><img style="display:block;float:none;margin-left:auto;margin-right:auto;border:0;" title="image" src="http://chrisforbesblogs.files.wordpress.com/2010/08/image_thumb11.png?w=1024&h=264" border="0" alt="image" width="1024" height="264" /></a></p>
<p>3. Once you have this code copied open up with webpart code page and add the following code.</p>
<pre class="code"><span style="color:blue;">namespace </span>CFB.lab.SilverlightWebPartSample.SilverlightApplicaitonWebPart
{
    [<span style="color:#2b91af;">ToolboxItemAttribute</span>(<span style="color:blue;">false</span>)]
    <span style="color:blue;">public class </span><span style="color:#2b91af;">SilverlightApplicaitonWebPart </span>: <span style="color:#2b91af;">WebPart
    </span>{

        <span style="color:blue;">protected override void </span>Render(<span style="color:#2b91af;">HtmlTextWriter </span>writer)
        {
            <span style="color:blue;">string </span>x =                                                                                                                           <span style="color:#a31515;">"+
            "     &lt;param name='source' value='ClientBin/SilverlightApplication.xap'/&gt;                                                            "</span>+
            <span style="color:#a31515;">"     &lt;param name='onError' value='onSilverlightError' /&gt;                                                                            "</span>+
            <span style="color:#a31515;">"     &lt;param name='background' value='white' /&gt;                                                                                      "</span>+
            <span style="color:#a31515;">"   &lt;object data='data:application/x-silverlight-2,' type='application/x-silverlight-2' width='100%' height='100%'&gt;                  "</span>+
            <span style="color:#a31515;">"     &lt;param name='minRuntimeVersion' value='4.0.50401.0' /&gt;                                                                         "</span>+
            <span style="color:#a31515;">"     &lt;param name='autoUpgrade' value='true' /&gt;                                                                                      "</span>+
            <span style="color:#a31515;">"     &lt;a href='http://go.microsoft.com/fwlink/?LinkID=149156&amp;v=4.0.50401.0' style='text-decoration:none'&gt;                            "</span>+
             <span style="color:#a31515;">"         &lt;img src='http://go.microsoft.com/fwlink/?LinkId=161376' alt='Get Microsoft Silverlight' style='border-style:none'/&gt;       "</span>+
            <span style="color:#a31515;">"     &lt;/a&gt;       "</span>+
            <span style="color:#a31515;">"   &lt;/object&gt;              "</span>;                                                                                                          

            writer.Write(x);
            <span style="color:blue;">base</span>.Render(writer);

        }
    }
}</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>Note : You need to change the first line of the HTML as the silverlight app will no longer exists in the ClientBin. This should now read…</p>
<p><span style="color:#a31515;">            &#8220;     &lt;param name=&#8217;source&#8217; value=&#8217;SilverlightFile/SilverlightApplication.xap&#8217;/&gt;    “</span></p>
<p>The ‘SilverlightFile’ corresponds to the module name you gave within the SharePoint project.</p>
<p>When you copy the HTML over just highlight the code and do a quick find and replace of the double quotes to single quotes. Then build this out as a string.</p>
<p>If you really want to save time you could use the new multi-line edit in VS2010 just hold the Alt key while selecting the space on the screen where you want to add multiple lines of the same content…</p>
<p><a href="http://chrisforbesblogs.files.wordpress.com/2010/08/image12.png"><img style="display:block;float:none;margin-left:auto;margin-right:auto;border:0;" title="image" src="http://chrisforbesblogs.files.wordpress.com/2010/08/image_thumb12.png?w=98&h=186" border="0" alt="image" width="98" height="186" /></a></p>
<p>Note: If your Silverlight needs any init parameters you can easily add them here. For example you may require some query string parameters. You can get this from the web part and add dynamically add them to your string. Here is an example of injecting a querystring value</p>
<pre style="font-family:consolas;">   <span style="color:blue;">public</span> <span style="color:blue;">class</span> <span style="color:#2b91af;">SilverlightApplicaitonWebPart</span> : <span style="color:#2b91af;">WebPart</span>    {                <span style="color:blue;">protected</span> <span style="color:blue;">override</span> <span style="color:blue;">void</span> Render(<span style="color:#2b91af;">HtmlTextWriter</span> writer)        {            <span style="color:blue;">string</span> YOURVALUE = <span style="color:#a31515;">""</span>;            <span style="color:blue;">if</span> (Context.Request.QueryString[<span style="color:#a31515;">"yourvalue"</span>] != <span style="color:blue;">null</span>) YOURVALUE = Context.Request.QueryString[<span style="color:#a31515;">"yourvalue"</span>].ToUpper();

            <span style="color:blue;">string</span> x =                                                                                                                           <span style="color:#a31515;">"+</span>     <span style="color:#a31515;">"     &lt;param name='source' value='ClientBin/SilverlightApplication.xap'/&gt;                                                            "</span>+     <span style="color:#a31515;">"     &lt;param name='onError' value='onSilverlightError' /&gt;                                                                            "</span>+     <span style="color:#a31515;">"     &lt;param name='background' value='white' /&gt;                                                                                      "</span>+            <span style="color:#a31515;">"   &lt;object data='data:application/x-silverlight-2,' type='application/x-silverlight-2' width='100%' height='100%'&gt;                  "</span>+     <span style="color:#a31515;">"     &lt;param name='minRuntimeVersion' value='4.0.50401.0' /&gt;                                                                         "</span>+     <span style="color:#a31515;">"     &lt;param name='autoUpgrade' value='true' /&gt;                                                                                      "</span>+            <span style="color:#a31515;">"     &lt;param name='initParams' value='YOURKEY="</span>+YOURVALUE+ <span style="color:#a31515;">"' /&gt;"</span> +     <span style="color:#a31515;">"     &lt;a href='http://go.microsoft.com/fwlink/?LinkID=149156&amp;v=4.0.50401.0' style='text-decoration:none'&gt;                            "</span>+  <span style="color:#a31515;">"         &lt;img src='http://go.microsoft.com/fwlink/?LinkId=161376' alt='Get Microsoft Silverlight' style='border-style:none'/&gt;       "</span>+     <span style="color:#a31515;">"     &lt;/a&gt;       "</span>+         <span style="color:#a31515;">"   &lt;/object&gt;              "</span>;                                                                                                                                                                                                                                                                       writer.Write(x);            <span style="color:blue;">base</span>.Render(writer);                  }    }</pre>
<p>4. OK so now you are good to build. Providing you have no build errors, right-click the SharePoint project and select ‘Deploy’</p>
<p>5. To test the web part, edit a page within the SharePoint site and locate the published web part. Once its added to the page it should load up the appropriate silverlight app. My example has gone for an innovative ‘Hello SharePoint from Silverlight’ message. My creativity knows no bounds.</p>
<p><em>Editing the page – select the published web part to add then click Add…</em><a href="http://chrisforbesblogs.files.wordpress.com/2010/08/image13.png"><img style="display:block;float:none;margin-left:auto;margin-right:auto;border:0;" title="image" src="http://chrisforbesblogs.files.wordpress.com/2010/08/image_thumb13.png?w=640&h=237" border="0" alt="image" width="640" height="237" /></a></p>
<p><a href="http://chrisforbesblogs.files.wordpress.com/2010/08/image14.png"><img style="display:block;float:none;margin-left:auto;margin-right:auto;border:0;" title="image" src="http://chrisforbesblogs.files.wordpress.com/2010/08/image_thumb14.png?w=640&h=312" border="0" alt="image" width="640" height="312" /></a></p>
<p>Hope this is of some help, happy coding <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:98367351-3511-4b60-9499-d7461b2a7f8a" class="wlWriterEditableSmartContent" style="display:inline;float:none;margin:0;padding:0;">Technorati Tags: <a rel="tag" href="http://technorati.com/tags/SharePoint+2010">SharePoint 2010</a>,<a rel="tag" href="http://technorati.com/tags/WebParts">WebParts</a>,<a rel="tag" href="http://technorati.com/tags/Silverlight">Silverlight</a>,<a rel="tag" href="http://technorati.com/tags/VisualStudio2010">VisualStudio2010</a></div>
<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:bca0ccf0-e9bb-4e87-a1e3-af4c9c963625" class="wlWriterEditableSmartContent" style="display:inline;float:none;margin:0;padding:0;">del.icio.us Tags: <a rel="tag" href="http://del.icio.us/popular/SharePoint+2010">SharePoint 2010</a>,<a rel="tag" href="http://del.icio.us/popular/WebParts">WebParts</a>,<a rel="tag" href="http://del.icio.us/popular/Silverlight">Silverlight</a>,<a rel="tag" href="http://del.icio.us/popular/VisualStudio2010">VisualStudio2010</a></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/chrisforbesblogs.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/chrisforbesblogs.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/chrisforbesblogs.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/chrisforbesblogs.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/chrisforbesblogs.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/chrisforbesblogs.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/chrisforbesblogs.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/chrisforbesblogs.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/chrisforbesblogs.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/chrisforbesblogs.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/chrisforbesblogs.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/chrisforbesblogs.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/chrisforbesblogs.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/chrisforbesblogs.wordpress.com/338/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chrisforbesblogs.net&#038;blog=6742676&#038;post=338&#038;subd=chrisforbesblogs&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://chrisforbesblogs.net/2010/08/11/deploying-a-silverlight-application-to-sharepoint-2010/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ed3e25ef8a88f8fff819a7722f1805a9?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">chrisforbesblogs</media:title>
		</media:content>

		<media:content url="http://chrisforbesblogs.files.wordpress.com/2010/08/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://chrisforbesblogs.files.wordpress.com/2010/08/image_thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://chrisforbesblogs.files.wordpress.com/2010/08/image_thumb2.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://chrisforbesblogs.files.wordpress.com/2010/08/image_thumb3.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://chrisforbesblogs.files.wordpress.com/2010/08/image_thumb4.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://chrisforbesblogs.files.wordpress.com/2010/08/image_thumb5.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://chrisforbesblogs.files.wordpress.com/2010/08/image_thumb6.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://chrisforbesblogs.files.wordpress.com/2010/08/image_thumb7.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://chrisforbesblogs.files.wordpress.com/2010/08/image_thumb8.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://chrisforbesblogs.files.wordpress.com/2010/08/image_thumb9.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://chrisforbesblogs.files.wordpress.com/2010/08/image_thumb10.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://chrisforbesblogs.files.wordpress.com/2010/08/image_thumb11.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://chrisforbesblogs.files.wordpress.com/2010/08/image_thumb12.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://chrisforbesblogs.files.wordpress.com/2010/08/image_thumb13.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://chrisforbesblogs.files.wordpress.com/2010/08/image_thumb14.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>SharePoint WCF data service fails to load -system.data.services.providers.idataserviceupdateprovider</title>
		<link>http://chrisforbesblogs.net/2010/07/13/sharepoint-wcf-data-service-fails-to-load-system-data-services-providers-idataserviceupdateprovider/</link>
		<comments>http://chrisforbesblogs.net/2010/07/13/sharepoint-wcf-data-service-fails-to-load-system-data-services-providers-idataserviceupdateprovider/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 16:29:00 +0000</pubDate>
		<dc:creator>Chris Forbes</dc:creator>
				<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>
		<category><![CDATA[VisualStudio2010]]></category>

		<guid isPermaLink="false">https://chrisforbesblogs.wordpress.com/2010/07/13/sharepoint-wcf-data-service-fails-to-load-system-data-services-providers-idataserviceupdateprovider/</guid>
		<description><![CDATA[&#160; (Note: Applicable even in SharePoint 2010 RTM) If you try and access the WCF data services using http://SP2010SERVERNAME/_vti_bin/listdata.svc you get the following error message &#160; &#160; &#160; &#160; You need to install an update for the .NET Framework 3.5 SP1. Download from Microsoft here. I found an IISRESET was not enough to get this [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chrisforbesblogs.net&#038;blog=6742676&#038;post=322&#038;subd=chrisforbesblogs&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&#160;</p>
<p>(Note: Applicable even in SharePoint 2010 RTM)<a href="http://chrisforbesblogs.files.wordpress.com/2010/07/visualstudio20101.jpg"><img style="display:inline;margin-left:0;margin-right:0;border-width:0;" title="visualstudio2010" border="0" alt="visualstudio2010" align="right" src="http://chrisforbesblogs.files.wordpress.com/2010/07/visualstudio2010_thumb1.jpg?w=174&h=93" width="174" height="93" /></a> </p>
<p>If you try and access the WCF data services using <a href="http://sp2010servername/_vti_bin/listdata.svc">http://SP2010SERVERNAME/_vti_bin/listdata.svc</a> you get the following error message </p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;<a href="http://chrisforbesblogs.files.wordpress.com/2010/07/adoerror.png"><img style="display:block;float:none;margin-left:auto;margin-right:auto;border-width:0;" title="ADOerror" border="0" alt="ADOerror" src="http://chrisforbesblogs.files.wordpress.com/2010/07/adoerror_thumb.png?w=538&h=144" width="538" height="144" /></a> </p>
</p>
<p>&#160;</p>
<p>You need to install an update for the .NET Framework 3.5 SP1. <a href="http://www.microsoft.com/downloads/details.aspx?familyid=79d7f6f8-d6e9-4b8c-8640-17f89452148e&amp;displaylang=en" target="_blank">Download from Microsoft here</a>. I found an IISRESET was not enough to get this to work. A full reboot cleared the fault.</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:7746b7ae-3d1e-4d20-978d-5c51ac488f24" class="wlWriterSmartContent">Technorati Tags: <a href="http://technorati.com/tags/SharePoint2010" rel="tag">SharePoint2010</a>,<a href="http://technorati.com/tags/.NET+3.5+SP1" rel="tag">.NET 3.5 SP1</a>,<a href="http://technorati.com/tags/WCF+Data+Services" rel="tag">WCF Data Services</a>,<a href="http://technorati.com/tags/ADO.NET+Data+Services" rel="tag">ADO.NET Data Services</a></div>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:bc71af33-7d1e-4408-bf49-ea0414a3d9f4" class="wlWriterSmartContent">del.icio.us Tags: <a href="http://del.icio.us/popular/SharePoint2010" rel="tag">SharePoint2010</a>,<a href="http://del.icio.us/popular/.NET+3.5+SP1" rel="tag">.NET 3.5 SP1</a>,<a href="http://del.icio.us/popular/WCF+Data+Services" rel="tag">WCF Data Services</a>,<a href="http://del.icio.us/popular/ADO.NET+Data+Services" rel="tag">ADO.NET Data Services</a></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/chrisforbesblogs.wordpress.com/322/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/chrisforbesblogs.wordpress.com/322/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/chrisforbesblogs.wordpress.com/322/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/chrisforbesblogs.wordpress.com/322/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/chrisforbesblogs.wordpress.com/322/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/chrisforbesblogs.wordpress.com/322/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/chrisforbesblogs.wordpress.com/322/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/chrisforbesblogs.wordpress.com/322/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/chrisforbesblogs.wordpress.com/322/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/chrisforbesblogs.wordpress.com/322/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/chrisforbesblogs.wordpress.com/322/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/chrisforbesblogs.wordpress.com/322/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/chrisforbesblogs.wordpress.com/322/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/chrisforbesblogs.wordpress.com/322/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chrisforbesblogs.net&#038;blog=6742676&#038;post=322&#038;subd=chrisforbesblogs&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://chrisforbesblogs.net/2010/07/13/sharepoint-wcf-data-service-fails-to-load-system-data-services-providers-idataserviceupdateprovider/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ed3e25ef8a88f8fff819a7722f1805a9?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">chrisforbesblogs</media:title>
		</media:content>

		<media:content url="http://chrisforbesblogs.files.wordpress.com/2010/07/visualstudio2010_thumb1.jpg" medium="image">
			<media:title type="html">visualstudio2010</media:title>
		</media:content>

		<media:content url="http://chrisforbesblogs.files.wordpress.com/2010/07/adoerror_thumb.png" medium="image">
			<media:title type="html">ADOerror</media:title>
		</media:content>
	</item>
		<item>
		<title>Installing SharePoint 2010 (RC) not allowing you to select the installation type and installs as single server.</title>
		<link>http://chrisforbesblogs.net/2010/02/17/installing-sharepoint-2010-rc-not-allowing-you-to-select-the-installation-type-and-installs-as-single-server/</link>
		<comments>http://chrisforbesblogs.net/2010/02/17/installing-sharepoint-2010-rc-not-allowing-you-to-select-the-installation-type-and-installs-as-single-server/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 21:10:00 +0000</pubDate>
		<dc:creator>Chris Forbes</dc:creator>
				<category><![CDATA[Installation]]></category>
		<category><![CDATA[SharePoint 2010]]></category>

		<guid isPermaLink="false">http://chrisforbesblogs.wordpress.com/2010/02/17/installing-sharepoint-2010-rc-not-allowing-you-to-select-the-installation-type-and-installs-as-single-server/</guid>
		<description><![CDATA[The setup was not prompting you for the server type ‘Single Server’, ‘New Farm’. Instead the install would install SharePoint and SQL server express. The configuration wizard would then setup SharePoint as a single server.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chrisforbesblogs.net&#038;blog=6742676&#038;post=123&#038;subd=chrisforbesblogs&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&#160;</p>
<p>Noticed a problem when trying to install SharePoint 2010 release candidate on win 2008 running as a DC.</p>
<p>&#160;</p>
<h3>Problem:</h3>
<p><strong>The setup was not prompting you for the server type ‘Single Server’, ‘New Farm’. Instead the install would install SharePoint and SQL server express. The configuration wizard would then setup SharePoint as a single server.</strong></p>
<h3>Workaround:</h3>
<p>Copy the setup.exe to a local directory on the server eg : c:\SPSETUP then open a command prompt ‘as administrator’ and run the following</p>
<p>&#160;</p>
<div id="codeSnippetWrapper">
<div id="codeSnippet" class="csharpcode">
<pre class="alt">c:\SPSETUP\setup.exe /extract c:\SPSETUP</pre>
<p><!--CRLF--></div>
</div>
<p>Then from the SPSETUP folder run the install with the following command</p>
<p>&#160;</p>
<div id="codeSnippetWrapper">
<div id="codeSnippet" class="csharpcode">
<pre class="alt">setup.exe /config c:\spsetup\File\SetupFarm\config,xml</pre>
</p></div>
</div>
<p>The install shall run as normal, but this time when the configuration wizard is run you should get the prompts to specify the appropriate configuration database server.</p>
<p>&#160;</p>
<p><strong>If you are running as a single server and using SQL Server Express then I also noticed this problem…</strong></p>
<p>Also noticed that the config. wizard fails at step 5 due to it timing out. Thanks to some other postings I discovered this was due to the Sharepoint Server Search 14 and later on the SharePoint Foundation Search V4 service was being restarted by the configuration wizard. When the service is restarted it was using the ‘Local Service’ account. You can see this happening if you watch the services while the config. wizard is running. If before running the wizard you change these to run with appropriate domain accounts these should start up ok.</p>
<p>&#160;</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:4e38b881-c806-404d-a6a3-838cab658cd0" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/SharePoint+2010" rel="tag">SharePoint 2010</a>,<a href="http://technorati.com/tags/SharePoint+2010+Release+Candidate" rel="tag">SharePoint 2010 Release Candidate</a>,<a href="http://technorati.com/tags/Install+Problems" rel="tag">Install Problems</a></div>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:174aecb1-faab-4fbb-8b79-903d41c81451" class="wlWriterEditableSmartContent">del.icio.us Tags: <a href="http://del.icio.us/popular/SharePoint+2010" rel="tag">SharePoint 2010</a>,<a href="http://del.icio.us/popular/SharePoint+2010+Release+Candidate" rel="tag">SharePoint 2010 Release Candidate</a>,<a href="http://del.icio.us/popular/Install+Problems" rel="tag">Install Problems</a></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/chrisforbesblogs.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/chrisforbesblogs.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/chrisforbesblogs.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/chrisforbesblogs.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/chrisforbesblogs.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/chrisforbesblogs.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/chrisforbesblogs.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/chrisforbesblogs.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/chrisforbesblogs.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/chrisforbesblogs.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/chrisforbesblogs.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/chrisforbesblogs.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/chrisforbesblogs.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/chrisforbesblogs.wordpress.com/123/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chrisforbesblogs.net&#038;blog=6742676&#038;post=123&#038;subd=chrisforbesblogs&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://chrisforbesblogs.net/2010/02/17/installing-sharepoint-2010-rc-not-allowing-you-to-select-the-installation-type-and-installs-as-single-server/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ed3e25ef8a88f8fff819a7722f1805a9?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">chrisforbesblogs</media:title>
		</media:content>
	</item>
		<item>
		<title>How to you describe SharePoint to your customers</title>
		<link>http://chrisforbesblogs.net/2009/09/01/how-to-you-describe-sharepoint-to-your-customers/</link>
		<comments>http://chrisforbesblogs.net/2009/09/01/how-to-you-describe-sharepoint-to-your-customers/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 19:22:28 +0000</pubDate>
		<dc:creator>Chris Forbes</dc:creator>
				<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[SharePoint in Plain English]]></category>

		<guid isPermaLink="false">http://chrisforbesblogs.wordpress.com/2009/09/01/how-to-you-describe-sharepoint-to-your-customers/</guid>
		<description><![CDATA[If like me you find it impossible to describe SharePoint without at least 10 minutes, the use of 1,000 words and a whiteboard then you might find this video from Microsoft useful… &#160; &#160; &#160; del.icio.us Tags: SharePoint 2010,SharePoint in plain english Technorati Tags: SharePoint 2010,SharePoint in plain english<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chrisforbesblogs.net&#038;blog=6742676&#038;post=87&#038;subd=chrisforbesblogs&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If like me you find it impossible to describe SharePoint without at least 10 minutes, the use of 1,000 words and a whiteboard then you might find this video from Microsoft useful…</p>
<p>&#160;</p>
<div class="wlWriterEditableSmartContent" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:c0f9cb2b-db79-4509-8464-8e75ed9766ec" style="display:block;float:none;width:425px;margin:0 auto;padding:0;">
<div><span style="text-align:center; display: block;"><a href="http://chrisforbesblogs.net/2009/09/01/how-to-you-describe-sharepoint-to-your-customers/"><img src="http://img.youtube.com/vi/s12Jb5Z2xaE/2.jpg" alt="" /></a></span></div>
</div>
<p>&#160;</p>
<p>&#160;</p>
<p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:54d0a2ec-5448-4ada-b91e-f03c13c31d49" style="display:inline;float:none;margin:0;padding:0;">del.icio.us Tags: <a href="http://del.icio.us/popular/SharePoint+2010" rel="tag">SharePoint 2010</a>,<a href="http://del.icio.us/popular/SharePoint+in+plain+english" rel="tag">SharePoint in plain english</a></div>
</p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:8fdb5ee3-f2cb-4d22-b77d-dc31319e8301" style="display:inline;float:none;margin:0;padding:0;">Technorati Tags: <a href="http://technorati.com/tags/SharePoint+2010" rel="tag">SharePoint 2010</a>,<a href="http://technorati.com/tags/SharePoint+in+plain+english" rel="tag">SharePoint in plain english</a></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/chrisforbesblogs.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/chrisforbesblogs.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/chrisforbesblogs.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/chrisforbesblogs.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/chrisforbesblogs.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/chrisforbesblogs.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/chrisforbesblogs.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/chrisforbesblogs.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/chrisforbesblogs.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/chrisforbesblogs.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/chrisforbesblogs.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/chrisforbesblogs.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/chrisforbesblogs.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/chrisforbesblogs.wordpress.com/87/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chrisforbesblogs.net&#038;blog=6742676&#038;post=87&#038;subd=chrisforbesblogs&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://chrisforbesblogs.net/2009/09/01/how-to-you-describe-sharepoint-to-your-customers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ed3e25ef8a88f8fff819a7722f1805a9?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">chrisforbesblogs</media:title>
		</media:content>
	</item>
	</channel>
</rss>
