<?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/"
><channel><title>Joel&#039;s SharePoint Architect Blog &#187; SharePoint</title> <atom:link href="http://joelblogs.co.uk/category/sharepoint/feed/" rel="self" type="application/rss+xml" /><link>http://joelblogs.co.uk</link> <description>SharePoint 2010, MOSS &#38; WSS Tips and Consultancy Tales</description> <lastBuildDate>Fri, 03 Feb 2012 15:39:19 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=317</generator> <item><title>SPSite and the Recycle Bin in SharePoint 2010 SP1</title><link>http://joelblogs.co.uk/2012/01/16/spsite-and-the-recycle-bin-in-sharepoint-2010-sp1/</link> <comments>http://joelblogs.co.uk/2012/01/16/spsite-and-the-recycle-bin-in-sharepoint-2010-sp1/#comments</comments> <pubDate>Mon, 16 Jan 2012 19:12:51 +0000</pubDate> <dc:creator>Joel Jeffery</dc:creator> <category><![CDATA[SharePoint 2010]]></category> <category><![CDATA[SharePoint]]></category> <category><![CDATA[SharePoint Development]]></category><guid
isPermaLink="false">http://joelblogs.co.uk/?p=10952</guid> <description><![CDATA[<p>Service Pack 1 for SharePoint 2010 brought us a much-needed feature – the recycle bin for SPWeb and SPSite objects.</p><h2>Recycling SharePoint Sites</h2><p>If you want to move an SPWeb into the recycle bin programmatically, there’s the fairly-straightforward <a
rel=\"nofollow\" href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbS9lbi11cy9saWJyYXJ5L21pY3Jvc29mdC5zaGFyZXBvaW50LnNwd2ViLnJlY3ljbGUuYXNweA==" rel=\"nofollow\">SPWeb.Recycle</a>() method. Once you’ve invoked this, you can restore the SPWeb from the <a
rel=\"nofollow\" href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbS9lbi11cy9saWJyYXJ5L21pY3Jvc29mdC5zaGFyZXBvaW50LnNwc2l0ZS5yZWN5Y2xlYmluLmFzcHg=" rel=\"nofollow\">SPSite.RecycleBin</a> object with the <a
rel=\"nofollow\" href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbS9lbi11cy9saWJyYXJ5L21pY3Jvc29mdC5zaGFyZXBvaW50LnNwcmVjeWNsZWJpbml0ZW1jb2xsZWN0aW9uLnJlc3RvcmUuYXNweA==" rel=\"nofollow\">Restore</a>() method.</p><p>But, how do I recycle and restore a site collection (SPSite)?</p><h2>Recycling SharePoint Site Collections</h2><p>Firstly, there’s no Recycle() method on the SPSite object. Invoking Delete() removes the SPSite immediately, unless you pass in an argument to get it to <a
rel=\"nofollow\" href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbS9lbi11cy9saWJyYXJ5L2VlNTcxODA1LmFzcHg=" rel=\"nofollow\">perform a gradual delete</a>. The <a
rel=\"nofollow\" href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3NoYXJlcG9pbnQubWljcm9zb2Z0LmNvbS9CbG9ncy9mcm9tdGhlZmllbGQvTGlzdHMvUG9zdHMvUG9zdC5hc3B4P0xpc3Q9MGNlNzc5NDYtMWU0NS00YjQzLThjNzQtMjE5NjNlNjRkNGUxJmFtcDtJRD0xNTAmYW1wO1dlYj01MTcwZWI4YS05MTJkLTQwMjQtODE0YS04MWU5NGI5ZDM0Y2U=" rel=\"nofollow\">gradual delete process</a> is carried out by the “Gradual Delete Timer Job”, whose purpose is to delete site collections efficiently 1000 database rows at a time.</p><p><a
href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2pvZWxibG9ncy5jby51ay8yMDEyLzAxLzE2L3Nwc2l0ZS1hbmQtdGhlLXJlY3ljbGUtYmluLWluLXNoYXJlcG9pbnQtMjAxMC1zcDEv" class=\"more-link\">Read more on SPSite and the Recycle Bin in SharePoint 2010 SP1&#8230;</a></p> <img
src="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&#038;post_id=10952" width="1" height="1" style="display: none;" /><p
class='technorati-tags'>Technorati Tags: <a
class='technorati-link' href='http://technorati.com/tag/SharePoint' rel='tag,nofollow' target='_blank'>SharePoint</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+2010' rel='tag,nofollow' target='_blank'>SharePoint 2010</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+Development' rel='tag,nofollow' target='_blank'>SharePoint Development</a></p>]]></description> <content:encoded><![CDATA[<p>Service Pack 1 for SharePoint 2010 brought us a much-needed feature – the recycle bin for SPWeb and SPSite objects.</p><h2>Recycling SharePoint Sites</h2><p>If you want to move an SPWeb into the recycle bin programmatically, there’s the fairly-straightforward <a
rel=\"nofollow\" href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbS9lbi11cy9saWJyYXJ5L21pY3Jvc29mdC5zaGFyZXBvaW50LnNwd2ViLnJlY3ljbGUuYXNweA==" rel=\"nofollow\">SPWeb.Recycle</a>() method. Once you’ve invoked this, you can restore the SPWeb from the <a
rel=\"nofollow\" href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbS9lbi11cy9saWJyYXJ5L21pY3Jvc29mdC5zaGFyZXBvaW50LnNwc2l0ZS5yZWN5Y2xlYmluLmFzcHg=" rel=\"nofollow\">SPSite.RecycleBin</a> object with the <a
rel=\"nofollow\" href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbS9lbi11cy9saWJyYXJ5L21pY3Jvc29mdC5zaGFyZXBvaW50LnNwcmVjeWNsZWJpbml0ZW1jb2xsZWN0aW9uLnJlc3RvcmUuYXNweA==" rel=\"nofollow\">Restore</a>() method.</p><p>But, how do I recycle and restore a site collection (SPSite)?</p><h2>Recycling SharePoint Site Collections</h2><p>Firstly, there’s no Recycle() method on the SPSite object. Invoking Delete() removes the SPSite immediately, unless you pass in an argument to get it to <a
rel=\"nofollow\" href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbS9lbi11cy9saWJyYXJ5L2VlNTcxODA1LmFzcHg=" rel=\"nofollow\">perform a gradual delete</a>. The <a
rel=\"nofollow\" href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3NoYXJlcG9pbnQubWljcm9zb2Z0LmNvbS9CbG9ncy9mcm9tdGhlZmllbGQvTGlzdHMvUG9zdHMvUG9zdC5hc3B4P0xpc3Q9MGNlNzc5NDYtMWU0NS00YjQzLThjNzQtMjE5NjNlNjRkNGUxJmFtcDtJRD0xNTAmYW1wO1dlYj01MTcwZWI4YS05MTJkLTQwMjQtODE0YS04MWU5NGI5ZDM0Y2U=" rel=\"nofollow\">gradual delete process</a> is carried out by the “Gradual Delete Timer Job”, whose purpose is to delete site collections efficiently 1000 database rows at a time.</p><p>However, it also has some nice side effects. The timer job only deletes site collections that were deleted more than 30 days ago (or whatever the recycle bin age is configured for the web application). In that intermediate time, the deleted site collections are available to be restored.</p><p>You can get at the deleted sites via the <a
rel=\"nofollow\" href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbS9lbi11cy9saWJyYXJ5L21pY3Jvc29mdC5zaGFyZXBvaW50LmFkbWluaXN0cmF0aW9uLnNwd2ViYXBwbGljYXRpb25fbWVtYmVycy5hc3B4" rel=\"nofollow\">GetDeletedSites method of the SPWebApplication object</a>. This returns a collection of <a
rel=\"nofollow\" href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbS9lbi11cy9saWJyYXJ5L21pY3Jvc29mdC5zaGFyZXBvaW50LmFkbWluaXN0cmF0aW9uLnNwZGVsZXRlZHNpdGVfbWVtYmVycy5hc3B4" rel=\"nofollow\">SPDeletedSite</a> objects, on which you can invoke the <a
rel=\"nofollow\" href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbS9lbi11cy9saWJyYXJ5L21pY3Jvc29mdC5zaGFyZXBvaW50LmFkbWluaXN0cmF0aW9uLnNwZGVsZXRlZHNpdGUucmVzdG9yZS5hc3B4" rel=\"nofollow\">Restore</a> method.</p><h2>Sample Code</h2><pre class="csharpcode"><span class="rem">// get our web application</span>
SPWebApplication webapp = SPWebApplication.Lookup(<span class="kwrd">new</span> Uri(<span class="str">&quot;http://sharepoint&quot;</span>));
<span class="rem">// find our deleted site collection</span>
<span class="kwrd">foreach</span> (SPDeletedSite site <span class="kwrd">in</span> webapp.GetDeletedSites(<span class="str">&quot;http://sharepoint/sites/myoldsite&quot;</span>))
{
    <span class="rem">//restore it!</span>
    site.Restore();
}</pre><style type="text/css">.csharpcode, .csharpcode
pre{font-size:small;color:black;font-family:consolas,"Courier New",courier,monospace;background-color:#fff}.csharpcode
pre{margin:0em}.csharpcode
.rem{color:#008000}.csharpcode
.kwrd{color:#00f}.csharpcode
.str{color:#006080}.csharpcode
.op{color:#0000c0}.csharpcode
.preproc{color:#c63}.csharpcode
.asp{background-color:#ff0}.csharpcode
.html{color:#800000}.csharpcode
.attr{color:#f00}.csharpcode
.alt{background-color:#f4f4f4;width:100%;margin:0em}.csharpcode
.lnum{color:#606060}</style><p>Enjoy!</p> <img
src="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=10952" width="1" height="1" style="display: none;" /><p
class='technorati-tags'>Technorati Tags: <a
class='technorati-link' href='http://technorati.com/tag/SharePoint' rel='tag,nofollow' target='_blank'>SharePoint</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+2010' rel='tag,nofollow' target='_blank'>SharePoint 2010</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+Development' rel='tag,nofollow' target='_blank'>SharePoint Development</a></p>]]></content:encoded> <wfw:commentRss>http://joelblogs.co.uk/2012/01/16/spsite-and-the-recycle-bin-in-sharepoint-2010-sp1/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>STSADM copyappbincontent vs. Install-SPApplicationContent</title><link>http://joelblogs.co.uk/2011/11/07/stsadm-copyappbincontent-vs-install-spapplicationcontent/</link> <comments>http://joelblogs.co.uk/2011/11/07/stsadm-copyappbincontent-vs-install-spapplicationcontent/#comments</comments> <pubDate>Mon, 07 Nov 2011 14:46:15 +0000</pubDate> <dc:creator>Joel Jeffery</dc:creator> <category><![CDATA[SharePoint 2010]]></category> <category><![CDATA[PowerShell]]></category> <category><![CDATA[SharePoint]]></category> <category><![CDATA[SharePoint Administration]]></category> <category><![CDATA[SharePoint Development]]></category><guid
isPermaLink="false">http://joelblogs.co.uk/2011/11/07/stsadm-copyappbincontent-vs-install-spapplicationcontent/</guid> <description><![CDATA[<p>The purpose of <a
rel=\"nofollow\" href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXQubWljcm9zb2Z0LmNvbS9lbi11cy9saWJyYXJ5L2NjMjYxOTk2KG9mZmljZS4xMikuYXNweA==" rel=\"nofollow\">STSADM’s “copyappbincontent”</a> command is:</p><blockquote><p><font
face="Consolas">stsadm –o copyappbincontent</font></p><p>Copies Web application–specific files, such as page resource (*.resx) files from their respective locations in the 12\CONFIG folder to the correct location in each Web application on the computer.</p></blockquote><p>According to TechNet, there is no equivalent PowerShell cmd-let <a
rel=\"nofollow\" href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXQubWljcm9zb2Z0LmNvbS9lbi11cy9saWJyYXJ5L2ZmNjIxMDgxLmFzcHg=" rel=\"nofollow\">http://technet.microsoft.com/en-us/library/ff621081.aspx</a>t:</p><p><a
href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2pvZWxibG9ncy5jby51ay93cC1jb250ZW50L3VwbG9hZHMvMjAxMS8xMS9pbWFnZTEucG5n"><img
style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="No PowerShell Equivalent to stsadm -o copyappbincontent" border="0" alt="No PowerShell Equivalent to stsadm -o copyappbincontent" src="http://joelblogs.co.uk/wp-content/uploads/2011/11/image_thumb1.png" width="564" height="46" /></a></p><p>However, there is a PowerShell cmd-let called Install-SPApplicationContent:</p><blockquote><pre><font face="Consolas">Install-SPApplicationContent</font></pre><p>Copies shared application data to existing Web application folders.</p></blockquote><p>Now that sounds pretty similar.</p><p>I’ve tried this out – making a custom layouts.sitemap.xml file, and invoking Install-SPApplicationContent. It copies/merges the sitemap into the correct place under inetpub\wwwroot\wss\VirtualDirectories\*\_app_bin.</p><p><a
href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2pvZWxibG9ncy5jby51ay8yMDExLzExLzA3L3N0c2FkbS1jb3B5YXBwYmluY29udGVudC12cy1pbnN0YWxsLXNwYXBwbGljYXRpb25jb250ZW50Lw==" class=\"more-link\">Read more on STSADM copyappbincontent vs. Install-SPApplicationContent&#8230;</a></p> <img
src="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&#038;post_id=10931" width="1" height="1" style="display: none;" /><p
class='technorati-tags'>Technorati Tags: <a
class='technorati-link' href='http://technorati.com/tag/PowerShell' rel='tag,nofollow' target='_blank'>PowerShell</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint' rel='tag,nofollow' target='_blank'>SharePoint</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+2010' rel='tag,nofollow' target='_blank'>SharePoint 2010</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+Administration' rel='tag,nofollow' target='_blank'>SharePoint Administration</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+Development' rel='tag,nofollow' target='_blank'>SharePoint Development</a></p>]]></description> <content:encoded><![CDATA[<p>The purpose of <a
rel=\"nofollow\" href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXQubWljcm9zb2Z0LmNvbS9lbi11cy9saWJyYXJ5L2NjMjYxOTk2KG9mZmljZS4xMikuYXNweA==" rel=\"nofollow\">STSADM’s “copyappbincontent”</a> command is:</p><blockquote><p><font
face="Consolas">stsadm –o copyappbincontent</font></p><p>Copies Web application–specific files, such as page resource (*.resx) files from their respective locations in the 12\CONFIG folder to the correct location in each Web application on the computer.</p></blockquote><p>According to TechNet, there is no equivalent PowerShell cmd-let <a
rel=\"nofollow\" href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXQubWljcm9zb2Z0LmNvbS9lbi11cy9saWJyYXJ5L2ZmNjIxMDgxLmFzcHg=" rel=\"nofollow\">http://technet.microsoft.com/en-us/library/ff621081.aspx</a>t:</p><p><a
href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2pvZWxibG9ncy5jby51ay93cC1jb250ZW50L3VwbG9hZHMvMjAxMS8xMS9pbWFnZTEucG5n"><img
style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="No PowerShell Equivalent to stsadm -o copyappbincontent" border="0" alt="No PowerShell Equivalent to stsadm -o copyappbincontent" src="http://joelblogs.co.uk/wp-content/uploads/2011/11/image_thumb1.png" width="564" height="46" /></a></p><p>However, there is a PowerShell cmd-let called Install-SPApplicationContent:</p><blockquote><pre><font face="Consolas">Install-SPApplicationContent</font></pre><p>Copies shared application data to existing Web application folders.</p></blockquote><p>Now that sounds pretty similar.</p><p>I’ve tried this out – making a custom layouts.sitemap.xml file, and invoking Install-SPApplicationContent. It copies/merges the sitemap into the correct place under inetpub\wwwroot\wss\VirtualDirectories\*\_app_bin.</p><p>So, how dissimilar are they? I’ve heard it said that the PowerShell version won’t apply your changes to the whole farm, only the current server. But surely, that’s what stsadm does too?</p><p>Let’s use the rather fantastic open-source <a
rel=\"nofollow\" href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3dpa2kuc2hhcnBkZXZlbG9wLm5ldC9pbHNweS5hc2h4" rel=\"nofollow\">ILSpy replacement for Reflector</a> to reflect over the code,</p><h2>STSADM’s copyappbincontent decompiled</h2><pre class="csharpcode"><span class="rem">// Microsoft.SharePoint.StsAdmin.SPCopyAppBinContent</span>
<span class="kwrd">public</span> <span class="kwrd">override</span> <span class="kwrd">void</span> Run(StringDictionary keyValues)
{
    SPServiceInstance sPServiceInstance = SPWebServiceInstance.LocalContent;
    <span class="kwrd">if</span> (sPServiceInstance != <span class="kwrd">null</span> &amp;&amp; sPServiceInstance.Status == SPObjectStatus.Online)
    {
        SPWebService contentService = SPWebService.ContentService;
        contentService.ApplyApplicationContentToLocalServer();
    }
    sPServiceInstance = SPWebServiceInstance.LocalAdministration;
    <span class="kwrd">if</span> (sPServiceInstance != <span class="kwrd">null</span> &amp;&amp; sPServiceInstance.Status == SPObjectStatus.Online)
    {
        SPWebService administrationService = SPWebService.AdministrationService;
        administrationService.ApplyApplicationContentToLocalServer();
    }
}</pre><p><style type="text/css">.csharpcode, .csharpcode
pre{font-size:small;color:black;font-family:consolas,"Courier New",courier,monospace;background-color:#fff}.csharpcode
pre{margin:0em}.csharpcode
.rem{color:#008000}.csharpcode
.kwrd{color:#00f}.csharpcode
.str{color:#006080}.csharpcode
.op{color:#0000c0}.csharpcode
.preproc{color:#c63}.csharpcode
.asp{background-color:#ff0}.csharpcode
.html{color:#800000}.csharpcode
.attr{color:#f00}.csharpcode
.alt{background-color:#f4f4f4;width:100%;margin:0em}.csharpcode
.lnum{color:#606060}</style></p><h2>Microsoft.SharePoint.PowerShell’s Install-SPApplicationContent decompiled</h2><pre class="csharpcode"><span class="kwrd">if</span> (sPWebServiceInstance.Status == SPObjectStatus.Online)
{
  SPWebService administrationService = SPWebService.AdministrationService;
  ServiceHelper.TryToControlService(<span class="str">&quot;W3SVC&quot;</span>, <span class="kwrd">false</span>, <span class="kwrd">out</span> flag, <span class="kwrd">out</span> flag2);
  administrationService.ApplyApplicationContentToLocalServer();
}
<span class="kwrd">if</span> (<span class="kwrd">null</span> != SPWebServiceInstance.LocalContent)
{
  <span class="kwrd">if</span> (SPWebServiceInstance.LocalContent.Status == SPObjectStatus.Online)
  {
    ServiceHelper.TryToControlService(<span class="str">&quot;W3SVC&quot;</span>, <span class="kwrd">false</span>, <span class="kwrd">out</span> flag3, <span class="kwrd">out</span> flag4);
    SPWebService contentService = SPWebService.ContentService;
    contentService.ApplyApplicationContentToLocalServer();
  }
}</pre><p><style type="text/css">.csharpcode, .csharpcode
pre{font-size:small;color:black;font-family:consolas,"Courier New",courier,monospace;background-color:#fff}.csharpcode
pre{margin:0em}.csharpcode
.rem{color:#008000}.csharpcode
.kwrd{color:#00f}.csharpcode
.str{color:#006080}.csharpcode
.op{color:#0000c0}.csharpcode
.preproc{color:#c63}.csharpcode
.asp{background-color:#ff0}.csharpcode
.html{color:#800000}.csharpcode
.attr{color:#f00}.csharpcode
.alt{background-color:#f4f4f4;width:100%;margin:0em}.csharpcode
.lnum{color:#606060}</style></p><h2>Conclusion</h2><p>So, there you have it. Like two completely dissimilar things… in a pod.</p><p>To be clear: you need to invoke either of these methods on each server in your farm to deploy content from the 14 hive to the IIS virtual directories.</p><p>Or have I missed something?</p> <img
src="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=10931" width="1" height="1" style="display: none;" /><p
class='technorati-tags'>Technorati Tags: <a
class='technorati-link' href='http://technorati.com/tag/PowerShell' rel='tag,nofollow' target='_blank'>PowerShell</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint' rel='tag,nofollow' target='_blank'>SharePoint</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+2010' rel='tag,nofollow' target='_blank'>SharePoint 2010</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+Administration' rel='tag,nofollow' target='_blank'>SharePoint Administration</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+Development' rel='tag,nofollow' target='_blank'>SharePoint Development</a></p>]]></content:encoded> <wfw:commentRss>http://joelblogs.co.uk/2011/11/07/stsadm-copyappbincontent-vs-install-spapplicationcontent/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>SharePoint Outlook Connector</title><link>http://joelblogs.co.uk/2011/11/05/sharepoint-outlook-connector/</link> <comments>http://joelblogs.co.uk/2011/11/05/sharepoint-outlook-connector/#comments</comments> <pubDate>Sat, 05 Nov 2011 16:45:14 +0000</pubDate> <dc:creator>Joel Jeffery</dc:creator> <category><![CDATA[SharePoint 2010]]></category> <category><![CDATA[Outlook]]></category> <category><![CDATA[SharePoint]]></category> <category><![CDATA[SharePoint Development]]></category><guid
isPermaLink="false">http://joelblogs.co.uk/2011/11/05/sharepoint-outlook-connector/</guid> <description><![CDATA[<p>Over the last few months I’ve had the privilege of being one of the contributors to the <a
rel=\"nofollow\" href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3Nwb3V0bG9va2Nvbm5lY3Rvci5jb2RlcGxleC5jb20v" rel=\"nofollow\">Sobiens SharePoint Outlook Connector</a> project on CodePlex.</p><p>The project is a VSTO package that gives Outlook a new tree view panel showing connected SharePoint sites, providing a drag and drop interface to save emails and their attachments to the document libraries of your choice.</p><p><a
href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2pvZWxibG9ncy5jby51ay93cC1jb250ZW50L3VwbG9hZHMvMjAxMS8xMS9pbWFnZS5wbmc="><img
style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://joelblogs.co.uk/wp-content/uploads/2011/11/image_thumb.png" width="425" height="397" /></a></p><p>The Outlook Connector lets you drag emails from Outlook into document libraries in SharePoint.</p><p>The new release gives users a context menu when you right-drag email across, giving options to Copy or Move the email as an Outlook .msg file, or to Copy the email and attachments as Word documents.</p><p><a
href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2pvZWxibG9ncy5jby51ay8yMDExLzExLzA1L3NoYXJlcG9pbnQtb3V0bG9vay1jb25uZWN0b3Iv" class=\"more-link\">Read more on SharePoint Outlook Connector&#8230;</a></p> <img
src="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&#038;post_id=10924" width="1" height="1" style="display: none;" /><p
class='technorati-tags'>Technorati Tags: <a
class='technorati-link' href='http://technorati.com/tag/Outlook' rel='tag,nofollow' target='_blank'>Outlook</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint' rel='tag,nofollow' target='_blank'>SharePoint</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+2010' rel='tag,nofollow' target='_blank'>SharePoint 2010</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+Development' rel='tag,nofollow' target='_blank'>SharePoint Development</a></p>]]></description> <content:encoded><![CDATA[<p>Over the last few months I’ve had the privilege of being one of the contributors to the <a
rel=\"nofollow\" href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3Nwb3V0bG9va2Nvbm5lY3Rvci5jb2RlcGxleC5jb20v" rel=\"nofollow\">Sobiens SharePoint Outlook Connector</a> project on CodePlex.</p><p>The project is a VSTO package that gives Outlook a new tree view panel showing connected SharePoint sites, providing a drag and drop interface to save emails and their attachments to the document libraries of your choice.</p><p><a
href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2pvZWxibG9ncy5jby51ay93cC1jb250ZW50L3VwbG9hZHMvMjAxMS8xMS9pbWFnZS5wbmc="><img
style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://joelblogs.co.uk/wp-content/uploads/2011/11/image_thumb.png" width="425" height="397" /></a></p><p>The Outlook Connector lets you drag emails from Outlook into document libraries in SharePoint.</p><p>The new release gives users a context menu when you right-drag email across, giving options to Copy or Move the email as an Outlook .msg file, or to Copy the email and attachments as Word documents.</p><p>The new version also shows all document library types, not only those made from the Document Library template.</p><p>Hopefully, we’ve also closed a few bugs without creating too many new ones!</p> <img
src="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=10924" width="1" height="1" style="display: none;" /><p
class='technorati-tags'>Technorati Tags: <a
class='technorati-link' href='http://technorati.com/tag/Outlook' rel='tag,nofollow' target='_blank'>Outlook</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint' rel='tag,nofollow' target='_blank'>SharePoint</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+2010' rel='tag,nofollow' target='_blank'>SharePoint 2010</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+Development' rel='tag,nofollow' target='_blank'>SharePoint Development</a></p>]]></content:encoded> <wfw:commentRss>http://joelblogs.co.uk/2011/11/05/sharepoint-outlook-connector/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>SharePoint 2010 Locale Stapler / Master Locale</title><link>http://joelblogs.co.uk/2011/11/03/sharepoint-2010-locale-stapler-master-locale/</link> <comments>http://joelblogs.co.uk/2011/11/03/sharepoint-2010-locale-stapler-master-locale/#comments</comments> <pubDate>Thu, 03 Nov 2011 18:53:13 +0000</pubDate> <dc:creator>Joel Jeffery</dc:creator> <category><![CDATA[SharePoint 2010]]></category> <category><![CDATA[SharePoint]]></category> <category><![CDATA[SharePoint Administration]]></category> <category><![CDATA[SharePoint Development]]></category><guid
isPermaLink="false">http://joelblogs.co.uk/2011/11/03/sharepoint-2010-locale-stapler-master-locale/</guid> <description><![CDATA[<p>I’ve just put up another project on CodePlex. As usual, you can download the full project and <a
rel=\"nofollow\" href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3NsYXNoLmNvZGVwbGV4LmNvbS8=" rel=\"nofollow\">source code for SharePoint 2010 Locale Stapler</a>.</p><h2>Why?</h2><p>SharePoint doesn’t let you set a master locale per web application. SharePoint 2010 Publishing Features lets you specify that all sub sites inherit the locale settings from the parent… But this is sadly lacking.</p><h2>How?</h2><p>My project gives you a SharePoint farm solution with a couple of feature staplers (FeatureSiteTemplateAssociations) that fire for all templates (“GLOBAL”) at either the farm or web application level. On creation of a new site collection or site, the feature staple fires and looks up the regional settings of the root web at the root site collection for the web application, and then copies those settings to the current web (SharePoint site).</p><p><a
href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2pvZWxibG9ncy5jby51ay8yMDExLzExLzAzL3NoYXJlcG9pbnQtMjAxMC1sb2NhbGUtc3RhcGxlci1tYXN0ZXItbG9jYWxlLw==" class=\"more-link\">Read more on SharePoint 2010 Locale Stapler / Master Locale&#8230;</a></p> <img
src="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&#038;post_id=10919" width="1" height="1" style="display: none;" /><p
class='technorati-tags'>Technorati Tags: <a
class='technorati-link' href='http://technorati.com/tag/SharePoint' rel='tag,nofollow' target='_blank'>SharePoint</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+2010' rel='tag,nofollow' target='_blank'>SharePoint 2010</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+Administration' rel='tag,nofollow' target='_blank'>SharePoint Administration</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+Development' rel='tag,nofollow' target='_blank'>SharePoint Development</a></p>]]></description> <content:encoded><![CDATA[<p>I’ve just put up another project on CodePlex. As usual, you can download the full project and <a
rel=\"nofollow\" href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3NsYXNoLmNvZGVwbGV4LmNvbS8=" rel=\"nofollow\">source code for SharePoint 2010 Locale Stapler</a>.</p><h2>Why?</h2><p>SharePoint doesn’t let you set a master locale per web application. SharePoint 2010 Publishing Features lets you specify that all sub sites inherit the locale settings from the parent… But this is sadly lacking.</p><h2>How?</h2><p>My project gives you a SharePoint farm solution with a couple of feature staplers (FeatureSiteTemplateAssociations) that fire for all templates (“GLOBAL”) at either the farm or web application level. On creation of a new site collection or site, the feature staple fires and looks up the regional settings of the root web at the root site collection for the web application, and then copies those settings to the current web (SharePoint site).</p><p>&#160;</p><p><img
alt="Manage Farm Features" src="http://download.codeplex.com/Download?ProjectName=slash&amp;DownloadId=299620" width="237" height="32" /> or <img
alt="Web Application Features" src="http://download.codeplex.com/Download?ProjectName=slash&amp;DownloadId=299622" width="211" height="151" /></p><h3>Code!</h3><p>First off, here’s the code for the payload – the method to do the copying.</p><pre class="csharpcode"><span class="rem">/// &lt;summary&gt;</span>
<span class="rem">/// Sets the locale for web.</span>
<span class="rem">/// &lt;/summary&gt;</span>
<span class="rem">/// &lt;param name=&quot;web&quot;&gt;The web.&lt;/param&gt;</span>
<span class="kwrd">public</span> <span class="kwrd">static</span> <span class="kwrd">void</span> SetLocaleForWeb(SPWeb web)
{
    <span class="kwrd">try</span>
    {
        <span class="rem">// find the Uri of the current web</span>
        Uri currentWebUri = <span class="kwrd">new</span> Uri(web.Url);
        <span class="rem">// work out the Uri for the root (e.g. </span>
        <span class="rem">// http://webapp1/sites/site1/subsite1 becomes http://webapp1)</span>
        UriBuilder rootWebUri = <span class="kwrd">new</span> UriBuilder(currentWebUri.Scheme,
            currentWebUri.Host, currentWebUri.Port);
        <span class="kwrd">string</span> rootSiteUrl = rootWebUri.ToString();
        <span class="rem">// attempt to change the locale / regional settings by running as system...</span>
        SPSecurity.RunWithElevatedPrivileges(<span class="kwrd">delegate</span>
        {
            <span class="rem">// ...to access the root site/web of the web app</span>
            <span class="kwrd">using</span> (SPSite rootSite = <span class="kwrd">new</span> SPSite(rootSiteUrl))
            {
                <span class="kwrd">using</span> (SPWeb rootWeb = rootSite.RootWeb)
                {
                    <span class="rem">// ...and change the locale and regional settings of the current site</span>
                    <span class="rem">// to those of the root site collection root web's.</span>
                    web.Locale = (System.Globalization.CultureInfo)rootWeb.Locale.Clone();
                    web.Update();
                    web.RegionalSettings = <span class="kwrd">new</span> SPRegionalSettings(rootWeb);
                    web.Update();
                }
            }
        });
    }
    <span class="kwrd">catch</span> (Exception ex)
    {
        LogError(System.Reflection.MethodBase.GetCurrentMethod().Name,
            ex.Message, ex.StackTrace);
    }
}</pre><style type="text/css">.csharpcode, .csharpcode
pre{font-size:small;color:black;font-family:consolas,"Courier New",courier,monospace;background-color:#fff}.csharpcode
pre{margin:0em}.csharpcode
.rem{color:#008000}.csharpcode
.kwrd{color:#00f}.csharpcode
.str{color:#006080}.csharpcode
.op{color:#0000c0}.csharpcode
.preproc{color:#c63}.csharpcode
.asp{background-color:#ff0}.csharpcode
.html{color:#800000}.csharpcode
.attr{color:#f00}.csharpcode
.alt{background-color:#f4f4f4;width:100%;margin:0em}.csharpcode
.lnum{color:#606060}</style><p>And here’s the code that’s run on FeatureActivated at the Web level (and a similar one at the Site level):</p><pre class="csharpcode"><span class="rem">/// &lt;summary&gt;</span>
<span class="rem">/// Occurs after a Feature is activated.</span>
<span class="rem">/// &lt;/summary&gt;</span>
<span class="rem">/// &lt;param name=&quot;properties&quot;&gt;An &lt;see cref=&quot;T:Microsoft.SharePoint.SPFeatureReceiverProperties&quot;/&gt;</span>
<span class="rem">/// object that represents the properties of the event.&lt;/param&gt;</span>
<span class="kwrd">public</span> <span class="kwrd">override</span> <span class="kwrd">void</span> FeatureActivated(SPFeatureReceiverProperties properties)
{
    <span class="kwrd">if</span> (properties.Feature.Parent <span class="kwrd">is</span> SPWeb)
    {
        SPWeb web = (SPWeb) properties.Feature.Parent;
        Utilities.SetLocaleForWeb(web);
    }
}</pre><style type="text/css">.csharpcode, .csharpcode
pre{font-size:small;color:black;font-family:consolas,"Courier New",courier,monospace;background-color:#fff}.csharpcode
pre{margin:0em}.csharpcode
.rem{color:#008000}.csharpcode
.kwrd{color:#00f}.csharpcode
.str{color:#006080}.csharpcode
.op{color:#0000c0}.csharpcode
.preproc{color:#c63}.csharpcode
.asp{background-color:#ff0}.csharpcode
.html{color:#800000}.csharpcode
.attr{color:#f00}.csharpcode
.alt{background-color:#f4f4f4;width:100%;margin:0em}.csharpcode
.lnum{color:#606060}</style><p>Next, we need to create a a feature to do the stapling itself. This should include an element manifest (or elephant) with FeatureSIteTemplateAssociation nodes.</p><pre class="csharpcode"><span class="kwrd">&lt;?</span><span class="html">xml</span> <span class="attr">version</span><span class="kwrd">=&quot;1.0&quot;</span> <span class="attr">encoding</span><span class="kwrd">=&quot;utf-8&quot;</span>?<span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">Elements</span> <span class="attr">xmlns</span><span class="kwrd">=&quot;http://schemas.microsoft.com/sharepoint/&quot;</span><span class="kwrd">&gt;</span>
  <span class="rem">&lt;!--Web-level feature--&gt;</span>
  <span class="kwrd">&lt;</span><span class="html">FeatureSiteTemplateAssociation</span>
    <span class="attr">Id</span><span class="kwrd">=&quot;dd5923f9-05a4-4d6a-a78f-0dd8b08ff079&quot;</span>
    <span class="attr">TemplateName</span><span class="kwrd">=&quot;GLOBAL&quot;</span> <span class="kwrd">/&gt;</span>
  <span class="rem">&lt;!--Site-level feature--&gt;</span>
  <span class="kwrd">&lt;</span><span class="html">FeatureSiteTemplateAssociation</span>
    <span class="attr">Id</span><span class="kwrd">=&quot;54fa6d42-c145-49dc-b2eb-f5db548bc111&quot;</span>
    <span class="attr">TemplateName</span><span class="kwrd">=&quot;GLOBAL&quot;</span> <span class="kwrd">/&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">Elements</span><span class="kwrd">&gt;</span></pre><style type="text/css">.csharpcode, .csharpcode
pre{font-size:small;color:black;font-family:consolas,"Courier New",courier,monospace;background-color:#fff}.csharpcode
pre{margin:0em}.csharpcode
.rem{color:#008000}.csharpcode
.kwrd{color:#00f}.csharpcode
.str{color:#006080}.csharpcode
.op{color:#0000c0}.csharpcode
.preproc{color:#c63}.csharpcode
.asp{background-color:#ff0}.csharpcode
.html{color:#800000}.csharpcode
.attr{color:#f00}.csharpcode
.alt{background-color:#f4f4f4;width:100%;margin:0em}.csharpcode
.lnum{color:#606060}</style><p>Once again, don’t forget the full project and source code is available on CodePlex here: <a
rel=\"nofollow\" href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3NsYXNoLmNvZGVwbGV4LmNvbQ==">http://slash.codeplex.com</a>.</p><p>Enjoy!</p> <img
src="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=10919" width="1" height="1" style="display: none;" /><p
class='technorati-tags'>Technorati Tags: <a
class='technorati-link' href='http://technorati.com/tag/SharePoint' rel='tag,nofollow' target='_blank'>SharePoint</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+2010' rel='tag,nofollow' target='_blank'>SharePoint 2010</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+Administration' rel='tag,nofollow' target='_blank'>SharePoint Administration</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+Development' rel='tag,nofollow' target='_blank'>SharePoint Development</a></p>]]></content:encoded> <wfw:commentRss>http://joelblogs.co.uk/2011/11/03/sharepoint-2010-locale-stapler-master-locale/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>SharePoint 2010 Google Maps Web Part now Free!</title><link>http://joelblogs.co.uk/2011/11/03/sharepoint-2010-google-maps-web-part-now-free/</link> <comments>http://joelblogs.co.uk/2011/11/03/sharepoint-2010-google-maps-web-part-now-free/#comments</comments> <pubDate>Thu, 03 Nov 2011 00:23:31 +0000</pubDate> <dc:creator>Joel Jeffery</dc:creator> <category><![CDATA[SharePoint 2010]]></category> <category><![CDATA[Google Maps]]></category> <category><![CDATA[SharePoint Development]]></category> <category><![CDATA[Solution Sandbox]]></category> <category><![CDATA[WebParts]]></category><guid
isPermaLink="false">http://joelblogs.co.uk/2011/11/03/sharepoint-2010-google-maps-web-part-now-free/</guid> <description><![CDATA[<p>In a fit of community spiritness, I’ve decided to share my <a
rel=\"nofollow\" href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3NwMjAxMGdvb2dsZW1hcHMuY29kZXBsZXguY29tLw==" rel=\"nofollow\">Google Maps Web Part, complete with source on CodePlex</a>.</p><p><img
alt="Example of joelblogs.co.uk Google Map Web Part" src="http://jfdiphoenix.co.uk/wp-content/uploads/2011/07/image_thumb.png" /></p><p>If you want a Sandbox Solution or a Farm Solution with a simple way of placing a Google Map onto a Web Part page, this is for you.</p><p>Check out the project here: <a
rel=\"nofollow\" href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3NwMjAxMGdvb2dsZW1hcHMuY29kZXBsZXguY29t" rel=\"nofollow\">http://sp2010googlemaps.codeplex.com</a>.</p> <img
src="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&#038;post_id=10910" width="1" height="1" style="display: none;" /><p
class='technorati-tags'>Technorati Tags: <a
class='technorati-link' href='http://technorati.com/tag/Google+Maps' rel='tag,nofollow' target='_blank'>Google Maps</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+2010' rel='tag,nofollow' target='_blank'>SharePoint 2010</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+Development' rel='tag,nofollow' target='_blank'>SharePoint Development</a>, <a
class='technorati-link' href='http://technorati.com/tag/Solution+Sandbox' rel='tag,nofollow' target='_blank'>Solution Sandbox</a>, <a
class='technorati-link' href='http://technorati.com/tag/WebParts' rel='tag,nofollow' target='_blank'>WebParts</a></p>]]></description> <content:encoded><![CDATA[<p>In a fit of community spiritness, I’ve decided to share my <a
rel=\"nofollow\" href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3NwMjAxMGdvb2dsZW1hcHMuY29kZXBsZXguY29tLw==" rel=\"nofollow\">Google Maps Web Part, complete with source on CodePlex</a>.</p><p><img
alt="Example of joelblogs.co.uk Google Map Web Part" src="http://jfdiphoenix.co.uk/wp-content/uploads/2011/07/image_thumb.png" /></p><p>If you want a Sandbox Solution or a Farm Solution with a simple way of placing a Google Map onto a Web Part page, this is for you.</p><p>Check out the project here: <a
rel=\"nofollow\" href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3NwMjAxMGdvb2dsZW1hcHMuY29kZXBsZXguY29t" rel=\"nofollow\">http://sp2010googlemaps.codeplex.com</a>.</p> <img
src="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=10910" width="1" height="1" style="display: none;" /><p
class='technorati-tags'>Technorati Tags: <a
class='technorati-link' href='http://technorati.com/tag/Google+Maps' rel='tag,nofollow' target='_blank'>Google Maps</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+2010' rel='tag,nofollow' target='_blank'>SharePoint 2010</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+Development' rel='tag,nofollow' target='_blank'>SharePoint Development</a>, <a
class='technorati-link' href='http://technorati.com/tag/Solution+Sandbox' rel='tag,nofollow' target='_blank'>Solution Sandbox</a>, <a
class='technorati-link' href='http://technorati.com/tag/WebParts' rel='tag,nofollow' target='_blank'>WebParts</a></p>]]></content:encoded> <wfw:commentRss>http://joelblogs.co.uk/2011/11/03/sharepoint-2010-google-maps-web-part-now-free/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>The &#8220;Bad Command&#8221; Song from my SharePoint Show</title><link>http://joelblogs.co.uk/2011/11/01/the-bad-command-song-from-my-sharepoint-show/</link> <comments>http://joelblogs.co.uk/2011/11/01/the-bad-command-song-from-my-sharepoint-show/#comments</comments> <pubDate>Tue, 01 Nov 2011 00:30:39 +0000</pubDate> <dc:creator>Joel Jeffery</dc:creator> <category><![CDATA[SharePoint 2010]]></category> <category><![CDATA[SharePoint]]></category> <category><![CDATA[SharePoint 2010 Training]]></category> <category><![CDATA[SharePoint Administration]]></category> <category><![CDATA[SharePoint Architecture]]></category> <category><![CDATA[SharePoint Development]]></category> <category><![CDATA[SharePoint Videos]]></category><guid
isPermaLink="false">http://joelblogs.co.uk/2011/11/01/the-bad-command-song-from-my-sharepoint-show/</guid> <description><![CDATA[<p>Despite protests from music lovers, here is another of the songs from my SharePoint Show.</p><p> <iframe
height="375" src="http://blip.tv/play/hYVegtvPWAA.html" frameborder="0" width="500" allowfullscreen="allowfullscreen"></iframe><embed
type="application/x-shockwave-flash" src="http://a.blip.tv/api.swf#hYVegtvPWAA" style="display:none"></embed><p>This is a mix from several live versions. In this song we visit what you can and can’t do in the Sandbox, and the several ways in which the User Code Service protects our server from the evils of any user code that tries to run a “Bad Command”.</p><p>Apologies to Lady Gaga, and all those who have been affected by issues in this video.</p> <img
src="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&#038;post_id=10907" width="1" height="1" style="display: none;" /><p
class='technorati-tags'>Technorati Tags: <a
class='technorati-link' href='http://technorati.com/tag/SharePoint' rel='tag,nofollow' target='_blank'>SharePoint</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+2010+Training' rel='tag,nofollow' target='_blank'>SharePoint 2010 Training</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+Administration' rel='tag,nofollow' target='_blank'>SharePoint Administration</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+Architecture' rel='tag,nofollow' target='_blank'>SharePoint Architecture</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+Development' rel='tag,nofollow' target='_blank'>SharePoint Development</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+Videos' rel='tag,nofollow' target='_blank'>SharePoint Videos</a></p>]]></description> <content:encoded><![CDATA[<p>Despite protests from music lovers, here is another of the songs from my SharePoint Show.</p><p> <iframe
height="375" src="http://blip.tv/play/hYVegtvPWAA.html" frameborder="0" width="500" allowfullscreen="allowfullscreen"></iframe><embed
type="application/x-shockwave-flash" src="http://a.blip.tv/api.swf#hYVegtvPWAA" style="display:none"></embed><p>This is a mix from several live versions. In this song we visit what you can and can’t do in the Sandbox, and the several ways in which the User Code Service protects our server from the evils of any user code that tries to run a “Bad Command”.</p><p>Apologies to Lady Gaga, and all those who have been affected by issues in this video.</p> <img
src="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=10907" width="1" height="1" style="display: none;" /><p
class='technorati-tags'>Technorati Tags: <a
class='technorati-link' href='http://technorati.com/tag/SharePoint' rel='tag,nofollow' target='_blank'>SharePoint</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+2010+Training' rel='tag,nofollow' target='_blank'>SharePoint 2010 Training</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+Administration' rel='tag,nofollow' target='_blank'>SharePoint Administration</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+Architecture' rel='tag,nofollow' target='_blank'>SharePoint Architecture</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+Development' rel='tag,nofollow' target='_blank'>SharePoint Development</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+Videos' rel='tag,nofollow' target='_blank'>SharePoint Videos</a></p>]]></content:encoded> <wfw:commentRss>http://joelblogs.co.uk/2011/11/01/the-bad-command-song-from-my-sharepoint-show/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Restoring Group By Content Type to SharePoint 2010 List Views</title><link>http://joelblogs.co.uk/2011/10/29/restoring-group-by-content-type-to-sharepoint-2010-list-views/</link> <comments>http://joelblogs.co.uk/2011/10/29/restoring-group-by-content-type-to-sharepoint-2010-list-views/#comments</comments> <pubDate>Sat, 29 Oct 2011 16:42:23 +0000</pubDate> <dc:creator>Joel Jeffery</dc:creator> <category><![CDATA[Development]]></category> <category><![CDATA[SharePoint 2010]]></category> <category><![CDATA[Content Types]]></category> <category><![CDATA[SharePoint]]></category> <category><![CDATA[SharePoint Development]]></category><guid
isPermaLink="false">http://joelblogs.co.uk/2011/10/29/restoring-group-by-content-type-to-sharepoint-2010-list-views/</guid> <description><![CDATA[<p>SharePoint 2007 had a commonly used feature that enabled users to create views on lists that grouped by Content Type.</p><p>For some reason, this feature was removed from the user interface in SharePoint 2010.</p><h2>Solution 1: The Easy Method</h2><p>If you wish to do this today, you can do this using SharePoint Designer to create a view and then change the Xsl to specify a different field name to group by (e.g. “ContentType”).</p><p><a
href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2pvZWxibG9ncy5jby51ay93cC1jb250ZW50L3VwbG9hZHMvMjAxMS8xMC9pbWFnZTMucG5n"><img
style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Overriding the Field Used for Grouping" border="0" alt="Overriding the Field Used for Grouping" src="http://joelblogs.co.uk/wp-content/uploads/2011/10/image_thumb3.png" width="404" height="291" /></a></p><h2>Solution 2: The Better Method</h2><p>Alternative, we could try and get our options added to the ViewEdit.aspx page. Options aren’t great for this as it’s a _layouts (application) page, and therefore we can’t just edit it in the browser or SharePoint Designer.</p><p><a
href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2pvZWxibG9ncy5jby51ay8yMDExLzEwLzI5L3Jlc3RvcmluZy1ncm91cC1ieS1jb250ZW50LXR5cGUtdG8tc2hhcmVwb2ludC0yMDEwLWxpc3Qtdmlld3Mv" class=\"more-link\">Read more on Restoring Group By Content Type to SharePoint 2010 List Views&#8230;</a></p> <img
src="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&#038;post_id=10906" width="1" height="1" style="display: none;" /><p
class='technorati-tags'>Technorati Tags: <a
class='technorati-link' href='http://technorati.com/tag/Content+Types' rel='tag,nofollow' target='_blank'>Content Types</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint' rel='tag,nofollow' target='_blank'>SharePoint</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+2010' rel='tag,nofollow' target='_blank'>SharePoint 2010</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+Development' rel='tag,nofollow' target='_blank'>SharePoint Development</a></p>]]></description> <content:encoded><![CDATA[<p>SharePoint 2007 had a commonly used feature that enabled users to create views on lists that grouped by Content Type.</p><p>For some reason, this feature was removed from the user interface in SharePoint 2010.</p><h2>Solution 1: The Easy Method</h2><p>If you wish to do this today, you can do this using SharePoint Designer to create a view and then change the Xsl to specify a different field name to group by (e.g. “ContentType”).</p><p><a
href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2pvZWxibG9ncy5jby51ay93cC1jb250ZW50L3VwbG9hZHMvMjAxMS8xMC9pbWFnZTMucG5n"><img
style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Overriding the Field Used for Grouping" border="0" alt="Overriding the Field Used for Grouping" src="http://joelblogs.co.uk/wp-content/uploads/2011/10/image_thumb3.png" width="404" height="291" /></a></p><h2>Solution 2: The Better Method</h2><p>Alternative, we could try and get our options added to the ViewEdit.aspx page. Options aren’t great for this as it’s a _layouts (application) page, and therefore we can’t just edit it in the browser or SharePoint Designer.</p><p>You could add a piece of JavaScript to do this though. Plan a) would be to add this to the bottom of you v4.master, and customise this for the whole site/site collection.</p><p>Plan b) would be to create something like a sandbox solution that deploys a “scriptlink” element, placing the script on every page that gets rendered.</p><p>I’ve create a CodePlex project for plan b). Here’s some of the code. Firstly, here’s the JavaScript I’d like to run on every page. It simply creates a new &lt;option&gt; tag in HTML and adds it to the drop down list if it exists on the page. Let’s call it “ListViewEdit.js”.</p><pre class="csharpcode">_spBodyOnLoadFunctionNames.push(<span class="str">&quot;jbCTFix&quot;</span>);

<span class="kwrd">function</span> jbCTFix() {
    jbCTKludge(<span class="str">'idGroupField1'</span>);
    jbCTKludge(<span class="str">'idGroupField2'</span>);
}
<span class="kwrd">function</span> jbCTKludge(selName) {
    <span class="kwrd">var</span> sel = document.getElementById(selName);
    <span class="kwrd">if</span> (sel) {
        <span class="kwrd">if</span> (sel.selectedIndex &gt;= 0) {

            <span class="kwrd">var</span> o = document.createElement(<span class="str">'option'</span>);
            o.text = <span class="str">'Content Type'</span>;
            o.value = <span class="str">'tp_ContentType'</span>;

            <span class="kwrd">var</span> prev = sel.options[sel.selectedIndex];
            <span class="kwrd">try</span> {
                sel.add(o, prev);
            }
            <span class="kwrd">catch</span> (ex) {
                sel.add(o, sel.selectedIndex);
            }
        }
    }
}</pre><style type="text/css">.csharpcode, .csharpcode
pre{font-size:small;color:black;font-family:consolas,"Courier New",courier,monospace;background-color:#fff}.csharpcode
pre{margin:0em}.csharpcode
.rem{color:#008000}.csharpcode
.kwrd{color:#00f}.csharpcode
.str{color:#006080}.csharpcode
.op{color:#0000c0}.csharpcode
.preproc{color:#c63}.csharpcode
.asp{background-color:#ff0}.csharpcode
.html{color:#800000}.csharpcode
.attr{color:#f00}.csharpcode
.alt{background-color:#f4f4f4;width:100%;margin:0em}.csharpcode
.lnum{color:#606060}</style><p>Next, here’s the element manifest to apply this on each page in the site collection.</p><pre class="csharpcode"><span class="kwrd">&lt;?</span><span class="html">xml</span> <span class="attr">version</span><span class="kwrd">=&quot;1.0&quot;</span> <span class="attr">encoding</span><span class="kwrd">=&quot;utf-8&quot;</span>?<span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">Elements</span> <span class="attr">xmlns</span><span class="kwrd">=&quot;http://schemas.microsoft.com/sharepoint/&quot;</span><span class="kwrd">&gt;</span>
  <span class="kwrd">&lt;</span><span class="html">CustomAction</span> <span class="attr">Id</span><span class="kwrd">=&quot;Ribbon.Library.Actions.Scripts&quot;</span>
              <span class="attr">Location</span> <span class="kwrd">=&quot;ScriptLink&quot;</span>
              <span class="attr">ScriptSrc</span><span class="kwrd">=&quot;~site/ListViewEdit/ListViewEdit.js&quot;</span> <span class="kwrd">/&gt;</span>
  <span class="kwrd">&lt;</span><span class="html">Module</span> <span class="attr">Name</span><span class="kwrd">=&quot;ListViewEdit&quot;</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">File</span> <span class="attr">Path</span><span class="kwrd">=&quot;ListViewEdit\ListViewEdit.js&quot;</span> <span class="attr">Url</span><span class="kwrd">=&quot;ListViewEdit/ListViewEdit.js&quot;</span> <span class="kwrd">/&gt;</span>
  <span class="kwrd">&lt;/</span><span class="html">Module</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">Elements</span><span class="kwrd">&gt;</span></pre><style type="text/css">.csharpcode, .csharpcode
pre{font-size:small;color:black;font-family:consolas,"Courier New",courier,monospace;background-color:#fff}.csharpcode
pre{margin:0em}.csharpcode
.rem{color:#008000}.csharpcode
.kwrd{color:#00f}.csharpcode
.str{color:#006080}.csharpcode
.op{color:#0000c0}.csharpcode
.preproc{color:#c63}.csharpcode
.asp{background-color:#ff0}.csharpcode
.html{color:#800000}.csharpcode
.attr{color:#f00}.csharpcode
.alt{background-color:#f4f4f4;width:100%;margin:0em}.csharpcode
.lnum{color:#606060}</style><p>You can download the full project and source code for the <a
rel=\"nofollow\" title=\"SharePoint 2010 ViewEdit Group by Content Type\" href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3NwMTBjdGdyb3VwaW5nLmNvZGVwbGV4LmNvbQ==" rel=\"nofollow\" target=\"_blank\">SharePoint 2010 ViewEdit Group by Content Type</a> project from the CodePlex project here: <a
rel=\"nofollow\" href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3NwMTBjdGdyb3VwaW5nLmNvZGVwbGV4LmNvbS8=">sp10ctgrouping.codeplex.com</a></p> <img
src="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=10906" width="1" height="1" style="display: none;" /><p
class='technorati-tags'>Technorati Tags: <a
class='technorati-link' href='http://technorati.com/tag/Content+Types' rel='tag,nofollow' target='_blank'>Content Types</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint' rel='tag,nofollow' target='_blank'>SharePoint</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+2010' rel='tag,nofollow' target='_blank'>SharePoint 2010</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+Development' rel='tag,nofollow' target='_blank'>SharePoint Development</a></p>]]></content:encoded> <wfw:commentRss>http://joelblogs.co.uk/2011/10/29/restoring-group-by-content-type-to-sharepoint-2010-list-views/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>SharePoint 2010 Audience Membership Workflow Activity Condition for Designer Workflows</title><link>http://joelblogs.co.uk/2011/10/29/sharepoint-2010-audience-membership-workflow-activity-condition-for-designer-workflows/</link> <comments>http://joelblogs.co.uk/2011/10/29/sharepoint-2010-audience-membership-workflow-activity-condition-for-designer-workflows/#comments</comments> <pubDate>Sat, 29 Oct 2011 00:45:13 +0000</pubDate> <dc:creator>Joel Jeffery</dc:creator> <category><![CDATA[Development]]></category> <category><![CDATA[SharePoint 2010]]></category> <category><![CDATA[SharePoint]]></category> <category><![CDATA[SharePoint Designer 2010]]></category> <category><![CDATA[SharePoint Development]]></category> <category><![CDATA[Workflow]]></category><guid
isPermaLink="false">http://joelblogs.co.uk/2011/10/29/sharepoint-2010-audience-membership-workflow-activity-condition-for-designer-workflows/</guid> <description><![CDATA[<p>One of my students tonight asked if it was possible to add a condition to a SharePoint Designer 2010 declarative workflow to detect if the initiating user is a member of a particular audience.</p><p>There’s nothing built-in to deliver this in SharePoint 2010.</p><p>So I knocked-up the following solution based upon the excellent reference implementations of workflows from the SharePoint Prescriptive Guidance Pack at <a
rel=\"nofollow\" href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3NwZy5jb2RlcGxleC5jb20=">spg.codeplex.com</a>.</p><p>I’ve put the <a
rel=\"nofollow\" href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3NwYW13YWZ0LmNvZGVwbGV4LmNvbS8=" target=\"_blank\">full version of my source code and a completed release</a> up on CodePlex.</p><p>Firstly, the .Actions file, which must be deployed to 14\\Template\\Xml\\1033\\Workflow:</p><p><a
href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2pvZWxibG9ncy5jby51ay8yMDExLzEwLzI5L3NoYXJlcG9pbnQtMjAxMC1hdWRpZW5jZS1tZW1iZXJzaGlwLXdvcmtmbG93LWFjdGl2aXR5LWNvbmRpdGlvbi1mb3ItZGVzaWduZXItd29ya2Zsb3dzLw==" class=\"more-link\">Read more on SharePoint 2010 Audience Membership Workflow Activity Condition for Designer Workflows&#8230;</a></p> <img
src="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&#038;post_id=10900" width="1" height="1" style="display: none;" /><p
class='technorati-tags'>Technorati Tags: <a
class='technorati-link' href='http://technorati.com/tag/SharePoint' rel='tag,nofollow' target='_blank'>SharePoint</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+2010' rel='tag,nofollow' target='_blank'>SharePoint 2010</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+Designer+2010' rel='tag,nofollow' target='_blank'>SharePoint Designer 2010</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+Development' rel='tag,nofollow' target='_blank'>SharePoint Development</a>, <a
class='technorati-link' href='http://technorati.com/tag/Workflow' rel='tag,nofollow' target='_blank'>Workflow</a></p>]]></description> <content:encoded><![CDATA[<p>One of my students tonight asked if it was possible to add a condition to a SharePoint Designer 2010 declarative workflow to detect if the initiating user is a member of a particular audience.</p><p>There’s nothing built-in to deliver this in SharePoint 2010.</p><p>So I knocked-up the following solution based upon the excellent reference implementations of workflows from the SharePoint Prescriptive Guidance Pack at <a
rel=\"nofollow\" href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3NwZy5jb2RlcGxleC5jb20=">spg.codeplex.com</a>.</p><p>I’ve put the <a
rel=\"nofollow\" href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3NwYW13YWZ0LmNvZGVwbGV4LmNvbS8=" target=\"_blank\">full version of my source code and a completed release</a> up on CodePlex.</p><p>Firstly, the .Actions file, which must be deployed to 14\\Template\\Xml\\1033\\Workflow:</p><pre class="csharpcode"><span class="kwrd">&lt;?</span><span class="html">xml</span> <span class="attr">version</span><span class="kwrd">=&quot;1.0&quot;</span> <span class="attr">encoding</span><span class="kwrd">=&quot;utf-8&quot;</span> ?<span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">WorkflowInfo</span><span class="kwrd">&gt;</span>
  <span class="kwrd">&lt;</span><span class="html">Conditions</span> <span class="attr">And</span><span class="kwrd">=&quot;and&quot;</span> <span class="attr">Or</span><span class="kwrd">=&quot;or&quot;</span> <span class="attr">Not</span><span class="kwrd">=&quot;not&quot;</span> <span class="attr">When</span><span class="kwrd">=&quot;If&quot;</span> <span class="attr">Else</span><span class="kwrd">=&quot;Else if&quot;</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">Condition</span> <span class="attr">Name</span><span class="kwrd">=&quot;User is member of audience&quot;</span>
        <span class="attr">FunctionName</span><span class="kwrd">=&quot;IsUserMemberOfAudienceCondition&quot;</span>
        <span class="attr">ClassName</span><span class="kwrd">=&quot;joelblogs.co.uk.WorkflowActivities.AudienceActivity.AudienceMemberActivity&quot;</span>
        <span class="attr">Assembly</span><span class="kwrd">=&quot;joelblogs.co.uk.WorkflowActivities.AudienceActivity,
          Version=1.0.0.0, Culture=neutral, PublicKeyToken=d926d259b11539d4&quot;</span>
        <span class="attr">AppliesTo</span><span class="kwrd">=&quot;all&quot;</span>
            <span class="attr">UsesCurrentItem</span><span class="kwrd">=&quot;True&quot;</span><span class="kwrd">&gt;</span>
      <span class="kwrd">&lt;</span><span class="html">RuleDesigner</span> <span class="attr">Sentence</span><span class="kwrd">=&quot;The user is a member of audience %1&quot;</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;</span><span class="html">FieldBind</span> <span class="attr">Id</span><span class="kwrd">=&quot;1&quot;</span> <span class="attr">Field</span><span class="kwrd">=&quot;_1_&quot;</span> <span class="attr">Text</span><span class="kwrd">=&quot;&quot;</span><span class="kwrd">/&gt;</span>
      <span class="kwrd">&lt;/</span><span class="html">RuleDesigner</span><span class="kwrd">&gt;</span>
      <span class="kwrd">&lt;</span><span class="html">Parameters</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;</span><span class="html">Parameter</span> <span class="attr">Name</span><span class="kwrd">=&quot;_1_&quot;</span> <span class="attr">Type</span><span class="kwrd">=&quot;System.String, mscorlib&quot;</span> <span class="attr">Direction</span><span class="kwrd">=&quot;In&quot;</span> <span class="kwrd">/&gt;</span>
      <span class="kwrd">&lt;/</span><span class="html">Parameters</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;/</span><span class="html">Condition</span><span class="kwrd">&gt;</span>
  <span class="kwrd">&lt;/</span><span class="html">Conditions</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">WorkflowInfo</span><span class="kwrd">&gt;</span></pre><p>Next, the workflow activity class itself:</p><pre class="csharpcode"><span class="kwrd">using</span> System;
<span class="kwrd">using</span> Microsoft.SharePoint;
<span class="kwrd">using</span> Microsoft.SharePoint.WorkflowActions;
<span class="kwrd">using</span> Microsoft.Office.Server.Audience;
<span class="kwrd">using</span> System.Workflow.ComponentModel;
<span class="kwrd">using</span> System.ComponentModel;

<span class="kwrd">namespace</span> joelblogs.co.uk.WorkflowActivities.AudienceActivity
{
    <span class="rem">/// &lt;summary&gt;</span>
    <span class="rem">/// Windows Workflow Activity for SharePoint 2010. Checks if</span>
    <span class="rem">/// Initiating User is a member of the specified Audience.</span>
    <span class="rem">/// Written by Joel Jeffery, 2011-10-28.</span>
    <span class="rem">/// &lt;/summary&gt;</span>
    <span class="kwrd">class</span> AudienceMemberActivity : Activity
    {
        <span class="rem">/// &lt;summary&gt;</span>
        <span class="rem">/// Returns whether the user exists in the specified audience or not</span>
        <span class="rem">/// -- signature to match SharePoint Designer Requirement</span>
        <span class="rem">/// &lt;/summary&gt;</span>
        <span class="rem">/// &lt;param name=&quot;workflowContext&quot;&gt;Environment for activity&lt;/param&gt;</span>
        <span class="rem">/// &lt;param name=&quot;listId&quot;&gt;ID of the list the workflow is running on (unused)&lt;/param&gt;</span>
        <span class="rem">/// &lt;param name=&quot;itemId&quot;&gt;Item ID of the item the workflow is running on (unused)&lt;/param&gt;</span>
        <span class="rem">/// &lt;param name=&quot;siteUrl&quot;&gt;The audience name to determine whether the user is in it or not&lt;/param&gt;</span>
        <span class="rem">/// &lt;returns&gt;True if site exists, false if not &lt;/returns&gt;</span>
        <span class="kwrd">public</span> <span class="kwrd">static</span> <span class="kwrd">bool</span> IsUserMemberOfAudienceCondition(
            WorkflowContext workflowContext, <span class="kwrd">string</span> listId, <span class="kwrd">int</span> itemId, <span class="kwrd">string</span> audienceName)
        {
            <span class="kwrd">string</span> exception;
            <span class="kwrd">return</span> (IsUserMemberOfAudience(
                workflowContext.InitiatorUser.LoginName, audienceName, <span class="kwrd">out</span> exception));
        }

        <span class="rem">/// &lt;summary&gt;</span>
        <span class="rem">/// Determines whether [is user member of audience] [the specified login name].</span>
        <span class="rem">/// &lt;/summary&gt;</span>
        <span class="rem">/// &lt;param name=&quot;loginName&quot;&gt;Name of the login.&lt;/param&gt;</span>
        <span class="rem">/// &lt;param name=&quot;audienceName&quot;&gt;Name of the audience.&lt;/param&gt;</span>
        <span class="rem">/// &lt;param name=&quot;exception&quot;&gt;The exception.&lt;/param&gt;</span>
        <span class="rem">/// &lt;returns&gt;</span>
        <span class="rem">///   &lt;c&gt;true&lt;/c&gt; if [is user member of audience] [the specified login name]; otherwise, &lt;c&gt;false&lt;/c&gt;.</span>
        <span class="rem">/// &lt;/returns&gt;</span>
        <span class="kwrd">public</span> <span class="kwrd">static</span> <span class="kwrd">bool</span> IsUserMemberOfAudience(<span class="kwrd">string</span> loginName, <span class="kwrd">string</span> audienceName, <span class="kwrd">out</span> <span class="kwrd">string</span> exception)
        {
            <span class="kwrd">try</span>
            {
                exception = <span class="kwrd">null</span>;
                SPServiceContext context = SPServiceContext.Current;
                AudienceManager audManager = <span class="kwrd">new</span> AudienceManager(context);
                <span class="kwrd">return</span> audManager.IsMemberOfAudience(loginName, audienceName);
            }
            <span class="kwrd">catch</span> (Exception e)
            {
                exception = e.ToString();
                <span class="kwrd">return</span> (<span class="kwrd">false</span>);
            }
        }

        <span class="kwrd">public</span> <span class="kwrd">static</span> DependencyProperty AudienceNameProperty =
            DependencyProperty.Register(<span class="str">&quot;AudienceName&quot;</span>, <span class="kwrd">typeof</span>(<span class="kwrd">string</span>), <span class="kwrd">typeof</span>(AudienceMemberActivity));

        [Description(<span class="str">&quot;The absolute URL of the site or site collection to create&quot;</span>)]
        [Browsable(<span class="kwrd">true</span>)]
        [Category(<span class="str">&quot;joelblogs.co.uk Activities&quot;</span>)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
        <span class="kwrd">public</span> <span class="kwrd">string</span> SiteUrl
        {
            get { <span class="kwrd">return</span> ((<span class="kwrd">string</span>)<span class="kwrd">base</span>.GetValue(AudienceNameProperty)); }
            set { <span class="kwrd">base</span>.SetValue(AudienceNameProperty, <span class="kwrd">value</span>); }
        }

        <span class="kwrd">public</span> <span class="kwrd">static</span> DependencyProperty ExistsProperty =
            DependencyProperty.Register(<span class="str">&quot;Exists&quot;</span>, <span class="kwrd">typeof</span>(<span class="kwrd">bool</span>), <span class="kwrd">typeof</span>(AudienceMemberActivity));
        [Description(<span class="str">&quot;The result of the operation indicating whether the site exists or not&quot;</span>)]
        [Browsable(<span class="kwrd">true</span>)]
        [Category(<span class="str">&quot;joelblogs.co.uk Activities&quot;</span>)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
        <span class="kwrd">public</span> <span class="kwrd">bool</span> Exists
        {
            get { <span class="kwrd">return</span> ((<span class="kwrd">bool</span>)<span class="kwrd">base</span>.GetValue(ExistsProperty)); }
            set { <span class="kwrd">base</span>.SetValue(ExistsProperty, <span class="kwrd">value</span>); }
        }

        <span class="kwrd">public</span> <span class="kwrd">static</span> DependencyProperty ExceptionProperty =
            DependencyProperty.Register(<span class="str">&quot;Exception&quot;</span>, <span class="kwrd">typeof</span>(<span class="kwrd">string</span>), <span class="kwrd">typeof</span>(AudienceMemberActivity));
        [Description(<span class="str">&quot;The exception generated while testing for the existance of the site&quot;</span>)]
        [Browsable(<span class="kwrd">true</span>)]
        [Category(<span class="str">&quot;joelblogs.co.uk Activities&quot;</span>)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
        <span class="kwrd">public</span> <span class="kwrd">string</span> Exception
        {
            get { <span class="kwrd">return</span> ((<span class="kwrd">string</span>)<span class="kwrd">base</span>.GetValue(ExceptionProperty)); }
            set { <span class="kwrd">base</span>.SetValue(ExceptionProperty, <span class="kwrd">value</span>); }
        }
    }
}</pre><style type="text/css">.csharpcode, .csharpcode
pre{font-size:small;color:black;font-family:consolas,"Courier New",courier,monospace;background-color:#fff}.csharpcode
pre{margin:0em}.csharpcode
.rem{color:#008000}.csharpcode
.kwrd{color:#00f}.csharpcode
.str{color:#006080}.csharpcode
.op{color:#0000c0}.csharpcode
.preproc{color:#c63}.csharpcode
.asp{background-color:#ff0}.csharpcode
.html{color:#800000}.csharpcode
.attr{color:#f00}.csharpcode
.alt{background-color:#f4f4f4;width:100%;margin:0em}.csharpcode
.lnum{color:#606060}</style><p>&#160;</p><p>You’ll also need a terribly clever feature receiver implementation from the SPG that uses the SPWebConfigModification class to add AuthorizedType blocks to the web.configs throughout our farm, or our class won’t be loaded by WF.</p><pre class="csharpcode"><span class="kwrd">using</span> System;
<span class="kwrd">using</span> System.Diagnostics;
<span class="kwrd">using</span> System.Globalization;
<span class="kwrd">using</span> System.Runtime.InteropServices;
<span class="kwrd">using</span> Microsoft.SharePoint;
<span class="kwrd">using</span> Microsoft.SharePoint.Administration;

<span class="kwrd">namespace</span> joelblogs.co.uk.WorkflowActivities.AudienceActivity.Features.AudienceTestActivity
{
    <span class="rem">/// &lt;summary&gt;</span>
    <span class="rem">/// This class handles events raised during feature activation, deactivation, </span>
    <span class="rem">/// installation, uninstallation, and upgrade.</span>
    <span class="rem">/// &lt;/summary&gt;</span>
    <span class="rem">/// &lt;remarks&gt;</span>
    <span class="rem">/// The GUID attached to this class may be used during packaging and should not be modified.</span>
    <span class="rem">/// &lt;/remarks&gt;</span>

    [Guid(<span class="str">&quot;a91d2258-b39b-4ca4-8282-2565c061378d&quot;</span>)]
    <span class="kwrd">public</span> <span class="kwrd">class</span> AudienceTestActivityEventReceiver : SPFeatureReceiver
    {
        <span class="kwrd">public</span> <span class="kwrd">override</span> <span class="kwrd">void</span> FeatureActivated(SPFeatureReceiverProperties properties)
        {
            <span class="kwrd">try</span>
            {
                SPWebService contentService = SPWebService.ContentService;
                contentService.WebConfigModifications.Add(GetConfigModification());
                <span class="rem">// Serialize the web application state and propagate changes across the farm. </span>
                contentService.Update();
                <span class="rem">// Save web.config changes.</span>
                contentService.ApplyWebConfigModifications();
            }
            <span class="kwrd">catch</span> (Exception e)
            {
                Console.WriteLine(e.ToString());
                <span class="kwrd">throw</span>;
            }
        }

        <span class="kwrd">public</span> <span class="kwrd">override</span> <span class="kwrd">void</span> FeatureDeactivating(SPFeatureReceiverProperties properties)
        {
            <span class="kwrd">try</span>
            {
                SPWebService contentService = SPWebService.ContentService;
                contentService.WebConfigModifications.Remove(GetConfigModification());
                <span class="rem">// Serialize the web application state and propagate changes across the farm. </span>
                contentService.Update();
                <span class="rem">// Save web.config changes.</span>
                contentService.ApplyWebConfigModifications();
            }
            <span class="kwrd">catch</span> (Exception e)
            {
                Console.WriteLine(e.ToString());
                <span class="kwrd">throw</span>;
            }
        }

        <span class="kwrd">public</span> SPWebConfigModification GetConfigModification()
        {
            <span class="kwrd">string</span> assemblyValue = <span class="kwrd">typeof</span>(AudienceMemberActivity).Assembly.FullName;
            <span class="kwrd">string</span> namespaceValue = <span class="kwrd">typeof</span>(AudienceMemberActivity).Namespace;

            SPWebConfigModification modification = <span class="kwrd">new</span> SPWebConfigModification(
                <span class="kwrd">string</span>.Format(CultureInfo.CurrentCulture,
                    <span class="str">&quot;authorizedType[@Assembly='{0}'][@Namespace='{1}']&quot;</span> +
                    <span class="str">&quot;[@TypeName='*'][@Authorized='True']&quot;</span>, assemblyValue, namespaceValue),
                <span class="str">&quot;configuration/System.Workflow.ComponentModel.WorkflowCompiler/authorizedTypes&quot;</span>);

            modification.Owner = <span class="str">&quot;joelblogs.co.uk&quot;</span>;
            modification.Sequence = 0;
            modification.Type = SPWebConfigModification.SPWebConfigModificationType.EnsureChildNode;
            modification.Value =
                <span class="kwrd">string</span>.Format(CultureInfo.CurrentCulture,
                <span class="str">&quot;&lt;authorizedType Assembly=\&quot;{0}\&quot; Namespace=\&quot;{1}\&quot; &quot;</span> +
                <span class="str">&quot;TypeName=\&quot;*\&quot; Authorized=\&quot;True\&quot; /&gt;&quot;</span>, assemblyValue, namespaceValue);

            Trace.TraceInformation(<span class="str">&quot;SPWebConfigModification value: {0}&quot;</span>, modification.Value);

            <span class="kwrd">return</span> modification;
        }
    }
}</pre><p><style type="text/css">.csharpcode, .csharpcode
pre{font-size:small;color:black;font-family:consolas,"Courier New",courier,monospace;background-color:#fff}.csharpcode
pre{margin:0em}.csharpcode
.rem{color:#008000}.csharpcode
.kwrd{color:#00f}.csharpcode
.str{color:#006080}.csharpcode
.op{color:#0000c0}.csharpcode
.preproc{color:#c63}.csharpcode
.asp{background-color:#ff0}.csharpcode
.html{color:#800000}.csharpcode
.attr{color:#f00}.csharpcode
.alt{background-color:#f4f4f4;width:100%;margin:0em}.csharpcode
.lnum{color:#606060}</style></p><p>You can download the full source code to my SharePoint 2010 Audience Membership Workflow Activity (Full Trust) here: <a
rel=\"nofollow\" href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3NwYW13YWZ0LmNvZGVwbGV4LmNvbQ==">http://spamwaft.codeplex.com</a>.</p> <img
src="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=10900" width="1" height="1" style="display: none;" /><p
class='technorati-tags'>Technorati Tags: <a
class='technorati-link' href='http://technorati.com/tag/SharePoint' rel='tag,nofollow' target='_blank'>SharePoint</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+2010' rel='tag,nofollow' target='_blank'>SharePoint 2010</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+Designer+2010' rel='tag,nofollow' target='_blank'>SharePoint Designer 2010</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+Development' rel='tag,nofollow' target='_blank'>SharePoint Development</a>, <a
class='technorati-link' href='http://technorati.com/tag/Workflow' rel='tag,nofollow' target='_blank'>Workflow</a></p>]]></content:encoded> <wfw:commentRss>http://joelblogs.co.uk/2011/10/29/sharepoint-2010-audience-membership-workflow-activity-condition-for-designer-workflows/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Empirical Studies of the SharePoint 2010 Recycle Bin</title><link>http://joelblogs.co.uk/2011/10/25/empirical-studies-of-the-sharepoint-2010-recycle-bin/</link> <comments>http://joelblogs.co.uk/2011/10/25/empirical-studies-of-the-sharepoint-2010-recycle-bin/#comments</comments> <pubDate>Tue, 25 Oct 2011 09:55:47 +0000</pubDate> <dc:creator>Joel Jeffery</dc:creator> <category><![CDATA[SharePoint 2010]]></category> <category><![CDATA[Recycle Bin]]></category> <category><![CDATA[SharePoint Administration]]></category><guid
isPermaLink="false">http://joelblogs.co.uk/2011/10/25/empirical-studies-of-the-sharepoint-2010-recycle-bin/</guid> <description><![CDATA[<h2>How Does the Recycle Bin Work in SharePoint 2010?</h2><p>I was recently asked how the dual stage recycle bins worked in SharePoint 2010 by one of my students (thank you, Andrew!), and I realised that I didn’t know enough. It’s not just me either. This has to be one of the poorest-documented SharePoint features on the Internet.</p><p>This article charts my journey of discovery.</p><h3>Introduction</h3><p>The SharePoint Recycle Bin is a complex entity. It has two stages, both accessible from within the site collection.</p><p>The 1st stage, known as the “end user recycle bin”, is where lists, documents and list items delete by users are sent. Their storage limit is known to be included in whatever site collection quota.</p><p><a
href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2pvZWxibG9ncy5jby51ay8yMDExLzEwLzI1L2VtcGlyaWNhbC1zdHVkaWVzLW9mLXRoZS1zaGFyZXBvaW50LTIwMTAtcmVjeWNsZS1iaW4v" class=\"more-link\">Read more on Empirical Studies of the SharePoint 2010 Recycle Bin&#8230;</a></p> <img
src="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&#038;post_id=10890" width="1" height="1" style="display: none;" /><p
class='technorati-tags'>Technorati Tags: <a
class='technorati-link' href='http://technorati.com/tag/Recycle+Bin' rel='tag,nofollow' target='_blank'>Recycle Bin</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+2010' rel='tag,nofollow' target='_blank'>SharePoint 2010</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+Administration' rel='tag,nofollow' target='_blank'>SharePoint Administration</a></p>]]></description> <content:encoded><![CDATA[<h2>How Does the Recycle Bin Work in SharePoint 2010?</h2><p>I was recently asked how the dual stage recycle bins worked in SharePoint 2010 by one of my students (thank you, Andrew!), and I realised that I didn’t know enough. It’s not just me either. This has to be one of the poorest-documented SharePoint features on the Internet.</p><p>This article charts my journey of discovery.</p><h3>Introduction</h3><p>The SharePoint Recycle Bin is a complex entity. It has two stages, both accessible from within the site collection.</p><p>The 1st stage, known as the “end user recycle bin”, is where lists, documents and list items delete by users are sent. Their storage limit is known to be included in whatever site collection quota.</p><p>The 2nd stage, (accessibly only by site collection administrators) known as the “deleted from end user recycle bin”, is where such documents are sent when the user deletes them from the recycle bin. Their storage limit is known to be a percentage on top of the site collection quota, and is specified as a single setting, that applies to a whole web application.</p><h3>Objectives</h3><p>This experiment aims to show through empirical means how the SharePoint 2010 1st and 2nd Stage Recycle Bins behave.</p><h3>Hypothesis</h3><p>It is commonly understood that when the 1st stage time-to-live is reached, the deleted items will migrate to the 2nd stage recycle bin, to be held their indefinitely, or until the percentage of space of the site collection quota has been reach.</p><p>It is documented on Microsoft TechNet that the Recycle Bin timer job runs daily to find deleted content and “<a
rel=\"nofollow\" href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXQubWljcm9zb2Z0LmNvbS9lbi11cy9saWJyYXJ5L2NjNjc4ODcwLmFzcHg=" rel=\"nofollow\" target=\"_blank\">moves it to the next stage or deletes it</a>”:</p><p><a
href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2pvZWxibG9ncy5jby51ay93cC1jb250ZW50L3VwbG9hZHMvMjAxMS8xMC9pbWFnZV90aHVtYjIzLnBuZw=="><img
style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image_thumb23" border="0" alt="image_thumb23" src="http://joelblogs.co.uk/wp-content/uploads/2011/10/image_thumb23_thumb.png" width="515" height="56" /></a></p><p>The behaviour is further documented on p68 of the Microsoft Press book “SharePoint 2010 Administrator’s Companion” by Bill English:</p><p><a
href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2pvZWxibG9ncy5jby51ay93cC1jb250ZW50L3VwbG9hZHMvMjAxMS8xMC9pbWFnZV90aHVtYjI0LnBuZw=="><img
style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image_thumb24" border="0" alt="image_thumb24" src="http://joelblogs.co.uk/wp-content/uploads/2011/10/image_thumb24_thumb.png" width="511" height="59" /></a></p><p>The TechNet page “<a
rel=\"nofollow\" href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXQubWljcm9zb2Z0LmNvbS9lbi11cy9saWJyYXJ5L2NjMjYzMDExLmFzcHg=" rel=\"nofollow\" target=\"_blank\">Plan to protect content by using recycle bins</a>” is ambiguous in its wording, but can be read as contradicting the other two sources.</p><p>Firstly…</p><table
style="border-bottom-color: #ddd; border-top-color: #ddd; margin: 5px 10px 5px 5px; border-right-color: #ddd; border-left-color: #ddd" width="97%"><tbody><tr
style="vertical-align: top"><th
style="border-bottom: #c8cdde 1px solid; border-left: #ccc 0px solid; background-color: #ccc; vertical-align: bottom; border-top: #ccc 0px solid; border-right: #ccc 0px solid" align="left"><font
face="Verdana"></font><font
style="font-size: 8.2pt" color="#000066">When a user does this </font></th><th
style="border-bottom: #c8cdde 1px solid; border-left: #ccc 0px solid; background-color: #ccc; vertical-align: bottom; border-top: #ccc 0px solid; border-right: #ccc 0px solid" align="left"><font
face="Verdana"></font><font
style="font-size: 8.2pt" color="#000066">The item is </font></th><th
style="border-bottom: #c8cdde 1px solid; border-left: #ccc 0px solid; background-color: #ccc; vertical-align: bottom; border-top: #ccc 0px solid; border-right: #ccc 0px solid" align="left"><font
face="Verdana"></font><font
style="font-size: 8.2pt" color="#000066">The item can be restored by </font></th></tr><tr
style="vertical-align: top"><td
style="border-bottom: #ccc 1px solid; border-left: #ccc 1px solid; background-color: #fff; overflow: auto; border-top: #ccc 1px solid; border-right: #d5d5d3 1px solid"><p
style="padding-bottom: 5px; line-height: normal; padding-left: 5px; padding-right: 5px; padding-top: 5px"><font
face="Verdana"></font><font
style="font-size: 8.2pt" color="#000000">Deletes an item</font></p></td><td
style="border-bottom: #ccc 1px solid; border-left: #ccc 1px solid; background-color: #fff; overflow: auto; border-top: #ccc 1px solid; border-right: #d5d5d3 1px solid"><p
style="padding-bottom: 5px; line-height: normal; padding-left: 5px; padding-right: 5px; padding-top: 5px"><font
face="Verdana"></font><font
style="font-size: 8.2pt" color="#000000">Held in the first-stage Recycle Bin until the item is deleted from the Recycle Bin or the item has been in the Recycle Bin longer than the time limit configured for an item to be held in the Recycle Bin.</font></p></td><td
style="border-bottom: #ccc 1px solid; border-left: #ccc 1px solid; background-color: #fff; overflow: auto; border-top: #ccc 1px solid; border-right: #d5d5d3 1px solid"><p
style="padding-bottom: 5px; line-height: normal; padding-left: 5px; padding-right: 5px; padding-top: 5px"><font
face="Verdana"></font><font
style="font-size: 8.2pt" color="#000000">Users or site collection administrators</font></p></td></tr><tr
style="vertical-align: top"><td
style="border-bottom: #ccc 1px solid; border-left: #ccc 1px solid; background-color: #fff; overflow: auto; border-top: #ccc 1px solid; border-right: #d5d5d3 1px solid"><p
style="padding-bottom: 5px; line-height: normal; padding-left: 5px; padding-right: 5px; padding-top: 5px"><font
face="Verdana"></font><font
style="font-size: 8.2pt" color="#000000">Deletes an item from the Recycle Bin</font></p></td><td
style="border-bottom: #ccc 1px solid; border-left: #ccc 1px solid; background-color: #fff; overflow: auto; border-top: #ccc 1px solid; border-right: #d5d5d3 1px solid"><p
style="padding-bottom: 5px; line-height: normal; padding-left: 5px; padding-right: 5px; padding-top: 5px"><font
face="Verdana"></font><font
style="font-size: 8.2pt" color="#000000">Held in the second-stage Recycle Bin</font></p></td><td
style="border-bottom: #ccc 1px solid; border-left: #ccc 1px solid; background-color: #fff; overflow: auto; border-top: #ccc 1px solid; border-right: #d5d5d3 1px solid"><p
style="padding-bottom: 5px; line-height: normal; padding-left: 5px; padding-right: 5px; padding-top: 5px"><font
face="Verdana"></font><font
style="font-size: 8.2pt" color="#000000">Site collection administrators</font></p></td></tr></tbody></table><p>And secondly…</p><blockquote><p>The time limit for the Recycle Bins applies to the total time after the item was first deleted — not the time spent in either Recycle Bin stage.</p></blockquote><h3>Method</h3><p><em>This experiment was carried out with SharePoint 2010 SP1 and the July 2011 Cumulative Update.</em></p><p>Two documents were placed into a Shared Documents library.</p><p><a
href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2pvZWxibG9ncy5jby51ay93cC1jb250ZW50L3VwbG9hZHMvMjAxMS8xMC9pbWFnZV90aHVtYjE3LnBuZw=="><img
style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image_thumb17" border="0" alt="image_thumb17" src="http://joelblogs.co.uk/wp-content/uploads/2011/10/image_thumb17_thumb.png" width="453" height="167" /></a></p><p>These documents were then deleted within 60 seconds of each other. Next, within a further 60 seconds, the second document was deleted from the 1st stage recycle bin. Its presence in the 2nd stage bin was then confirmed.</p><p>The site collection had a quota of 100MB.</p><p><a
href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2pvZWxibG9ncy5jby51ay93cC1jb250ZW50L3VwbG9hZHMvMjAxMS8xMC9pbWFnZV90aHVtYjIyLnBuZw=="><img
style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image_thumb22" border="0" alt="image_thumb22" src="http://joelblogs.co.uk/wp-content/uploads/2011/10/image_thumb22_thumb.png" width="393" height="95" /></a></p><p>The web application recycle bin time to live was adjusted down to 1 day, and the system clock was advanced by 24 hours.</p><p><a
href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2pvZWxibG9ncy5jby51ay93cC1jb250ZW50L3VwbG9hZHMvMjAxMS8xMC9pbWFnZV90aHVtYjExLnBuZw=="><img
style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image_thumb11" border="0" alt="image_thumb11" src="http://joelblogs.co.uk/wp-content/uploads/2011/10/image_thumb11_thumb.png" width="399" height="155" /></a></p><p>The “Recycle Bin” timer job in Central Administration was then forced to run.</p><p><a
href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2pvZWxibG9ncy5jby51ay93cC1jb250ZW50L3VwbG9hZHMvMjAxMS8xMC9pbWFnZV90aHVtYjkucG5n"><img
style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image_thumb9" border="0" alt="image_thumb9" src="http://joelblogs.co.uk/wp-content/uploads/2011/10/image_thumb9_thumb.png" width="414" height="38" /></a></p><h3>Observations</h3><p>After the Recycle Bin timer job completed, both the 1st and 2nd stage recycle bins were found to be empty.</p><p><a
href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2pvZWxibG9ncy5jby51ay93cC1jb250ZW50L3VwbG9hZHMvMjAxMS8xMC9pbWFnZV90aHVtYjEyLnBuZw=="><img
style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image_thumb1" border="0" alt="image_thumb1" src="http://joelblogs.co.uk/wp-content/uploads/2011/10/image_thumb1_thumb.png" width="343" height="76" /></a></p><p>Nothing.</p><p><a
href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2pvZWxibG9ncy5jby51ay93cC1jb250ZW50L3VwbG9hZHMvMjAxMS8xMC9pbWFnZV90aHVtYjcucG5n"><img
style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image_thumb7" border="0" alt="image_thumb7" src="http://joelblogs.co.uk/wp-content/uploads/2011/10/image_thumb7_thumb.png" width="333" height="63" /></a></p><p>Not a sausage.</p><h3>Conclusions</h3><ol><li>There is a timer job that empties recycle bins. If this does not run, nothing ever gets deleted.</li><li>The timer job deletes from 1st and 2nd stage bins anything that is older than the retention age <strong><u><em>FROM THE DATE FIRST DELETED</em></u></strong>, up to the maximum size allowed through quotas.</li><li><strong><u><em>The only way a deleted item can get into the 2nd stage bin is if a user deletes it from the 1st stage recycle bin.</em></u></strong></li><li>You really need a file-level backup and restore solution.</li><li>Even really clever people don’t understand how this works.</li></ol> <img
src="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=10890" width="1" height="1" style="display: none;" /><p
class='technorati-tags'>Technorati Tags: <a
class='technorati-link' href='http://technorati.com/tag/Recycle+Bin' rel='tag,nofollow' target='_blank'>Recycle Bin</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+2010' rel='tag,nofollow' target='_blank'>SharePoint 2010</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+Administration' rel='tag,nofollow' target='_blank'>SharePoint Administration</a></p>]]></content:encoded> <wfw:commentRss>http://joelblogs.co.uk/2011/10/25/empirical-studies-of-the-sharepoint-2010-recycle-bin/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>SharePoint 2010 Development Machine Spec</title><link>http://joelblogs.co.uk/2011/10/24/sharepoint-2010-development-machine-spec/</link> <comments>http://joelblogs.co.uk/2011/10/24/sharepoint-2010-development-machine-spec/#comments</comments> <pubDate>Mon, 24 Oct 2011 16:28:12 +0000</pubDate> <dc:creator>Joel Jeffery</dc:creator> <category><![CDATA[SharePoint 2010]]></category> <category><![CDATA[SharePoint Development]]></category><guid
isPermaLink="false">http://joelblogs.co.uk/2011/10/24/sharepoint-2010-development-machine-spec/</guid> <description><![CDATA[<p>If you’re considering buying a new developer laptop or desktop for SharePoint 2010 development, I can thoroughly recommend getting the fastest and most capacious build you can justify.</p><h3>Development Laptop Build</h3><p>Here’s my laptop build, and is currently what I consider to be minimum developer spec for serious SharePoint 2010 development work.</p><blockquote><p>Model: Dell XPS L702</p><p>CPU: Intel i7-2720QM</p><p>RAM: 16GB</p><p>Disk: 500GB SSD (Kingston), 500GB eSata</p></blockquote><h3>Operating Systems</h3><p>I run Windows 7 as a native OS on my laptop. This means I can code whilst on the train, and cut-and-run without creating a boil-in-the-bag laptop. I like this feature.</p><p><a
href="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2pvZWxibG9ncy5jby51ay8yMDExLzEwLzI0L3NoYXJlcG9pbnQtMjAxMC1kZXZlbG9wbWVudC1tYWNoaW5lLXNwZWMv" class=\"more-link\">Read more on SharePoint 2010 Development Machine Spec&#8230;</a></p> <img
src="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&#038;post_id=10872" width="1" height="1" style="display: none;" /><p
class='technorati-tags'>Technorati Tags: <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+2010' rel='tag,nofollow' target='_blank'>SharePoint 2010</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+Development' rel='tag,nofollow' target='_blank'>SharePoint Development</a></p>]]></description> <content:encoded><![CDATA[<p>If you’re considering buying a new developer laptop or desktop for SharePoint 2010 development, I can thoroughly recommend getting the fastest and most capacious build you can justify.</p><h3>Development Laptop Build</h3><p>Here’s my laptop build, and is currently what I consider to be minimum developer spec for serious SharePoint 2010 development work.</p><blockquote><p>Model: Dell XPS L702</p><p>CPU: Intel i7-2720QM</p><p>RAM: 16GB</p><p>Disk: 500GB SSD (Kingston), 500GB eSata</p></blockquote><h3>Operating Systems</h3><p>I run Windows 7 as a native OS on my laptop. This means I can code whilst on the train, and cut-and-run without creating a boil-in-the-bag laptop. I like this feature.</p><p>This is great for ad hoc development, but for more formal scenarios, I have a Windows 2008R2 SP1 native boot virtual hard disk (.vhd) added to my boot menu. When I boot into it, I have the Hyper-V role enabled which means I can run my choice of server platforms to more accurately mimic the customer’s environment. The .vhd files loaded by Hyper-V are kept natively on the SSD drive.</p><p>For some projects that require a unique, but standalone server build, I have Oracle VirtualBox installed under Windows 7. This means I can have a functioning Windows 7 machine for email and casual use wrapped around a dedicated single Windows Server VM that has the customer environment and developer tools installed.</p><p>For the most power-hungry builds, I use another virtual native boot .vhd, with Windows Server 2008R2 SP1 and the development tools natively installed.</p> <img
src="http://joelblogs.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=10872" width="1" height="1" style="display: none;" /><p
class='technorati-tags'>Technorati Tags: <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+2010' rel='tag,nofollow' target='_blank'>SharePoint 2010</a>, <a
class='technorati-link' href='http://technorati.com/tag/SharePoint+Development' rel='tag,nofollow' target='_blank'>SharePoint Development</a></p>]]></content:encoded> <wfw:commentRss>http://joelblogs.co.uk/2011/10/24/sharepoint-2010-development-machine-spec/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Served from: joelblogs.co.uk @ 2012-02-04 19:07:34 by W3 Total Cache -->
