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

<channel>
	<title>Peter&#039;s Blog</title>
	<atom:link href="http://peterheibrink.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://peterheibrink.wordpress.com</link>
	<description>What I want to remember about SharePoint</description>
	<lastBuildDate>Fri, 13 Jan 2012 08:55:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='peterheibrink.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Peter&#039;s Blog</title>
		<link>http://peterheibrink.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://peterheibrink.wordpress.com/osd.xml" title="Peter&#039;s Blog" />
	<atom:link rel='hub' href='http://peterheibrink.wordpress.com/?pushpress=hub'/>
		<item>
		<title>PowerShell – Delete field and all references</title>
		<link>http://peterheibrink.wordpress.com/2011/12/09/powershell-delete-field-and-all-references/</link>
		<comments>http://peterheibrink.wordpress.com/2011/12/09/powershell-delete-field-and-all-references/#comments</comments>
		<pubDate>Fri, 09 Dec 2011 13:25:12 +0000</pubDate>
		<dc:creator>Peter Heibrink</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://peterheibrink.wordpress.com/?p=72</guid>
		<description><![CDATA[Sometimes you want to delete a site column from SharePoint and you get the nice message stating &#8220;Site columns which are included in content types cannot be deleted. Remove all references to this site column prior to deleting it.&#8221;. Really helpful that it states in which ContentTypes the field is used. It gets even worse [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=peterheibrink.wordpress.com&amp;blog=8772017&amp;post=72&amp;subd=peterheibrink&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Sometimes you want to delete a site column from SharePoint and you get the nice message stating &#8220;Site columns which are included in content types cannot be deleted. Remove all references to this site column prior to deleting it.&#8221;. Really helpful that it states in which ContentTypes the field is used. It gets even worse when the column is also used in lists… You can do this via PowerShell easily:</p>
<p><span style="color:green;font-family:Courier New;font-size:9pt;"># Add SharePoint PowerShell Snapin<br />
</span></p>
<p><span style="color:blue;font-family:Courier New;font-size:9pt;">if<span style="color:black;"> ( (<span style="color:cadetblue;"><strong>Get-PSSnapin </strong><span style="color:black;"><span style="color:cadetblue;"><em>-Name </em><span style="color:black;"><span style="color:maroon;">Microsoft.SharePoint.PowerShell <span style="color:black;"><span style="color:cadetblue;"><em>-ErrorAction </em><span style="color:black;"><span style="color:maroon;">SilentlyContinue<span style="color:black;">) <span style="color:red;">-eq <span style="color:black;"><span style="color:purple;">$null<span style="color:black;"> ) {<br />
</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><span style="color:black;font-family:Courier New;font-size:9pt;">    <span style="color:cadetblue;"><strong>Add-PSSnapin </strong><span style="color:black;"><span style="color:maroon;">Microsoft.SharePoint.Powershell<br />
</span></span></span></span><span style="color:black;font-family:Courier New;font-size:9pt;">}<br />
</span></p>
<p><span style="color:green;font-family:Courier New;font-size:9pt;">#&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
</span><span style="color:green;font-family:Courier New;font-size:9pt;"># Delete Field<br />
</span><span style="color:green;font-family:Courier New;font-size:9pt;">#&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
</span><span style="color:blue;font-family:Courier New;font-size:9pt;">function <span style="color:black;"><span style="color:cadetblue;">DeleteField<span style="color:black;">([<span style="color:teal;">string<span style="color:black;">]<span style="color:purple;">$siteUrl<span style="color:black;">, [<span style="color:teal;">string<span style="color:black;">]<span style="color:purple;">$fieldName<span style="color:black;">) {<br />
</span></span></span></span></span></span></span></span></span></span></span></span><span style="color:black;font-family:Courier New;font-size:9pt;">    <span style="color:cadetblue;"><strong>Write-Host </strong><span style="color:black;"><span style="color:maroon;">&#8220;Start removing field:&#8221; <span style="color:black;"><span style="color:purple;">$fieldName <span style="color:black;"><span style="color:cadetblue;"><em>-ForegroundColor </em><span style="color:black;"><span style="color:maroon;">DarkGreen<br />
</span></span></span></span></span></span></span></span></span></span><span style="color:black;font-family:Courier New;font-size:9pt;">    <span style="color:purple;">$site <span style="color:black;"><span style="color:red;">= <span style="color:black;"><span style="color:cadetblue;"><strong>Get-SPSite </strong><span style="color:black;"><span style="color:purple;">$siteUrl<br />
</span></span></span></span></span></span></span></span><span style="color:black;font-family:Courier New;font-size:9pt;">    <span style="color:purple;">$web <span style="color:black;"><span style="color:red;">= <span style="color:black;"><span style="color:purple;">$site<span style="color:black;">.<span style="color:saddlebrown;">RootWeb</span></span></span></span></span></span></span></span></p>
<p><span style="color:black;font-family:Courier New;font-size:9pt;">    <span style="color:green;">#Delete field from all content types<br />
</span></span><span style="color:black;font-family:Courier New;font-size:9pt;">    <span style="color:blue;">foreach<span style="color:black;">(<span style="color:purple;">$ct <span style="color:black;"><span style="color:blue;">in <span style="color:black;"><span style="color:purple;">$web<span style="color:black;">.<span style="color:saddlebrown;">ContentTypes<span style="color:black;">) {<br />
</span></span></span></span></span></span></span></span></span></span></span><span style="color:black;font-family:Courier New;font-size:9pt;">        <span style="color:purple;">$fieldInUse <span style="color:black;"><span style="color:red;">= <span style="color:black;"><span style="color:purple;">$ct<span style="color:black;">.<span style="color:saddlebrown;">FieldLinks<span style="color:black;"> | <span style="color:cadetblue;"><strong>Where</strong><span style="color:black;"> {<span style="color:purple;">$_<span style="color:black;">.Name <span style="color:red;">-eq <span style="color:black;"><span style="color:purple;">$fieldName<span style="color:black;"> }<br />
</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><span style="color:black;font-family:Courier New;font-size:9pt;">        <span style="color:blue;">if<span style="color:black;">(<span style="color:purple;">$fieldInUse<span style="color:black;">) {<br />
</span></span></span></span></span><span style="color:black;font-family:Courier New;font-size:9pt;">            <span style="color:cadetblue;"><strong>Write-Host </strong><span style="color:black;"><span style="color:maroon;">&#8220;Remove field from CType:&#8221; <span style="color:black;"><span style="color:purple;">$ct<span style="color:black;">.<span style="color:saddlebrown;">Name <span style="color:black;"><span style="color:cadetblue;"><em>-ForegroundColor </em><span style="color:black;"><span style="color:maroon;">DarkGreen<br />
</span></span></span></span></span></span></span></span></span></span></span></span><span style="color:black;font-family:Courier New;font-size:9pt;">            <span style="color:purple;">$ct<span style="color:black;">.<span style="color:saddlebrown;">FieldLinks<span style="color:black;">.<span style="color:saddlebrown;">Delete<span style="color:black;">(<span style="color:purple;">$fieldName<span style="color:black;">)<br />
</span></span></span></span></span></span></span></span></span><span style="color:black;font-family:Courier New;font-size:9pt;">            <span style="color:purple;">$ct<span style="color:black;">.<span style="color:saddlebrown;">Update<span style="color:black;">()<br />
</span></span></span></span></span><span style="color:black;font-family:Courier New;font-size:9pt;">        }<br />
</span><span style="color:black;font-family:Courier New;font-size:9pt;">    }</span></p>
<p><span style="color:black;font-family:Courier New;font-size:9pt;">    <span style="color:green;">#Delete column from all lists in all sites of a site collection<br />
</span></span><span style="color:black;font-family:Courier New;font-size:9pt;">    <span style="color:purple;">$site<span style="color:black;"> | <span style="color:cadetblue;"><strong>Get-SPWeb </strong><span style="color:black;"><span style="color:cadetblue;"><em>-Limit </em><span style="color:black;"><span style="color:maroon;">all<span style="color:black;"> | <span style="color:cadetblue;"><strong>ForEach-Object</strong><span style="color:black;"> {<br />
  </span></span></span></span></span></span></span></span></span></span></span><span style="color:black;font-family:Courier New;font-size:9pt;">     <span style="color:green;">#Specify list which contains the column<br />
</span></span><span style="color:black;font-family:Courier New;font-size:9pt;">        <span style="color:purple;">$numberOfLists <span style="color:black;"><span style="color:red;">= <span style="color:black;"><span style="color:purple;">$_<span style="color:black;">.Lists.Count<br />
</span></span></span></span></span></span></span><span style="color:black;font-family:Courier New;font-size:9pt;">        <span style="color:blue;">for<span style="color:black;">(<span style="color:purple;">$i<span style="color:red;">=<span style="color:black;">0; <span style="color:purple;">$i <span style="color:black;"><span style="color:red;">-lt <span style="color:black;"><span style="color:purple;">$_<span style="color:black;">.Lists.Count ; <span style="color:purple;">$i<span style="color:black;">++) {<br />
</span></span></span></span></span></span></span></span></span></span></span></span></span></span><span style="color:black;font-family:Courier New;font-size:9pt;">            <span style="color:purple;">$list <span style="color:black;"><span style="color:red;">= <span style="color:black;"><span style="color:purple;">$_<span style="color:black;">.Lists[<span style="color:purple;">$i<span style="color:black;">]<br />
</span></span></span></span></span></span></span></span></span><span style="color:black;font-family:Courier New;font-size:9pt;">            <span style="color:green;">#Specify column to be deleted<br />
</span></span><span style="color:black;font-family:Courier New;font-size:9pt;">            <span style="color:blue;">if<span style="color:black;">(<span style="color:purple;">$list<span style="color:black;">.<span style="color:saddlebrown;">Fields<span style="color:black;">.<span style="color:saddlebrown;">ContainsFieldWithStaticName<span style="color:black;">(<span style="color:purple;">$fieldName<span style="color:black;">)) {<br />
</span></span></span></span></span></span></span></span></span></span></span><span style="color:black;font-family:Courier New;font-size:9pt;">                <span style="color:purple;">$fieldInList <span style="color:black;"><span style="color:red;">= <span style="color:black;"><span style="color:purple;">$list<span style="color:black;">.<span style="color:saddlebrown;">Fields<span style="color:black;">.<span style="color:saddlebrown;">GetFieldByInternalName<span style="color:black;">(<span style="color:purple;">$fieldName<span style="color:black;">)<br />
</span></span></span></span></span></span></span></span></span></span></span></span></span><span style="color:black;font-family:Courier New;font-size:9pt;"><br />
                <span style="color:blue;">if<span style="color:black;">(<span style="color:purple;">$fieldInList<span style="color:black;">) {<br />
</span></span></span></span></span><span style="color:black;font-family:Courier New;font-size:9pt;">                    <span style="color:cadetblue;"><strong>Write-Host </strong><span style="color:black;"><span style="color:maroon;">&#8220;Delete column from &#8221; <span style="color:black;"><span style="color:purple;">$list<span style="color:black;">.<span style="color:saddlebrown;">Title <span style="color:black;"><span style="color:maroon;">&#8221; list on:&#8221; <span style="color:black;"><span style="color:purple;">$_<span style="color:black;">.URL <span style="color:cadetblue;"><em>-ForegroundColor </em><span style="color:black;"><span style="color:maroon;">DarkGreen</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></p>
<p><span style="color:black;font-family:Courier New;font-size:9pt;">                 <span style="color:green;">#Allow column to be deleted<br />
</span></span><span style="color:black;font-family:Courier New;font-size:9pt;">                 <span style="color:purple;">$fieldInList<span style="color:black;">.<span style="color:saddlebrown;">AllowDeletion <span style="color:black;"><span style="color:red;">= <span style="color:black;"><span style="color:purple;">$true<br />
</span></span></span></span></span></span></span></span><span style="color:black;font-family:Courier New;font-size:9pt;">                 <span style="color:green;">#Delete the column<br />
</span></span><span style="color:black;font-family:Courier New;font-size:9pt;">                 <span style="color:purple;">$fieldInList<span style="color:black;">.<span style="color:saddlebrown;">Delete<span style="color:black;">()<br />
</span></span></span></span></span><span style="color:black;font-family:Courier New;font-size:9pt;">                 <span style="color:green;">#Update the list<br />
</span></span><span style="color:black;font-family:Courier New;font-size:9pt;">                 <span style="color:purple;">$list<span style="color:black;">.<span style="color:saddlebrown;">Update<span style="color:black;">()<br />
</span></span></span></span></span><span style="color:black;font-family:Courier New;font-size:9pt;">                }<br />
</span><span style="color:black;font-family:Courier New;font-size:9pt;">            }<br />
</span><span style="color:black;font-family:Courier New;font-size:9pt;">        }<br />
</span><span style="color:black;font-family:Courier New;font-size:9pt;">    }</span></p>
<p><span style="color:black;font-family:Courier New;font-size:9pt;">    <span style="color:green;"># Remove the field itself<br />
</span></span><span style="color:black;font-family:Courier New;font-size:9pt;">    <span style="color:blue;">if<span style="color:black;">(<span style="color:purple;">$web<span style="color:black;">.<span style="color:saddlebrown;">Fields<span style="color:black;">.<span style="color:saddlebrown;">ContainsFieldWithStaticName<span style="color:black;">(<span style="color:purple;">$fieldName<span style="color:black;">)) {<br />
</span></span></span></span></span></span></span></span></span></span></span><span style="color:black;font-family:Courier New;font-size:9pt;">        <span style="color:cadetblue;"><strong>Write-Host </strong><span style="color:black;"><span style="color:maroon;">&#8220;Remove field:&#8221; <span style="color:black;"><span style="color:purple;">$fieldName <span style="color:black;"><span style="color:cadetblue;"><em>-ForegroundColor </em><span style="color:black;"><span style="color:maroon;">DarkGreen<br />
</span></span></span></span></span></span></span></span></span></span><span style="color:black;font-family:Courier New;font-size:9pt;">        <span style="color:purple;">$web<span style="color:black;">.<span style="color:saddlebrown;">Fields<span style="color:black;">.<span style="color:saddlebrown;">Delete<span style="color:black;">(<span style="color:purple;">$fieldName<span style="color:black;">)<br />
</span></span></span></span></span></span></span></span></span><span style="color:black;font-family:Courier New;font-size:9pt;">    }</span></p>
<p><span style="color:black;font-family:Courier New;font-size:9pt;">    <span style="color:purple;">$web<span style="color:black;">.<span style="color:saddlebrown;">Dispose<span style="color:black;">()<br />
</span></span></span></span></span><span style="color:black;font-family:Courier New;font-size:9pt;">    <span style="color:purple;">$site<span style="color:black;">.<span style="color:saddlebrown;">Dispose<span style="color:black;">()<br />
</span></span></span></span></span><span style="color:black;font-family:Courier New;font-size:9pt;">}</span></p>
<p><span style="color:green;font-family:Courier New;font-size:9pt;">#Delete the field below<br />
</span><span style="color:cadetblue;font-family:Courier New;font-size:9pt;">DeleteField <span style="color:black;"><span style="color:maroon;"><span style="color:black;"><span style="color:maroon;"><a href="http://sharepoint">http://sharepoint</a> &#8220;MyField&#8221;</span></span></span></span></span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/peterheibrink.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/peterheibrink.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/peterheibrink.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/peterheibrink.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/peterheibrink.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/peterheibrink.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/peterheibrink.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/peterheibrink.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/peterheibrink.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/peterheibrink.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/peterheibrink.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/peterheibrink.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/peterheibrink.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/peterheibrink.wordpress.com/72/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=peterheibrink.wordpress.com&amp;blog=8772017&amp;post=72&amp;subd=peterheibrink&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://peterheibrink.wordpress.com/2011/12/09/powershell-delete-field-and-all-references/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b1d0c6e69dd77d4ceca4ea356b896a5f?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">peterheibrink</media:title>
		</media:content>
	</item>
		<item>
		<title>SharePoint Connection Netherlands 2011</title>
		<link>http://peterheibrink.wordpress.com/2011/12/08/sharepoint-connection-netherlands-2011/</link>
		<comments>http://peterheibrink.wordpress.com/2011/12/08/sharepoint-connection-netherlands-2011/#comments</comments>
		<pubDate>Thu, 08 Dec 2011 17:47:35 +0000</pubDate>
		<dc:creator>Peter Heibrink</dc:creator>
				<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://peterheibrink.wordpress.com/?p=70</guid>
		<description><![CDATA[On 22 and 23 November 2011 the SharePoint Connections 2011 was held in Amsterdam. I gave a session on Visio Services and Visio Services Development. The presentation and the files used you can download here.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=peterheibrink.wordpress.com&amp;blog=8772017&amp;post=70&amp;subd=peterheibrink&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>On 22 and 23 November 2011 the SharePoint Connections 2011 was held in Amsterdam. I gave a session on Visio Services and Visio Services Development. The presentation and the files used you can download <a href="http://www.heibrink.net/BlogPost/2011208_SPCNL2011/SPCNL2011.zip">here</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/peterheibrink.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/peterheibrink.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/peterheibrink.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/peterheibrink.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/peterheibrink.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/peterheibrink.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/peterheibrink.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/peterheibrink.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/peterheibrink.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/peterheibrink.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/peterheibrink.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/peterheibrink.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/peterheibrink.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/peterheibrink.wordpress.com/70/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=peterheibrink.wordpress.com&amp;blog=8772017&amp;post=70&amp;subd=peterheibrink&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://peterheibrink.wordpress.com/2011/12/08/sharepoint-connection-netherlands-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b1d0c6e69dd77d4ceca4ea356b896a5f?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">peterheibrink</media:title>
		</media:content>
	</item>
		<item>
		<title>SharePoint cache settings when restyling</title>
		<link>http://peterheibrink.wordpress.com/2010/03/22/60/</link>
		<comments>http://peterheibrink.wordpress.com/2010/03/22/60/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 17:59:17 +0000</pubDate>
		<dc:creator>Peter Heibrink</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Styling]]></category>

		<guid isPermaLink="false">http://peterheibrink.wordpress.com/2010/03/22/60/</guid>
		<description><![CDATA[When restyling web applications, you have to think of the cache settings which are set to the different resource files, since you want people to see the new styles without having to clear their local cache. These files for example can be: Style Sheets Images Java Scripts If we for example open a normal team [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=peterheibrink.wordpress.com&amp;blog=8772017&amp;post=60&amp;subd=peterheibrink&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When restyling web applications, you have to think of the cache settings which are set to the different resource files, since you want people to see the new styles without having to clear their local cache. These files for example can be:</p>
<ul>
<li>Style Sheets</li>
<li>Images</li>
<li>Java Scripts</li>
</ul>
<p>If we for example open a normal team site and open up <a href="http://www.fiddlertool.com/" target="_blank">Fiddler</a>, we will see how long the files are cached (you might want to first clear your cache or use a hard refresh to force all files to download).</p>
<p><span style="color:#4f81bd;font-size:9pt;"><strong><img src="http://peterheibrink.files.wordpress.com/2010/03/032210_1759_1.png" alt="" /><br />
Figure 1: Default Team Site<br />
</strong></span></p>
<p><img src="http://peterheibrink.files.wordpress.com/2010/03/032210_1759_2.png" alt="" /><br />
<span style="color:#4f81bd;font-size:9pt;"><strong>Figure 2: Fiddler trace of the loading of the default Team Site</strong></span></p>
<p>When you look at the Fiddler trace, you can see the following cache settings:</p>
<ul>
<li>The aspx file is not cached.</li>
<li>The Java Scripts are cached for a year.</li>
<li>The style sheets are cached for a year.</li>
<li>The images are cached for a year.</li>
</ul>
<p>The reason for this is that the newly created web site, the content expiration is not enabled for the web site itself, but it is enabled for the four virtual directories:</p>
<ol>
<li>_controltemplates</li>
<li>_layouts</li>
<li>_vti_bin</li>
<li>_wpresources</li>
</ol>
<p>For the virtual directories the default setting is to enable content expiration for 365 days.</p>
<p><img src="http://peterheibrink.files.wordpress.com/2010/03/032210_1759_3.png" alt="" /><span style="color:#4f81bd;font-size:9pt;"><strong><br />
Figure 3: By default the settings for the Web Site is to not use content expiration<br />
</strong></span></p>
<p><img src="http://peterheibrink.files.wordpress.com/2010/03/032210_1759_4.png" alt="" /><span style="color:#4f81bd;font-size:9pt;"><strong><br />
Figure 4: The default setting for the _layouts folder is to use content expiration for 365 days<br />
</strong></span></p>
<p>These default cache settings can be updated, but otherwise this means: <strong>You can NOT simply update your resources in the _layouts folder and expect your users to see the update immediately!</strong></p>
<h2>Possible solutions</h2>
<p>To overcome the caching problems, there are multiple solutions. For example:</p>
<ol>
<li>Use new filenames</li>
<li>Use new directory</li>
<li>Use a <a href="http://en.wikipedia.org/wiki/Query_string" target="_blank">query string</a></li>
</ol>
<h3>Use new filenames</h3>
<p>The first possible solution is to simply rename all the files you are changing during the restyling of SharePoint. This will allow you to bypass the client side cache. You will however need to:</p>
<ol>
<li>Rename all the files you store in the _layouts folder which have changed.</li>
<li>Find and update all the filenames you refer to inside your Java Scripts, if they are stored in the _layouts folder.</li>
<li>Find and update all the filenames (f.e. images) you refer to inside your Style Sheets, if they are stored in the _layouts folder.</li>
<li>Find and update all the filenames you refer to inside your code, if they are stored in the _layouts folder.</li>
<li>Find and update all the filenames you refer to inside your master pages, if they are stored in the _layouts folder.</li>
<li>Find and update all the filenames you refer to inside your pages, if they are stored in the _layouts folder.</li>
<li>Find and update all the filenames you refer to inside your control templates, if they are stored in the _layouts folder.</li>
<li>Etc.</li>
</ol>
<p>The downside here is you have to search for every file individually, which can be time consuming and error prone.</p>
<h3>Use new directories</h3>
<p>When storing your own files in the _layouts folder, a best practice is to use your own subfolders. An option would be to rename all your subfolders in the _layouts folder. That would bypass the client side cache. For this you will need to:</p>
<ol>
<li>Rename all the directories you store in the _layouts folder</li>
<li>Find and update all the filenames you refer to inside your Java Scripts, if they are stored in the _layouts folder</li>
<li>Find and update all the filenames (f.e. images) you refer to inside your Style Sheets, if they are stored in the _layouts folder</li>
<li>Find and update all the filenames you refer to inside your code, if they are stored in the _layouts folder.</li>
<li>Find and update all the filenames you refer to inside your master pages, if they are stored in the _layouts folder.</li>
<li>Find and update all the filenames you refer to inside your pages, if they are stored in the _layouts folder.</li>
<li>Find and update all the filenames you refer to inside your control templates, if they are stored in the _layouts folder.</li>
<li>Etc.</li>
</ol>
<p>This method is easier than the one above (using new file names), since you can do a find/replace on your solutions and just replace the directory name. You will however need to update the directory naming and probably the relevant documentation.</p>
<h3>Use a query string</h3>
<p>Another option is to use a query string after the resource files you are using. This is actually how SharePoint internally solves the issue as well:</p>
<p><img src="http://peterheibrink.files.wordpress.com/2010/03/032210_1759_5.png" alt="" /> <br />
<span style="color:#4f81bd;font-size:9pt;"><strong>Figure 5: Page source of default Team Site<br />
</strong></span></p>
<p>Within SharePoint you can let the query string &#8220;?rev=xxxxxxxxxxxxxx&#8221; be generated automatically by using the <a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.utilities.sputility.makebrowsercachesafelayoutsurl.aspx" target="_blank">SPUtility.MakeBrowserCacheSafeLayoutsUrl</a>. This function will place &#8220;_layouts/&#8221; before and &#8220;?rev=[some string here]&#8221; after a given string. This however is a server side action which would in turn be triggered for every resource you use. This is a load on the system which can be avoided. Another downside of this function is that it will only work for files stored in the layouts folder on <strong>the file </strong>system. This means it will not work for the <strong>images</strong> folder. Besides that, this might work in your code files, master pages and aspx pages, but you&#8217;ll have to jump through a couple of hoops to get this working in style sheets and java scripts!</p>
<p>What we in turn did was placing a string like &#8220;?rev=201003221230&#8243; after all loaded resources. The number is actually a timestamp from when we started on the change. This means you&#8217;ll have to:  </p>
<ol>
<li>Find and update all the filenames you refer to inside your Java Scripts, if they are stored in the _layouts folder</li>
<li>Find and update all the filenames (f.e. images) you refer to inside your Style Sheets, if they are stored in the _layouts folder</li>
<li>Find and update all the filenames you refer to inside your code, if they are stored in the _layouts folder.</li>
<li>Find and update all the filenames you refer to inside your master pages, if they are stored in the _layouts folder.</li>
<li>Find and update all the filenames you refer to inside your pages, if they are stored in the _layouts folder.</li>
<li>Find and update all the filenames you refer to inside your control templates, if they are stored in the _layouts folder.</li>
<li>Etc.</li>
</ol>
<p>But the benefits are:</p>
<ol>
<li>With a next rebranding you can easily do a replace all on the string &#8220;?rev=201003221230&#8243; on your solution.</li>
<li>You don&#8217;t have to keep track of which files you actually modified.</li>
<li>No additional actions on the server are needed.</li>
<li>It works for every file type.</li>
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/peterheibrink.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/peterheibrink.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/peterheibrink.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/peterheibrink.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/peterheibrink.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/peterheibrink.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/peterheibrink.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/peterheibrink.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/peterheibrink.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/peterheibrink.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/peterheibrink.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/peterheibrink.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/peterheibrink.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/peterheibrink.wordpress.com/60/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=peterheibrink.wordpress.com&amp;blog=8772017&amp;post=60&amp;subd=peterheibrink&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://peterheibrink.wordpress.com/2010/03/22/60/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b1d0c6e69dd77d4ceca4ea356b896a5f?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">peterheibrink</media:title>
		</media:content>

		<media:content url="http://peterheibrink.files.wordpress.com/2010/03/032210_1759_1.png" medium="image" />

		<media:content url="http://peterheibrink.files.wordpress.com/2010/03/032210_1759_2.png" medium="image" />

		<media:content url="http://peterheibrink.files.wordpress.com/2010/03/032210_1759_3.png" medium="image" />

		<media:content url="http://peterheibrink.files.wordpress.com/2010/03/032210_1759_4.png" medium="image" />

		<media:content url="http://peterheibrink.files.wordpress.com/2010/03/032210_1759_5.png" medium="image" />
	</item>
		<item>
		<title>Self Service Site Creation through code</title>
		<link>http://peterheibrink.wordpress.com/2009/09/09/self-service-site-creation-through-code/</link>
		<comments>http://peterheibrink.wordpress.com/2009/09/09/self-service-site-creation-through-code/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 20:13:18 +0000</pubDate>
		<dc:creator>Peter Heibrink</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://peterheibrink.wordpress.com/2009/09/09/self-service-site-creation-trough-code/</guid>
		<description><![CDATA[Note: This post only looks at SPSite.SelfServiceCreateSite from the object model. The challenge In most cases site collections are created by administrators with farm admin permissions, but in some cases you want to provide your users the ability to create site collections. Still a lot of developers use methods like the SPSite.Add() to create the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=peterheibrink.wordpress.com&amp;blog=8772017&amp;post=35&amp;subd=peterheibrink&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Note</strong>: This post only looks at <a href="http://msdn.microsoft.com/en-us/library/ms458475.aspx" target="_blank">SPSite.SelfServiceCreateSite</a> from the object model.</p>
<h2>The challenge</h2>
<p>In most cases site collections are created by administrators with farm admin permissions, but in some cases you want to provide your users the ability to create site collections. Still a lot of developers use methods like the <a href="http://msdn.microsoft.com/en-us/library/ms437468.aspx" target="_blank">SPSite.Add()</a><span style="color:black;"> to create the site collections, which are actually meant for administrator task only and require you to have <strong>farm level permissions</strong>. Well, being a developer that is easily solved. Just add the web application pool account to the farm administrators and you can get the necessary permissions by simply using a <a></a><a href="http://msdn.microsoft.com/en-us/library/ms458475.aspx" target="_blank">SPSite.SelfServiceCreateSite</a> method. Using this method you can allow regular users to create site collections, without giving them farm level permissions. To make this work there are two settings you must take into account: </span>SPSecurity.RunWithElevatedPrivileges<span style="color:black;">. Well, that&#8217;s something we <strong>DON&#8217;T</strong> want. Normal users should never get farm level permissions, simply because they always find a way to create havoc.<br />
</span></p>
<h2>The solution</h2>
<p>The solution is actually really simple. Microsoft provides us with the</p>
<ol>
<li><strong>Enable Self-Service Site Management<br />
</strong>This allows the users to actually create site collections using the <a href="http://msdn.microsoft.com/en-us/library/ms458475.aspx" target="_blank">SPSite.SelfServiceCreateSite</a><br />
<img src="http://peterheibrink.files.wordpress.com/2009/09/090909_2012_selfservice1.png" alt="" /></li>
</ol>
<p><span style="color:gray;font-family:Arial;font-size:9pt;"><strong>               Figure 1: Enable Self-Service Site Management<br />
</strong></span></p>
<ol>
<li>
<div><strong>Have multiple managed paths</strong><br />
Make sure you have another managed path as the <strong>(root)</strong> managed path. Sites should be created by default for most of the Web Applications, but you&#8217;ll need a managed path to be able to create new site collections.</div>
<p><img src="http://peterheibrink.files.wordpress.com/2009/09/090909_2012_selfservice2.png" alt="" /></li>
</ol>
<p><span style="color:gray;font-family:Arial;font-size:9pt;"><strong><span style="color:gray;font-family:Arial;font-size:9pt;"><strong>               </strong></span>Figure 2: Create multiple managed paths<br />
</strong></span></p>
<h2>The implementation</h2>
<p>For this example I created a WebPart which allows an user to create a new site collection. Within the code of the solution you&#8217;ll also find some other nice pieces of code, for example:</p>
<ul>
<li>How to check if &#8220;Self-Service Site Management&#8221; is enabled</li>
<li>How to check if multiple managed paths are created</li>
<li>How to load the drop down list with the available managed paths (<a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spprefixcollection.aspx" target="_blank">SPWebApplication.Prefixes</a>)</li>
<li>How to load the drop down list with the available web templates (<a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spsite.getwebtemplates.aspx" target="_blank">SPSite.GetWebTemplates(uint)</a>)</li>
<li>How to make use of <a href="http://peterheibrink.wordpress.com/2009/09/07/splongoperation/" target="_self">SPLongOperation</a> to show a nice progress window.</li>
</ul>
<p><img class="alignnone size-full wp-image-48" title="090909_2012_selfservice3" src="http://peterheibrink.files.wordpress.com/2009/09/090909_2012_selfservice31.png" alt="090909_2012_selfservice3" width="609" height="253" /></p>
<p><span style="color:gray;font-family:Arial;font-size:9pt;"><strong>Figure 3: Example WebPart for the use of SelfServiceCreateSite<br />
</strong></span></p>
<p>Once the information of the new site collection is entered and the user presses the <strong>Submit</strong> button, the site collection will be created. This might take a couple of seconds and during this time you don&#8217;t want to let the user click again on the submit button. The second time there might already be a site on the URL which is provided (since the user clicked on the button before), and they will get an exception. To prevent this problem, a progress screen is shown.</p>
<p><img class="alignnone size-full wp-image-49" title="090909_2012_selfservice4" src="http://peterheibrink.files.wordpress.com/2009/09/090909_2012_selfservice41.png" alt="090909_2012_selfservice4" width="609" height="228" /></p>
<p><span style="color:gray;font-family:Arial;font-size:9pt;"><strong>Figure 4: Creation of Site Collection is in progress<br />
</strong></span></p>
<p>Once the site collection is created, the user will be redirected to the newly created site.</p>
<p><img class="alignnone size-full wp-image-50" title="090909_2012_selfservice5" src="http://peterheibrink.files.wordpress.com/2009/09/090909_2012_selfservice51.png" alt="090909_2012_selfservice5" width="609" height="218" /></p>
<p><span style="color:gray;font-family:Arial;font-size:9pt;"><strong>Figure 5: Newly generated Site Collection</strong></span></p>
<h2>The code</h2>
<p>The following function shows the use of the <a href="http://msdn.microsoft.com/en-us/library/ms458475.aspx" target="_blank">SPSite.SelfServiceCreateSite</a>. Basically it&#8217;s just calling the function with the correct variables, but there are a couple of pitfalls you should take into account</p>
<p><span style="color:gray;font-family:Courier New;font-size:9pt;">/// &lt;summary&gt;<br />
</span><span style="font-family:Courier New;font-size:9pt;"><span style="color:gray;">///</span><span style="color:green;"> This function will create a site collection using </span><span style="color:gray;">&lt;see cref=&#8221;SPSite.SelfServiceCreateSite&#8221;/&gt;<br />
</span></span><span style="color:gray;font-family:Courier New;font-size:9pt;">/// &lt;/summary&gt;<br />
</span><span style="color:gray;font-family:Courier New;font-size:9pt;">/// &lt;param name=&#8221;relativeSiteUrl&#8221;&gt;<br />
</span><span style="font-family:Courier New;font-size:9pt;"><span style="color:gray;">///</span><span style="color:green;"> The relative url of a site. This should include a managed path since the root site<br />
</span></span><span style="font-family:Courier New;font-size:9pt;"><span style="color:gray;">/// </span><span style="color:green;">collection already exist. Example &#8220;sites/testsite&#8221;<br />
</span></span><span style="color:gray;font-family:Courier New;font-size:9pt;">/// &lt;/param&gt;<br />
</span><span style="font-family:Courier New;font-size:9pt;"><span style="color:gray;">/// &lt;param name=&#8221;title&#8221;&gt;</span><span style="color:green;">The title of the new site</span><span style="color:gray;">&lt;/param&gt;<br />
</span></span><span style="font-family:Courier New;font-size:9pt;"><span style="color:gray;">/// &lt;param name=&#8221;description&#8221;&gt;</span><span style="color:green;">The description of the new site</span><span style="color:gray;">&lt;/param&gt;<br />
</span></span><span style="font-family:Courier New;font-size:9pt;"><span style="color:gray;">/// &lt;param name=&#8221;webTemplate&#8221;&gt;</span><span style="color:green;">The web template name</span><span style="color:gray;">&lt;/param&gt;<br />
</span></span><span style="color:gray;font-family:Courier New;font-size:9pt;">/// &lt;param name=&#8221;secondarySiteCollectionAdministratorLogin&#8221;&gt;<br />
</span><span style="font-family:Courier New;font-size:9pt;"><span style="color:gray;">///</span><span style="color:green;"> The user login account of the secondary site collection administrator<br />
</span></span><span style="color:gray;font-family:Courier New;font-size:9pt;">/// &lt;/param&gt;<br />
</span><span style="color:gray;font-family:Courier New;font-size:9pt;">/// &lt;param name=&#8221;secondarySiteCollectionAdministratorName&#8221;&gt;<br />
</span><span style="font-family:Courier New;font-size:9pt;"><span style="color:gray;">///</span><span style="color:green;"> The name of the secondary site collection administrator<br />
</span></span><span style="color:gray;font-family:Courier New;font-size:9pt;">/// &lt;/param&gt;<br />
</span><span style="color:gray;font-family:Courier New;font-size:9pt;">/// &lt;param name=&#8221;secondarySiteCollectionAdministratorEmail&#8221;&gt;<br />
</span><span style="font-family:Courier New;font-size:9pt;"><span style="color:gray;">///</span><span style="color:green;"> The email address of the secondary site collection administrator<br />
</span></span><span style="color:gray;font-family:Courier New;font-size:9pt;">/// &lt;/param&gt;<br />
</span><span style="color:gray;font-family:Courier New;font-size:9pt;">/// &lt;returns&gt;<br />
</span><span style="font-family:Courier New;font-size:9pt;"><span style="color:gray;">/// </span><span style="color:green;">The newly create </span><span style="color:gray;">&lt;see cref=&#8221;SPSite&#8221;/&gt;</span><span style="color:green;"> or null when an error has occured.<br />
</span></span><span style="color:gray;font-family:Courier New;font-size:9pt;">/// &lt;/returns&gt;<br />
</span><span style="font-family:Courier New;font-size:9pt;"><span style="color:blue;">private </span><span style="color:#2b91af;">SPSite</span> CreateNewSiteCollection(<span style="color:blue;">string</span> relativeSiteUrl,<br />
</span><span style="font-family:Courier New;font-size:9pt;"><span style="color:blue;">        string</span> title,</span><span style="font-family:Courier New;font-size:9pt;"><br />
<span style="color:blue;"><span style="font-family:Courier New;font-size:9pt;"><span style="color:blue;">        </span></span>string</span> description,</span><span style="font-family:Courier New;font-size:9pt;"><br />
<span style="color:blue;"><span style="font-family:Courier New;font-size:9pt;"><span style="color:blue;">        </span></span>string</span> webTemplate,</span><span style="font-family:Courier New;font-size:9pt;"><br />
<span style="color:blue;"><span style="font-family:Courier New;font-size:9pt;"><span style="color:blue;">        </span></span>string</span> secondarySiteCollectionAdministratorLogin,</span><span style="font-family:Courier New;font-size:9pt;"><br />
<span style="color:blue;"><span style="font-family:Courier New;font-size:9pt;"><span style="color:blue;">        </span></span>string</span> secondarySiteCollectionAdministratorName,</span><span style="font-family:Courier New;font-size:9pt;"><br />
<span style="color:blue;"><span style="font-family:Courier New;font-size:9pt;"><span style="color:blue;">        </span></span>string</span> secondarySiteCollectionAdministratorEmail)<br />
</span><span style="font-family:Courier New;font-size:9pt;">{<br />
</span><span style="font-family:Courier New;font-size:9pt;"><span style="color:#2b91af;">    SPSite</span> newSiteCollection = <span style="color:blue;">null</span>;<br />
</span><span style="font-family:Courier New;font-size:9pt;"><br />
<span style="color:green;">    // The creation will only work if you set the primary administrator is set to the current user</span></span><span style="font-family:Courier New;font-size:9pt;"><br />
<span style="color:blue;">    string</span> primarySiteCollectionAdministratorLogin = <span style="color:#2b91af;">SPContext</span>.Current.Web.CurrentUser.LoginName;</span><span style="font-family:Courier New;font-size:9pt;"><br />
<span style="color:blue;">    string</span> primarySiteCollectionAdministratorName = <span style="color:#2b91af;">SPContext</span>.Current.Web.CurrentUser.Name;</span><span style="font-family:Courier New;font-size:9pt;"><br />
<span style="color:blue;">    string</span> primarySiteCollectionAdministratorEmail = <span style="color:#2b91af;">SPContext</span>.Current.Web.CurrentUser.Email;</span><span style="font-family:Courier New;font-size:9pt;"><br />
<span style="color:green;">    // Small change you want to set this variable on a different value as the root site collection</span></span><span style="font-family:Courier New;font-size:9pt;"><br />
<span style="color:blue;">    uint</span> localIdentifier = (<span style="color:blue;">uint</span>)<span style="color:#2b91af;">SPContext</span>.Current.Web.Locale.LCID;<br />
</span><span style="font-family:Courier New;font-size:9pt;">   <br />
<span style="color:blue;">    try<br />
    </span></span><span style="font-family:Courier New;font-size:9pt;">{</span><span style="font-family:Courier New;font-size:9pt;"><br />
<span style="color:green;">        // Make sure we are at the root site collection</span></span><span style="font-family:Courier New;font-size:9pt;"><br />
<span style="color:blue;"><span style="color:green;">        </span>using</span> (<span style="color:#2b91af;">SPSite</span> rootSite = <span style="color:blue;">new </span><span style="color:#2b91af;">SPSite</span>(GetAuthorityUrl(<span style="color:#2b91af;">SPContext</span>.Current.Web.Url)))<br />
<span style="color:green;">        </span></span><span style="font-family:Courier New;font-size:9pt;">{</span><span style="font-family:Courier New;font-size:9pt;"><br />
<span style="color:green;"><span style="color:green;">            </span>// If no secondary site collection administrator is provided, use null values</span></span><span style="font-family:Courier New;font-size:9pt;"><br />
<span style="color:green;"><span style="color:green;">            </span>// in stead of an empty string. Otherwise an Exception will be thrown.</span></span><span style="font-family:Courier New;font-size:9pt;"><br />
<span style="color:blue;"><span style="color:green;">            </span>if</span> (<span style="color:blue;">string</span>.IsNullOrEmpty(secondarySiteCollectionAdministratorLogin))<br />
<span style="color:green;">        <span style="color:green;">        </span></span></span><span style="font-family:Courier New;font-size:9pt;">newSiteCollection = rootSite.SelfServiceCreateSite(<br />
<span style="color:green;">        <span style="color:green;">        <span style="color:green;">        </span></span></span></span><span style="font-family:Courier New;font-size:9pt;">relativeSiteUrl,<br />
<span style="color:green;">        <span style="color:green;">        <span style="color:green;">        </span></span></span></span><span style="font-family:Courier New;font-size:9pt;">title,<br />
<span style="color:green;">        <span style="color:green;">        <span style="color:green;">        </span></span></span></span><span style="font-family:Courier New;font-size:9pt;">description,<br />
<span style="color:green;">        <span style="color:green;">        <span style="color:green;">        </span></span></span></span><span style="font-family:Courier New;font-size:9pt;">localIdentifier,<br />
<span style="color:green;">        <span style="color:green;">        <span style="color:green;">        </span></span></span></span><span style="font-family:Courier New;font-size:9pt;">webTemplate,<br />
<span style="color:green;">        <span style="color:green;">        <span style="color:green;">        </span></span></span></span><span style="font-family:Courier New;font-size:9pt;">primarySiteCollectionAdministratorLogin,<br />
<span style="color:green;">        <span style="color:green;">        <span style="color:green;">        </span></span></span></span><span style="font-family:Courier New;font-size:9pt;">primarySiteCollectionAdministratorName,<br />
<span style="color:green;">        <span style="color:green;">        <span style="color:green;">        </span></span></span></span><span style="font-family:Courier New;font-size:9pt;">primarySiteCollectionAdministratorEmail,<br />
<span style="color:green;">        <span style="color:green;">        <span style="color:green;">        </span></span></span></span><span style="font-family:Courier New;font-size:9pt;"><span style="color:blue;">null</span>,<br />
<span style="color:green;">        <span style="color:green;">        <span style="color:green;">        </span></span></span></span><span style="font-family:Courier New;font-size:9pt;"><span style="color:blue;">null</span>,<br />
<span style="color:green;">        <span style="color:green;">        <span style="color:green;">        </span></span></span></span><span style="font-family:Courier New;font-size:9pt;"><span style="color:blue;">null</span>);</span><span style="font-family:Courier New;font-size:9pt;"><br />
<span style="color:blue;"><span style="color:blue;"><span style="color:green;">            </span></span>else<br />
<span style="color:blue;"><span style="color:green;">            </span></span></span></span><span style="font-family:Courier New;font-size:9pt;">{</span><span style="font-family:Courier New;font-size:9pt;"><br />
<span style="color:green;"><span style="color:blue;"><span style="color:green;">                </span></span>// When a secundary site collection has been provided, add this account as a</span></span><span style="font-family:Courier New;font-size:9pt;"><br />
<span style="color:green;"><span style="color:blue;"><span style="color:green;">                </span></span>// secundary site collection administrator<br />
<span style="color:blue;"><span style="color:green;">                </span></span></span></span><span style="font-family:Courier New;font-size:9pt;">newSiteCollection = rootSite.SelfServiceCreateSite(<br />
<span style="color:green;">        <span style="color:green;">        <span style="color:green;">        </span></span></span></span><span style="font-family:Courier New;font-size:9pt;">relativeSiteUrl,<br />
<span style="color:green;">        <span style="color:green;">        <span style="color:green;">        </span></span></span></span><span style="font-family:Courier New;font-size:9pt;">title,<br />
<span style="color:green;">        <span style="color:green;">        <span style="color:green;">        </span></span></span></span><span style="font-family:Courier New;font-size:9pt;">description,<br />
<span style="color:green;">        <span style="color:green;">        <span style="color:green;">        </span></span></span></span><span style="font-family:Courier New;font-size:9pt;">localIdentifier,<br />
<span style="color:green;">        <span style="color:green;">        <span style="color:green;">        </span></span></span></span><span style="font-family:Courier New;font-size:9pt;">webTemplate,<br />
<span style="color:green;">        <span style="color:green;">        <span style="color:green;">        </span></span></span></span><span style="font-family:Courier New;font-size:9pt;">primarySiteCollectionAdministratorLogin,<br />
<span style="color:green;">        <span style="color:green;">        <span style="color:green;">        </span></span></span></span><span style="font-family:Courier New;font-size:9pt;">primarySiteCollectionAdministratorName,<br />
<span style="color:green;">        <span style="color:green;">        <span style="color:green;">        </span></span></span></span><span style="font-family:Courier New;font-size:9pt;">primarySiteCollectionAdministratorEmail,<br />
<span style="color:green;">        <span style="color:green;">        <span style="color:green;">        </span></span></span></span><span style="font-family:Courier New;font-size:9pt;">secondarySiteCollectionAdministratorLogin,<br />
<span style="color:green;">        <span style="color:green;">        <span style="color:green;">        </span></span></span></span><span style="font-family:Courier New;font-size:9pt;">secondarySiteCollectionAdministratorName,<br />
<span style="color:green;">        <span style="color:green;">        <span style="color:green;">        </span></span></span></span><span style="font-family:Courier New;font-size:9pt;">secondarySiteCollectionAdministratorEmail);<br />
</span><span style="font-family:Courier New;font-size:9pt;"><span style="color:blue;"><span style="color:green;">            </span></span>}<br />
</span><span style="font-family:Courier New;font-size:9pt;"><span style="color:green;">        </span>}<br />
    </span><span style="font-family:Courier New;font-size:9pt;">}<br />
    </span><span style="font-family:Courier New;font-size:9pt;"><span style="color:blue;">catch<br />
    </span></span><span style="font-family:Courier New;font-size:9pt;">{<br />
</span><span style="font-family:Courier New;font-size:9pt;"><span style="color:green;">        // You can implement some logging here. It can for example happen that you provide</span></span><span style="font-family:Courier New;font-size:9pt;"><br />
<span style="color:green;"><span style="font-family:Courier New;font-size:9pt;"><span style="color:green;">        </span></span>// a URL of a site that already exist, a template that not exist etc.<br />
    </span></span><span style="font-family:Courier New;font-size:9pt;">}<br />
</span></p>
<p>     <span style="font-family:Courier New;font-size:9pt;"><span style="color:blue;">return</span> newSiteCollection;<br />
</span><span style="font-family:Courier New;font-size:9pt;">}</span></p>
<h2>The pitfalls</h2>
<p>There are a couple of pitfalls you need to be aware of when you use <a href="http://msdn.microsoft.com/en-us/library/ms458475.aspx" target="_blank">SPSite.SelfServiceCreateSite</a>. There are probably more, but these issues I encountered:</p>
<ol>
<li><strong>Current user needs to be set as primary administrator</strong><br />
<a href="http://msdn.microsoft.com/en-us/library/ms458475.aspx" target="_blank">SPSite.SelfServiceCreateSite</a> will only work if you set the current user as the primary site administrator. When you want to allow users to create a site &#8220;on behalf&#8221; of somebody else, that is still possible. You&#8217;ll have to create the site with the current user as the primary site collection administrator and once it is created, change the owner (don&#8217;t forget, after making that change you might not be able to let the current user change other settings!).</li>
<li><strong>IntelliSense let you believe you have to add a secondary administrator<br />
</strong>When you use the <strong><br />
<a></a><a></a><a href="http://dotnetslackers.com/Community/blogs/murugangs/archive/2007/05/28/How-to-override-or-customize-the-Sharepoint-SaveButton_3F00_.aspx" target="_blank">SaveButton</a> and use a custom control template for the list / content type.<strong><br />
</strong></strong>SPSite.SelfServiceCreateSite, IntelliSense tells you to provide string values for the secondary site collection administrator. By default my first instinct is to provide it with <strong>string.Empty</strong> (or perhaps <strong>&#8220;&#8221;</strong>). But this doesn&#8217;t work. You&#8217;ll get an error stating the user can&#8217;t be found or something like that. Instead you have to provide the function with <strong>null</strong> values.</li>
<li><strong>This will only work on POST actions<br />
</strong>SPSite.SelfServiceCreateSite will only allow you to create new site collections on POST actions. When you use the function on a GET action, you&#8217;ll get a nice security exception telling you not to do that. This means you can&#8217;t easily provide this functionality in an event receiver (they are triggered AFTER the post event). If you still want to use it in an event receiver one way to get this working is to create your own</li>
<li><strong>Not everybody may create site collections<br />
</strong>If you don&#8217;t want everybody to create site collections, you can prevent it by simply changing the permissions. By default the <strong>Site Permission</strong> to allow users to use Self-Service Site Creation is given to the <strong>Read</strong> role (so for all visitors!)<br />
<strong><img class="alignnone size-full wp-image-51" title="090909_2012_selfservice6" src="http://peterheibrink.files.wordpress.com/2009/09/090909_2012_selfservice61.png" alt="090909_2012_selfservice6" width="300" height="375" /><br />
</strong></li>
<li><strong>Users trying to create the site twice<br />
</strong>The operation to create a site collection might take a few seconds. This time will increase if you automatically want to activate features. An impatient user might want to &#8220;speed up&#8221; the process by clicking on the submit button again. This might cause the user to see a nice exception stating that the site is already created (he clicked the button twice, so he tries to create a site on the URL twice). To prevent this problem from occurring you might want to provide the user with a progress window. For this you can for example use the <a href="http://peterheibrink.wordpress.com/2009/09/07/splongoperation/" target="_self">SPLongOperation</a><strong><br />
</strong></li>
</ol>
<h2>Download the code</h2>
<ul>
<li><a href="http://www.heibrink.net/BlogPost/20090909_SelfServiceCreateSite/PeterHeibrink.Example.SelfServiceSiteCreation.zip">Source code</a></li>
<li><a href="http://www.heibrink.net/BlogPost/20090909_SelfServiceCreateSite/PeterHeibrink.Example.SelfServiceSiteCreation.wsp">WSP solution</a></li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/peterheibrink.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/peterheibrink.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/peterheibrink.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/peterheibrink.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/peterheibrink.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/peterheibrink.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/peterheibrink.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/peterheibrink.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/peterheibrink.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/peterheibrink.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/peterheibrink.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/peterheibrink.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/peterheibrink.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/peterheibrink.wordpress.com/35/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=peterheibrink.wordpress.com&amp;blog=8772017&amp;post=35&amp;subd=peterheibrink&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://peterheibrink.wordpress.com/2009/09/09/self-service-site-creation-through-code/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b1d0c6e69dd77d4ceca4ea356b896a5f?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">peterheibrink</media:title>
		</media:content>

		<media:content url="http://peterheibrink.files.wordpress.com/2009/09/090909_2012_selfservice1.png" medium="image" />

		<media:content url="http://peterheibrink.files.wordpress.com/2009/09/090909_2012_selfservice2.png" medium="image" />

		<media:content url="http://peterheibrink.files.wordpress.com/2009/09/090909_2012_selfservice31.png" medium="image">
			<media:title type="html">090909_2012_selfservice3</media:title>
		</media:content>

		<media:content url="http://peterheibrink.files.wordpress.com/2009/09/090909_2012_selfservice41.png" medium="image">
			<media:title type="html">090909_2012_selfservice4</media:title>
		</media:content>

		<media:content url="http://peterheibrink.files.wordpress.com/2009/09/090909_2012_selfservice51.png" medium="image">
			<media:title type="html">090909_2012_selfservice5</media:title>
		</media:content>

		<media:content url="http://peterheibrink.files.wordpress.com/2009/09/090909_2012_selfservice61.png" medium="image">
			<media:title type="html">090909_2012_selfservice6</media:title>
		</media:content>
	</item>
		<item>
		<title>Using SPLongOperation</title>
		<link>http://peterheibrink.wordpress.com/2009/09/07/splongoperation/</link>
		<comments>http://peterheibrink.wordpress.com/2009/09/07/splongoperation/#comments</comments>
		<pubDate>Mon, 07 Sep 2009 19:27:28 +0000</pubDate>
		<dc:creator>Peter Heibrink</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://peterheibrink.wordpress.com/2009/09/07/example-splongoperation/</guid>
		<description><![CDATA[The idea Sometimes the actions triggered by users can take a while to process. This can for example happen when you create a site collection. At that time you: Don&#8217;t want your users to continue clicking on the button, the action should finish first. With the example of the creation of a site collection, you [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=peterheibrink.wordpress.com&amp;blog=8772017&amp;post=18&amp;subd=peterheibrink&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2>The idea</h2>
<p>Sometimes the actions triggered by users can take a while to process. This can for example happen when you create a site collection. At that time you:</p>
<ul>
<li>
<div style="text-align:justify;">Don&#8217;t want your users to continue clicking on the button, the action should finish first. With the example of the <a href="http://peterheibrink.wordpress.com/2009/09/09/self-service-site-creation-trough-code/" target="_self">creation of a site collection</a>, you don&#8217;t want two attempts of creating a site collection with the same URL.</div>
</li>
<li>
<div style="text-align:justify;">Users must be made aware that the action might take a while and have the idea something is really happening behind the scenes.</div>
</li>
</ul>
<p> Microsoft provided some nice ways to have implement those long running operations. One is <a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splongoperation.aspx" target="_blank">SPLongOperation </a>which shows the user the &#8220;Operation in Progress&#8221; screen and it is actually pretty easy to implement.</p>
<h2>The implementation</h2>
<p>The implementation of the SPLongOperation is pretty easy. In a nutshell you create a new <a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splongoperation.aspx" target="_blank">SPLongOperation</a>, provide the different texts you want to display and you start your operation.</p>
<p>The next code example will be triggered by a button in a WebPart. It doesn&#8217;t actually do anything, but just let the current thread sleep for 5 seconds. In that time the &#8220;Operation in Progress&#8221; page is being displayed.</p>
<p> <span style="color:gray;font-family:Courier New;font-size:9pt;">/// &lt;summary&gt;</span><br />
<span style="font-family:Courier New;font-size:9pt;"><span style="color:gray;">/// </span><span style="color:green;">This test function will also call </span><span style="color:gray;">&lt;see cref=&#8221;ALongRunningAction&#8221;/&gt;</span><span style="color:green;">, but it will<br />
</span></span><span style="font-family:Courier New;font-size:9pt;"><span style="color:gray;">/// </span><span style="color:green;">use </span><span style="color:gray;">&lt;see cref=&#8221;SPLongOperation&#8221;/&gt;</span><span style="color:green;"> to show a progress indication<br />
</span></span><span style="color:gray;font-family:Courier New;font-size:9pt;">/// &lt;/summary&gt;<br />
</span><span style="font-family:Courier New;font-size:9pt;"><span style="color:blue;">private </span><span style="color:blue;">void</span> ALongActionWithProgressIndicator()<br />
</span><span style="font-family:Courier New;font-size:9pt;">{<br />
</span><span style="font-family:Courier New;font-size:9pt;">    <span style="color:green;">// Determine the page to navigate to when the operation is successful<br />
</span></span><span style="font-family:Courier New;font-size:9pt;"><span style="color:blue;">    string</span> successUrl = <span style="color:#2b91af;">SPContext</span>.Current.Web.Url;<br />
</span><span style="font-family:Courier New;font-size:9pt;"><br />
<span style="color:green;">    // Create a new SPLongOperation<br />
</span></span><span style="font-family:Courier New;font-size:9pt;"><span style="color:#2b91af;">    SPLongOperation</span> longOperation = <span style="color:blue;">new </span><span style="color:#2b91af;">SPLongOperation</span>(<span style="color:blue;">this</span>.Page);<br />
</span><span style="font-family:Courier New;font-size:9pt;"><br />
<span style="color:green;">    // Provide the text displayed in bold<br />
</span></span><span style="font-family:Courier New;font-size:9pt;">    longOperation.LeadingHTML = <span style="color:#a31515;">&#8220;Long running operation is being performed&#8221;</span>;<br />
</span><span style="font-family:Courier New;font-size:9pt;"><br />
<span style="color:green;">    // Provide the normal formatted text<br />
</span></span><span style="font-family:Courier New;font-size:9pt;">    longOperation.TrailingHTML = <span style="color:#a31515;">&#8220;Please wait while your request is being performed. This can take a couple of seconds.&#8221;</span>;<br />
</span><span style="font-family:Courier New;font-size:9pt;"><br />
<span style="color:green;">    // Let&#8217;s start the code that takes a while from here<br />
</span></span><span style="font-family:Courier New;font-size:9pt;">    longOperation.Begin();</span></p>
<p><span style="font-family:Courier New;font-size:9pt;"><span style="color:blue;">    try<br />
</span></span><span style="font-family:Courier New;font-size:9pt;">    {<br />
</span><span style="font-family:Courier New;font-size:9pt;"><span style="color:green;">        // The code that might take a while<br />
        </span></span><span style="font-family:Courier New;font-size:9pt;"><span style="color:#2b91af;">Thread</span>.Sleep(5000);</span></p>
<p><span style="font-family:Courier New;font-size:9pt;">       </span> <span style="font-family:Courier New;font-size:9pt;"><span style="color:green;">//When the action is performed, the page will be redirect to this url<br />
</span></span><span style="font-family:Courier New;font-size:9pt;">       longOperation.End(successUrl);<br />
</span><span style="font-family:Courier New;font-size:9pt;">    }<br />
</span><span style="font-family:Courier New;font-size:9pt;"><span style="color:blue;">    catch</span> (<span style="color:#2b91af;">ThreadAbortException</span>)<br />
</span><span style="font-family:Courier New;font-size:9pt;">    {<br />
</span><span style="font-family:Courier New;font-size:9pt;"><span style="color:green;">        // Don&#8217;t do anything, this error can occur because the SPLongOperation.End<br />
</span></span><span style="font-family:Courier New;font-size:9pt;"><span style="color:green;">        // performs a Response.Redirect internally and doesnt take into account<br />
</span></span><span style="font-family:Courier New;font-size:9pt;"><span style="color:green;">        // that other code might still be executed<br />
</span></span><span style="font-family:Courier New;font-size:9pt;">    }<br />
</span><span style="font-family:Courier New;font-size:9pt;"><span style="color:blue;">    catch</span> (<span style="color:#2b91af;">Exception</span> ex)<br />
</span><span style="font-family:Courier New;font-size:9pt;">    {<br />
</span><span style="font-family:Courier New;font-size:9pt;"><span style="color:green;">        // When an exception occurs, the page is redirected to the error page.<br />
</span></span><span style="font-family:Courier New;font-size:9pt;"><span style="color:green;">        // Redirection to another (custom) page is also possible<br />
</span></span><span style="font-family:Courier New;font-size:9pt;"><span style="color:#2b91af;">        SPUtility</span>.TransferToErrorPage(ex.ToString());<br />
</span><span style="font-family:Courier New;font-size:9pt;">    }<br />
</span><span style="font-family:Courier New;font-size:9pt;">}<br />
</span> </p>
<h2>Pitfalls</h2>
<p>There is one thing you might want to take into account when you use the SPLongOperation. The <a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splongoperation.end.aspx" target="_blank">SPLongOperation.End </a>internally uses a Response.Redirect which doesn&#8217;t take into account that you might have other code that is executed at the same time in a different thread. In order to prevent a ThreadAbortException message to display, you might want to catch that error.</p>
<h2>The result</h2>
<p>I created a small WebPart with two buttons for this demonstration.</p>
<ol>
<li>
<div style="text-align:justify;">Button one doesn&#8217;t use the SPLongOperation and you&#8217;ll see the page loading for 5 seconds.</div>
</li>
<li>
<div style="text-align:justify;">Button two uses the SPLongOperation and it displays the &#8220;Operation in Progress&#8221; progress page</div>
</li>
</ol>
<p><img src="http://peterheibrink.files.wordpress.com/2009/09/090709_1926_examplesplo1.jpg?w=610" alt="" width="610" /></p>
<p><span style="color:gray;font-family:Arial;font-size:9pt;"><strong>Figure 1: Test WebPart<br />
</strong></span></p>
<p><img src="http://peterheibrink.files.wordpress.com/2009/09/090709_1926_examplesplo2.jpg?w=610" alt="" width="610" /></p>
<p><span style="color:gray;font-family:Arial;font-size:9pt;"><strong>Figure 2: Operation in Progress screen<br />
</strong></span></p>
<h2>Download the code</h2>
<ul>
<li>
<div style="text-align:justify;"><a href="http://www.heibrink.net/BlogPost/20090907_SPLongOperation/PeterHeibrink.Example.LongOperation.zip">Source code</a></div>
</li>
<li>
<div style="text-align:justify;"><a href="http://www.heibrink.net/BlogPost/20090907_SPLongOperation/PeterHeibrink.Example.LongOperation.wsp">WSP solution</a></div>
</li>
</ul>
<p><a href="http://www.heibrink.net/BlogPost/20090907_SPLongOperation/PeterHeibrink.Example.LongOperation.wsp"></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/peterheibrink.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/peterheibrink.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/peterheibrink.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/peterheibrink.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/peterheibrink.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/peterheibrink.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/peterheibrink.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/peterheibrink.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/peterheibrink.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/peterheibrink.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/peterheibrink.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/peterheibrink.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/peterheibrink.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/peterheibrink.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=peterheibrink.wordpress.com&amp;blog=8772017&amp;post=18&amp;subd=peterheibrink&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://peterheibrink.wordpress.com/2009/09/07/splongoperation/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b1d0c6e69dd77d4ceca4ea356b896a5f?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">peterheibrink</media:title>
		</media:content>

		<media:content url="http://peterheibrink.files.wordpress.com/2009/09/090709_1926_examplesplo1.jpg" medium="image" />

		<media:content url="http://peterheibrink.files.wordpress.com/2009/09/090709_1926_examplesplo2.jpg" medium="image" />
	</item>
	</channel>
</rss>
