<?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>Ingo Karstein&#039;s Blog</title>
	<atom:link href="http://ikarstein.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://ikarstein.wordpress.com</link>
	<description>SharePoint Pleasure</description>
	<lastBuildDate>Wed, 22 Feb 2012 21:59:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='ikarstein.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/b7711fcc44c4c8e04a29eaec10d4342e?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Ingo Karstein&#039;s Blog</title>
		<link>http://ikarstein.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://ikarstein.wordpress.com/osd.xml" title="Ingo Karstein&#039;s Blog" />
	<atom:link rel='hub' href='http://ikarstein.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Minify JavaScript and PowerShell scripts by using PowerShell</title>
		<link>http://ikarstein.wordpress.com/2012/02/22/minify-javascript-and-powershell-scripts-by-using-powershell/</link>
		<comments>http://ikarstein.wordpress.com/2012/02/22/minify-javascript-and-powershell-scripts-by-using-powershell/#comments</comments>
		<pubDate>Wed, 22 Feb 2012 13:39:06 +0000</pubDate>
		<dc:creator>ikarstein</dc:creator>
				<category><![CDATA[SharePoint 2010]]></category>

		<guid isPermaLink="false">https://ikarstein.wordpress.com/?p=1595</guid>
		<description><![CDATA[There are several tools out there to minify JavaScript files. – You don’t know “minification”? Look here: http://en.wikipedia.org/wiki/Minification_(programming) Common tools are: http://www.crockford.com/javascript/jsmin.html http://ajaxmin.codeplex.com For those of you that like PowerShell as I like it I’ve created a PowerShell module that let’s you minify JavaScript files and PowerShell script files. Here it is on Codeplex: http://minifyps.codeplex.com/ [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ikarstein.wordpress.com&amp;blog=14218320&amp;post=1595&amp;subd=ikarstein&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There are several tools out there to minify JavaScript files. – You don’t know “minification”? Look here: <a href="http://en.wikipedia.org/wiki/Minification_(programming)">http://en.wikipedia.org/wiki/Minification_(programming)</a></p>
<p>Common tools are:</p>
<ul>
<li><a href="http://www.crockford.com/javascript/jsmin.html">http://www.crockford.com/javascript/jsmin.html</a> </li>
<li><a href="http://ajaxmin.codeplex.com">http://ajaxmin.codeplex.com</a> </li>
</ul>
<p>For those of you that like PowerShell as I like it I’ve created a PowerShell module that let’s you minify JavaScript files <strong>and PowerShell script files</strong>.</p>
<p>Here it is on Codeplex:</p>
<blockquote><p style="font-size:2em;"><a href="http://minifyps.codeplex.com/">http://minifyps.codeplex.com/</a></p>
</blockquote>
<p>You can use the module like this:</p>
<blockquote><div style="border-bottom:#7f7f7f 1px solid;border-left:#7f7f7f 1px solid;font-size:1.2em;overflow:auto;border-top:#7f7f7f 1px solid;border-right:#aaaaaa 1px solid;padding:10px;">
<pre><span style="color:#5f9ea0;font-weight:bold;">cls</span><span style="color:#000000;">

</span><span style="color:#008000;">#</span><span style="color:#008000;">module in the same path as the script:</span><span style="color:#008000;">
</span><span style="color:#5f9ea0;font-weight:bold;">Import-Module</span><span style="color:#000000;"> (</span><span style="color:#5f9ea0;font-weight:bold;">join-path</span><span style="color:#000000;"> (</span><span style="color:#5f9ea0;font-weight:bold;">split-path</span><span style="color:#000000;"> </span><span style="color:#800080;">$MyInvocation</span><span style="color:#000000;">.mycommand.path) </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">minjs</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">)

</span><span style="color:#008000;">#</span><span style="color:#008000;">module in a default module path like &quot;C:\Windows\System32\WindowsPowerShell\v1.0\Modules\minifyPS&quot;</span><span style="color:#008000;">
#</span><span style="color:#008000;">Import-Module &quot;minjs&quot;</span><span style="color:#008000;">
</span><span style="color:#000000;">
</span><span style="color:#800080;">$str</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">@&quot;
</span><span style="color:#800000;">    var test = 'some JavascriptCode';
</span><span style="color:#800000;">&quot;@</span><span style="color:#000000;">

</span><span style="color:#800080;">$min</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> (</span><span style="color:#5f9ea0;">minify</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-inputData</span><span style="color:#000000;"> </span><span style="color:#800080;">$str</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-inputDataType</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">js</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">)

[</span><span style="color:#008080;">System.Windows.Forms.Clipboard</span><span style="color:#000000;">]::</span><span style="color:#8b4513;">SetText</span><span style="color:#000000;">(</span><span style="color:#800080;">$min</span><span style="color:#000000;"> )</span></pre>
</p></div>
</blockquote>
<p><strong>The module works like this:</strong></p>
<p>1. Split script source code into typed chunks:</p>
<ul>
<li>Code </li>
<li>Single Quoted String </li>
<li>Double Quoted String </li>
<li>Multiline Comment </li>
<li>End-of-line Comment </li>
<li>… </li>
</ul>
<p>2. Remove all unwanted chunks such as comments</p>
<p>3. Process all remaining chunks by using regular expressions</p>
<p>4. Combine all processed chucks to a result string</p>
<p>&#160;</p>
<p>For every language (JavaScript and PowerShell) there is a config section in the script.</p>
<blockquote>
<p><a href="http://ikarstein.files.wordpress.com/2012/02/image.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" border="0" alt="image" src="http://ikarstein.files.wordpress.com/2012/02/image_thumb.png?w=908&#038;h=411" width="908" height="411" /></a></p>
</blockquote>
<p>There are two files in the package at Codeplex:</p>
<blockquote>
<p><a href="http://ikarstein.files.wordpress.com/2012/02/image1.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" border="0" alt="image" src="http://ikarstein.files.wordpress.com/2012/02/image_thumb1.png?w=390&#038;h=78" width="390" height="78" /></a></p>
</blockquote>
<ul>
<li>“minJS.psm1” =&gt; This is the module </li>
<li>“minJSDemo.ps1” =&gt; This is a demo script that uses the module </li>
</ul>
<p>The demo script contains a piece of JavaScript that will be minified. And the script will minify itself and the module to an “output” sub directory that is created by the script if it does not exist.</p>
<p>This is a screenshot after running the demo script:</p>
<blockquote>
<p><a href="http://ikarstein.files.wordpress.com/2012/02/image2.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" border="0" alt="image" src="http://ikarstein.files.wordpress.com/2012/02/image_thumb2.png?w=420&#038;h=183" width="420" height="183" /></a></p>
<p>If you execute “minJSDemo.min.ps1” in the output folder you execute the minified version of “minJSDemo.ps1” and the minified version of the module itself (“minJSmin.psm1”).</p>
</blockquote>
<p>&#160;</p>
<p><strong>The module is ALPHA at the moment.</strong> I’ve tested it in some projects and it seems to work as expected.</p>
<p>I’ve tested it with a huge JavaScript file: “core.debug.js” of Microsoft SharePoint:</p>
<blockquote>
<p>C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\&lt;lcid&gt;\CORE.debug.js</p>
<p>I’ve renamed the original file to “core.debug.js.bak”, minified it and saved the result as “code.debug.js”. So it’s used in the browser. (The minification of ~360KB takes 90 seconds.<strong>The minification module is slow…</strong>) <strong>&#160;</strong></p>
<p>It’s not possible to use the minified version. It seems that the original “code.debug.js” has some bugs. For example in line 42: There is no trailing “;”</p>
<p><a href="http://ikarstein.files.wordpress.com/2012/02/image3.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" border="0" alt="image" src="http://ikarstein.files.wordpress.com/2012/02/image_thumb3.png?w=548&#038;h=224" width="548" height="224" /></a></p>
<p>But because of removing the line break this results in:</p>
<p><a href="http://ikarstein.files.wordpress.com/2012/02/image4.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" border="0" alt="image" src="http://ikarstein.files.wordpress.com/2012/02/image_thumb4.png?w=841&#038;h=255" width="841" height="255" /></a></p>
<p>This causes the following JavaScript error in Internet Exlorer:</p>
<p><a href="http://ikarstein.files.wordpress.com/2012/02/image5.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" border="0" alt="image" src="http://ikarstein.files.wordpress.com/2012/02/image_thumb5.png?w=244&#038;h=162" width="244" height="162" /></a></p>
</blockquote>
<p><strong>I’d be happy to hear about your experiences with the module. Please post comment, write me an e-mail or join the Codeplex-project!</strong></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ikarstein.wordpress.com/1595/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ikarstein.wordpress.com/1595/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ikarstein.wordpress.com/1595/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ikarstein.wordpress.com/1595/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ikarstein.wordpress.com/1595/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ikarstein.wordpress.com/1595/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ikarstein.wordpress.com/1595/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ikarstein.wordpress.com/1595/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ikarstein.wordpress.com/1595/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ikarstein.wordpress.com/1595/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ikarstein.wordpress.com/1595/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ikarstein.wordpress.com/1595/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ikarstein.wordpress.com/1595/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ikarstein.wordpress.com/1595/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ikarstein.wordpress.com&amp;blog=14218320&amp;post=1595&amp;subd=ikarstein&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ikarstein.wordpress.com/2012/02/22/minify-javascript-and-powershell-scripts-by-using-powershell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c26cf503c3296c4f8dcc59e1d14792d5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ikarstein</media:title>
		</media:content>

		<media:content url="http://ikarstein.files.wordpress.com/2012/02/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ikarstein.files.wordpress.com/2012/02/image_thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ikarstein.files.wordpress.com/2012/02/image_thumb2.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ikarstein.files.wordpress.com/2012/02/image_thumb3.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ikarstein.files.wordpress.com/2012/02/image_thumb4.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ikarstein.files.wordpress.com/2012/02/image_thumb5.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Walkaround for common &#8220;TaxonomyPicker.ascx&#8221; error in Windows Event Log: SharePoint Feature that renames the file</title>
		<link>http://ikarstein.wordpress.com/2012/02/01/walkaround-for-common-taxonomypicker-ascx-error-in-windows-event-log-sharepoint-feature-that-renames-the-file/</link>
		<comments>http://ikarstein.wordpress.com/2012/02/01/walkaround-for-common-taxonomypicker-ascx-error-in-windows-event-log-sharepoint-feature-that-renames-the-file/#comments</comments>
		<pubDate>Wed, 01 Feb 2012 08:00:12 +0000</pubDate>
		<dc:creator>ikarstein</dc:creator>
				<category><![CDATA[SharePoint 2010]]></category>

		<guid isPermaLink="false">https://ikarstein.wordpress.com/?p=1576</guid>
		<description><![CDATA[There is a common error in SharePoint 2010: On almost every (web frontend) server you can find this error in the Windows Event Log “Application”: Event Type: Error Event Source: SharePoint Foundation Event Category: None Event ID: 7043 Computer: SERVERNAME Description: Load control template file /_controltemplates/TaxonomyPicker.ascx failed: Could not load type &#8216;Microsoft.SharePoint.Portal.WebControls.TaxonomyPicker&#8217; from assembly &#8216;Microsoft.SharePoint.Portal, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ikarstein.wordpress.com&amp;blog=14218320&amp;post=1576&amp;subd=ikarstein&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There is a common error in SharePoint 2010: On almost every (web frontend) server you can find this error in the Windows Event Log “Application”:</p>
<blockquote><p>Event Type: Error<br />
Event Source: SharePoint Foundation<br />
Event Category: None<br />
Event ID: 7043<br />
Computer: SERVERNAME<br />
Description: Load control template file /_controltemplates/TaxonomyPicker.ascx failed: Could not load type &#8216;Microsoft.SharePoint.Portal.WebControls.TaxonomyPicker&#8217; from assembly &#8216;Microsoft.SharePoint.Portal, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&#8217;.</p></blockquote>
<blockquote><p><a href="http://ikarstein.files.wordpress.com/2012/01/image11.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;margin:5px;" title="image" src="http://ikarstein.files.wordpress.com/2012/01/image_thumb11.png?w=449&#038;h=293" alt="image" width="449" height="293" border="0" /></a></p></blockquote>
<p>The problem is described in many blogs and sites, e.g.:</p>
<ul>
<li><a href="http://gallery.technet.microsoft.com/scriptcenter/32d06697-ab7f-447e-9d0e-b6d93bee3fda">http://gallery.technet.microsoft.com/scriptcenter/32d06697-ab7f-447e-9d0e-b6d93bee3fda</a></li>
<li><a href="http://www.sharepointdan.com/2010/05/19/taxonomypicker-ascx-bug-sp2010-rtm/">http://www.sharepointdan.com/2010/05/19/taxonomypicker-ascx-bug-sp2010-rtm/</a></li>
<li><a href="http://blogs.technet.com/b/praveenh/archive/2010/12/16/sharepoint-2010-gt-gt-taxonomy-picker-ascx-failed-error.aspx">http://blogs.technet.com/b/praveenh/archive/2010/12/16/sharepoint-2010-gt-gt-taxonomy-picker-ascx-failed-error.aspx</a></li>
</ul>
<p>To solve the problem there’s no other way than renaming the “TaxonomyPicker.ascx” file.</p>
<p>On a single-server farm it’s not that problem but in a huge farm with about 100 servers … ?</p>
<p>I’ve created simple SharePoint 2010 solution that will do the job for you.</p>
<p>The solution deploys a SharePoint Timer Job Definition and the farm feature event receiver creates two timer jobs for every web application on the system. The first timer job is a “one-time” job, the other one is a “daily” job. Each job checks the SharePoint hive on the local disk of every server and renames the “TaxonomyPicker.ascx” file to “TaxonomyPicker.ascx.disabled”, if the file is present. If the file “TaxonomyPicker.ascx” not present or already renamed it does nothing.</p>
<p>the “one-time” job runs some seconds after the feature activation and will delete itself after running. The “daily” job executes every day between 1am and 2am.</p>
<p>You can download this code at Codeplex. Please feel free to modify it, but please send me your improvements or request “edit” permissions on codeplex. – I’m sure there are possible improvements. It’s a “quick dev project”.</p>
<h4><a href="http://spdisabletaxpicker.codeplex.com/">http://spdisabletaxpicker.codeplex.com/</a></h4>
<p>When you disable the farm feature the file “TaxonomyPicker.ascx.disabled” is renamed back to “TaxonomyPicker.ascx”!</p>
<p><strong><span style="color:#c0504d;">Be sure you test the feature in a dev system before you use it in a live system!!!!</span> I only provide the source code he. Please compile it by yourself und use the solution as you want.</strong></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ikarstein.wordpress.com/1576/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ikarstein.wordpress.com/1576/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ikarstein.wordpress.com/1576/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ikarstein.wordpress.com/1576/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ikarstein.wordpress.com/1576/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ikarstein.wordpress.com/1576/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ikarstein.wordpress.com/1576/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ikarstein.wordpress.com/1576/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ikarstein.wordpress.com/1576/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ikarstein.wordpress.com/1576/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ikarstein.wordpress.com/1576/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ikarstein.wordpress.com/1576/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ikarstein.wordpress.com/1576/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ikarstein.wordpress.com/1576/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ikarstein.wordpress.com&amp;blog=14218320&amp;post=1576&amp;subd=ikarstein&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ikarstein.wordpress.com/2012/02/01/walkaround-for-common-taxonomypicker-ascx-error-in-windows-event-log-sharepoint-feature-that-renames-the-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c26cf503c3296c4f8dcc59e1d14792d5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ikarstein</media:title>
		</media:content>

		<media:content url="http://ikarstein.files.wordpress.com/2012/01/image_thumb11.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>BTW: A little trick for development in Visual Studio 2010 &#8211; Start PowerShell scripts that need to run in an x64 context by double click from Solution Explorer</title>
		<link>http://ikarstein.wordpress.com/2012/01/25/btw-a-little-trick-for-development-in-visual-studio-2010-start-powershell-scripts-that-need-to-run-in-an-x64-context-by-double-click-from-solution-explorer/</link>
		<comments>http://ikarstein.wordpress.com/2012/01/25/btw-a-little-trick-for-development-in-visual-studio-2010-start-powershell-scripts-that-need-to-run-in-an-x64-context-by-double-click-from-solution-explorer/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 14:51:05 +0000</pubDate>
		<dc:creator>ikarstein</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>

		<guid isPermaLink="false">https://ikarstein.wordpress.com/?p=1572</guid>
		<description><![CDATA[For development and some related tasks I use PowerShell, of course. – I store the PowerShell scripts in my projects as part of them. They are part of the source code and they are saved in the source control. If I need to run such a script I start it directly from Solution Explorer in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ikarstein.wordpress.com&amp;blog=14218320&amp;post=1572&amp;subd=ikarstein&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>For development and some related tasks I use PowerShell, of course. – I store the PowerShell scripts in my projects as part of them. They are part of the source code and they are saved in the source control. </p>
<p>If I need to run such a script I start it directly from Solution Explorer in VS2010.</p>
<p>Therefore I’ve set the default “open with…” to “powershell.exe”</p>
<blockquote><p><a href="http://ikarstein.files.wordpress.com/2012/01/image8.png"><img style="background-image:none;border-bottom:0;border-left:0;padding-left:0;padding-right:0;display:inline;border-top:0;border-right:0;padding-top:0;margin:0;" title="image" border="0" alt="image" src="http://ikarstein.files.wordpress.com/2012/01/image_thumb8.png?w=244&#038;h=93" width="244" height="93" /></a></p>
<p><a href="http://ikarstein.files.wordpress.com/2012/01/image9.png"><img style="background-image:none;border-bottom:0;border-left:0;padding-left:0;padding-right:0;display:inline;border-top:0;border-right:0;padding-top:0;margin:0;" title="image" border="0" alt="image" src="http://ikarstein.files.wordpress.com/2012/01/image_thumb9.png?w=244&#038;h=151" width="244" height="151" /></a></p>
<p><a href="http://ikarstein.files.wordpress.com/2012/01/image10.png"><img style="background-image:none;border-bottom:0;border-left:0;padding-left:0;padding-right:0;display:inline;border-top:0;border-right:0;padding-top:0;margin:0;" title="image" border="0" alt="image" src="http://ikarstein.files.wordpress.com/2012/01/image_thumb10.png?w=244&#038;h=162" width="244" height="162" /></a></p>
<p>If you have done this you can run every “.ps1” script file by double click in Solution Explorer!! </p>
</blockquote>
<p>BUT… VS2010 itself is 32bit! – If you start an architecture independend process like “poweshell.exe” from within VS2010 it runs in 32bit environment! But sometimes you need to run a 64 version of PowerShell, e.g. for some SharePoint tasks that need an 64 bit environment.</p>
<p>Therefore I’ve created a little App “StartPS64”:</p>
<p>1. In VS2010 create a new Project of type “Console Application”</p>
<p>2. Open the project’s properties, select the “Build” tab and change “Platform target” to x64.</p>
<blockquote><p><a href="http://ikarstein.files.wordpress.com/2012/01/snaghtml57d9e4d.png"><img style="background-image:none;border-bottom:0;border-left:0;padding-left:0;padding-right:0;display:inline;border-top:0;border-right:0;padding-top:0;margin:0;" title="SNAGHTML57d9e4d" border="0" alt="SNAGHTML57d9e4d" src="http://ikarstein.files.wordpress.com/2012/01/snaghtml57d9e4d_thumb.png?w=244&#038;h=96" width="244" height="96" /></a></p>
</blockquote>
<p>3. Edit “program.cs” and insert this code:</p>
<blockquote><pre class="code"><span style="color:blue;">using </span>System;
<span style="color:blue;">using </span>System.Collections.Generic;
<span style="color:blue;">using </span>System.Linq;
<span style="color:blue;">using </span>System.Text;
<span style="color:blue;">using </span>System.Diagnostics;

<span style="color:blue;">namespace </span>StartPS64
{
    <span style="color:blue;">class </span><span style="color:#2b91af;">Program
    </span>{
        <span style="color:blue;">static void </span>Main(<span style="color:blue;">string</span>[] args)
        {
            <span style="color:blue;">string </span>fullname = System.IO.<span style="color:#2b91af;">Path</span>.GetFullPath(args[0]);
            <span style="color:blue;">if</span>( !System.IO.<span style="color:#2b91af;">File</span>.Exists(fullname) )
            {
                <span style="color:#2b91af;">Console</span>.WriteLine(<span style="color:#a31515;">&quot;Script does not exist!&quot;</span>);
                <span style="color:#2b91af;">Console</span>.ReadKey();
                <span style="color:blue;">return</span>;
            }

            <span style="color:#2b91af;">Process</span>.Start(<span style="color:#a31515;">@&quot;c:\windows\system32\windowspowershell\v1.0\powershell.exe&quot;</span>, fullname);
        }
    }
}</pre>
</blockquote>
<p>4. Compile it. </p>
<p>5. Specify the build “startps64.exe” as new “default application” for “.ps1” files in VS2010 as described above.</p>
<p>6. Now every “.ps1” file started from the Solution Explorer will run in an 64 bit environment and can execute SharePoint cmdlets!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ikarstein.wordpress.com/1572/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ikarstein.wordpress.com/1572/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ikarstein.wordpress.com/1572/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ikarstein.wordpress.com/1572/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ikarstein.wordpress.com/1572/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ikarstein.wordpress.com/1572/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ikarstein.wordpress.com/1572/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ikarstein.wordpress.com/1572/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ikarstein.wordpress.com/1572/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ikarstein.wordpress.com/1572/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ikarstein.wordpress.com/1572/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ikarstein.wordpress.com/1572/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ikarstein.wordpress.com/1572/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ikarstein.wordpress.com/1572/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ikarstein.wordpress.com&amp;blog=14218320&amp;post=1572&amp;subd=ikarstein&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ikarstein.wordpress.com/2012/01/25/btw-a-little-trick-for-development-in-visual-studio-2010-start-powershell-scripts-that-need-to-run-in-an-x64-context-by-double-click-from-solution-explorer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c26cf503c3296c4f8dcc59e1d14792d5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ikarstein</media:title>
		</media:content>

		<media:content url="http://ikarstein.files.wordpress.com/2012/01/image_thumb8.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ikarstein.files.wordpress.com/2012/01/image_thumb9.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ikarstein.files.wordpress.com/2012/01/image_thumb10.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ikarstein.files.wordpress.com/2012/01/snaghtml57d9e4d_thumb.png" medium="image">
			<media:title type="html">SNAGHTML57d9e4d</media:title>
		</media:content>
	</item>
		<item>
		<title>Walkaround for problems accessing a diffrent web by &#8220;Linq to SharePoint&#8221; inside server code.</title>
		<link>http://ikarstein.wordpress.com/2012/01/23/walkaround-for-problems-accessing-a-diffrent-web-by-linq-to-sharepoint-inside-server-code/</link>
		<comments>http://ikarstein.wordpress.com/2012/01/23/walkaround-for-problems-accessing-a-diffrent-web-by-linq-to-sharepoint-inside-server-code/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 08:00:46 +0000</pubDate>
		<dc:creator>ikarstein</dc:creator>
				<category><![CDATA[SharePoint 2010]]></category>

		<guid isPermaLink="false">https://ikarstein.wordpress.com/?p=1561</guid>
		<description><![CDATA[At the weekend I tried to access a diffrent SharePoint Web (SPWeb) from inside server code (ASPX application page). Before I created interface classes to the “diffrent SharePoint Web” by using SPMetal. In the server side code I used this snipped to access the “diffrent SharePoint Web” by using the generated interface: using System; using [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ikarstein.wordpress.com&amp;blog=14218320&amp;post=1561&amp;subd=ikarstein&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>At the weekend I tried to access a diffrent SharePoint Web (SPWeb) from inside server code (ASPX application page).</p>
<p>Before I created interface classes to the “diffrent SharePoint Web” by using <a href="http://msdn.microsoft.com/en-us/library/ee538255.aspx">SPMetal</a>.</p>
<p>In the server side code I used this snipped to access the “diffrent SharePoint Web” by using the generated interface:</p>
<blockquote><p><span style="color:blue;">using </span>System;<br />
<span style="color:blue;">using </span>Microsoft.SharePoint;<br />
<span style="color:blue;">using </span>Microsoft.SharePoint.WebControls;</p>
<p><span style="color:blue;">namespace <span style="color:#2a2a2a;">myProject</span></span><br />
{<br />
<span style="color:blue;">public partial class </span><span style="color:#2b91af;">ManageFeature </span>: <span style="color:#2b91af;">LayoutsPageBase<br />
</span>{<br />
<span style="color:blue;">protected void </span>Page_Load(<span style="color:blue;">object </span>sender, <span style="color:#2b91af;">EventArgs </span>e)<br />
{</p>
<p><span style="color:blue;">string </span>diffrentWebUrl = &#8220;http://diffrentWebUrl&#8221;;<br />
<span style="color:blue;">using</span>( <span style="color:#2b91af;">DiffrentWebDataContext </span>dc = <span style="color:blue;">new </span><span style="color:#2b91af;">DiffrentWebDataContext</span>(diffrentWebUrl) )<br />
{<br />
<span style="color:blue;">var </span>x1 = <span style="color:blue;">from </span>x <span style="color:blue;">in </span>dc.<span style="color:#2b91af;">ListOnDiffrentWeb</span><br />
<span style="color:blue;">                             select </span>x;<br />
<span style="color:blue;">var </span>x2 = x1.ToList();<br />
}<br />
}<br />
}<br />
}</p></blockquote>
<p><span style="color:#ff0000;font-size:xx-small;">This failed because inside server code you cannot access a diffrent Web by using Linq to SharePoint.</span></p>
<p>Read this blog post Chun Liu:</p>
<blockquote><p><a href="http://blogs.msdn.com/b/chunliu/archive/2010/04/17/linq-to-sharepoint-query-across-site-collections.aspx">http://blogs.msdn.com/b/chunliu/archive/2010/04/17/linq-to-sharepoint-query-across-site-collections.aspx</a></p></blockquote>
<p>Here is a suggestion how to solve this by Pascal Be:</p>
<blockquote><p><a href="http://social.technet.microsoft.com/Forums/sv-SE/sharepoint2010programming/thread/715ddcbb-619d-4688-8d99-d7a6aa078307">http://social.technet.microsoft.com/Forums/sv-SE/sharepoint2010programming/thread/715ddcbb-619d-4688-8d99-d7a6aa078307</a></p></blockquote>
<p>I’ve created a helper class for this workaround:</p>
<blockquote>
<pre class="code"><span style="color:blue;">using </span>System;
<span style="color:blue;">using </span>System.IO;
<span style="color:blue;">using </span>System.Web;
<span style="color:blue;">using </span>Microsoft.SharePoint;
<span style="color:blue;">using </span>Microsoft.SharePoint.WebControls;

<span style="color:blue;">namespace </span>ik.SharePoint2010
{
    <span style="color:blue;">public class </span><span style="color:#2b91af;">CustomSPContext </span>: <span style="color:#2b91af;">IDisposable </span>{
        <span style="color:blue;">private</span> <span style="color:#2b91af;">HttpContext </span>originalContext;

        <span style="color:blue;">public static </span><span style="color:#2b91af;">CustomSPContext </span>CreateSPCustomContext(<span style="color:#2b91af;">SPWeb </span>contextWeb)
        {
            <span style="color:blue;">return new </span><span style="color:#2b91af;">CustomSPContext</span>(contextWeb);
        }

        <span style="color:blue;">private </span>CustomSPContext(<span style="color:#2b91af;">SPWeb </span>contextWeb)
        {
            originalContext = <span style="color:#2b91af;">HttpContext</span>.Current;

            <span style="color:blue;">string </span>url = contextWeb.Url;
            <span style="color:#2b91af;">HttpRequest </span>httpRequest = <span style="color:blue;">new </span><span style="color:#2b91af;">HttpRequest</span>(<span style="color:#a31515;">""</span>, url, <span style="color:#a31515;">""</span>);
            <span style="color:#2b91af;">HttpContext</span>.Current = <span style="color:blue;">new </span><span style="color:#2b91af;">HttpContext</span>(httpRequest, <span style="color:blue;">new </span><span style="color:#2b91af;">HttpResponse</span>(<span style="color:blue;">new </span><span style="color:#2b91af;">StringWriter</span>()));
            <span style="color:#2b91af;">SPControl</span>.SetContextWeb(<span style="color:#2b91af;">HttpContext</span>.Current, contextWeb);
        }

        <span style="color:blue;">public void </span>Dispose()
        {
            <span style="color:#2b91af;">HttpContext</span>.Current = originalContext;
        }
    }
}</pre>
<p>&nbsp;</p></blockquote>
<p>You can use it like this:</p>
<blockquote>
<pre class="code"><span style="color:blue;">using </span>System;
<span style="color:blue;">using </span>Microsoft.SharePoint;
<span style="color:blue;">using </span>Microsoft.SharePoint.WebControls;

<span style="color:blue;">namespace </span>kc.GlobalNotification
{
    <span style="color:blue;">public partial class </span><span style="color:#2b91af;">ManageFeature </span>: <span style="color:#2b91af;">LayoutsPageBase </span>{
        <span style="color:blue;">protected void </span>Page_Load(<span style="color:blue;">object </span>sender, <span style="color:#2b91af;">EventArgs </span>e)
        {
            <span style="color:blue;">string </span>diffrentWebUrl = <span style="color:#a31515;">"http://diffrentWebUrl"</span>;

            <span style="color:blue;">using</span>( <span style="color:blue;">var </span>site = <span style="color:blue;">new </span><span style="color:#2b91af;">SPSite</span>(diffrentWebUrl) )
            {
                <span style="color:blue;">using</span>( <span style="color:blue;">var </span>web = <span style="color:blue;">new </span><span style="color:#2b91af;">SPWeb</span>(diffrentWebUrl) )
                {
                    <span style="color:blue;">using</span>( ik.SharePoint2010.<span style="color:#2b91af;">CustomSPContext</span>.CreateSPCustomContext(web) )
                    {</pre>
<p><span style="color:blue;">using</span>( <span style="color:#2b91af;">DiffrentWebDataContext</span> dc = <span style="color:blue;">new </span><span style="color:#2b91af;">DiffrentWebDataContext</span>(diffrentWebUrl) ){</p>
<pre class="code">                           <span style="color:blue;">var </span>x1 = <span style="color:blue;">from </span>x <span style="color:blue;">in </span>dc.<span style="color:#2b91af;">ListOnDiffrentWeb</span>
                                    <span style="color:blue;">select </span>x;
                           <span style="color:blue;">var </span>x2 = x1.ToList();</pre>
<p>}</p>
<pre class="code">                    }
                }
            }
        }
    }
}</pre>
</blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ikarstein.wordpress.com/1561/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ikarstein.wordpress.com/1561/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ikarstein.wordpress.com/1561/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ikarstein.wordpress.com/1561/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ikarstein.wordpress.com/1561/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ikarstein.wordpress.com/1561/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ikarstein.wordpress.com/1561/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ikarstein.wordpress.com/1561/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ikarstein.wordpress.com/1561/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ikarstein.wordpress.com/1561/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ikarstein.wordpress.com/1561/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ikarstein.wordpress.com/1561/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ikarstein.wordpress.com/1561/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ikarstein.wordpress.com/1561/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ikarstein.wordpress.com&amp;blog=14218320&amp;post=1561&amp;subd=ikarstein&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ikarstein.wordpress.com/2012/01/23/walkaround-for-problems-accessing-a-diffrent-web-by-linq-to-sharepoint-inside-server-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c26cf503c3296c4f8dcc59e1d14792d5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ikarstein</media:title>
		</media:content>
	</item>
		<item>
		<title>Walkthrough: Create simple WCF Web Service for SharePoint 2010 with Visual Studio 2010</title>
		<link>http://ikarstein.wordpress.com/2012/01/21/walkthrough-create-simple-wcf-web-service-for-sharepoint-2010-with-visual-studio-2010/</link>
		<comments>http://ikarstein.wordpress.com/2012/01/21/walkthrough-create-simple-wcf-web-service-for-sharepoint-2010-with-visual-studio-2010/#comments</comments>
		<pubDate>Sat, 21 Jan 2012 08:00:33 +0000</pubDate>
		<dc:creator>ikarstein</dc:creator>
				<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>

		<guid isPermaLink="false">https://ikarstein.wordpress.com/?p=1555</guid>
		<description><![CDATA[In this “Walkthrough” I’d like to show you how to create a simple WCF Web Service for SharePoint 2010. This Web Service will provide two methods: Ping =&#62; Just as test. GetUsedEmailAliasses =&#62; This method reports all aliasses used for “E-Mail enabled lists” in SharePoint. Here is the code: http://spwcfwebservicedemo.codeplex.com/ Let’s start. 1. Create a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ikarstein.wordpress.com&amp;blog=14218320&amp;post=1555&amp;subd=ikarstein&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In this “Walkthrough” I’d like to show you how to create a simple WCF Web Service for SharePoint 2010.</p>
<p>This Web Service will provide two methods:</p>
<ul>
<li>Ping =&gt; Just as test.</li>
<li>GetUsedEmailAliasses =&gt; This method reports all aliasses used for “E-Mail enabled lists” in SharePoint.</li>
</ul>
<p>Here is the code: <a href="http://spwcfwebservicedemo.codeplex.com/">http://spwcfwebservicedemo.codeplex.com/</a></p>
<p>Let’s start.</p>
<p>1. Create a new SharePoint 2010 project in Visual Studio 2010. Use the “Empty Project” template. Name the project “ik.SharePoint2010.SPWCFWebServiceDemo”.</p>
<p><a href="http://ikarstein.files.wordpress.com/2012/01/image.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" src="http://ikarstein.files.wordpress.com/2012/01/image_thumb.png?w=244&#038;h=130" alt="image" width="244" height="130" border="0" /></a></p>
<p>2. In the project creation wizard specify the Central Administration address as deployment location. You need to deploy as “Farm Solution”:</p>
<p><a href="http://ikarstein.files.wordpress.com/2012/01/image1.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" src="http://ikarstein.files.wordpress.com/2012/01/image_thumb1.png?w=244&#038;h=194" alt="image" width="244" height="194" border="0" /></a></p>
<p>3. Now add this Assembly References:</p>
<ul>
<li>Microsoft.SharePoint.Client</li>
<li>Microsoft.SharePoint.Client.Runtime</li>
<li>Microsoft.SharePoint.Client.ServerRuntime<br />
(You may need to locate this assembly in the file system: &#8220;C:\Windows\assembly\GAC_MSIL\Microsoft.SharePoint.Client.ServerRuntime\14.0.0.0__71e9bce111e9429c\Microsoft.SharePoint.Client.ServerRuntime.dll&#8221;)</li>
<li>System.Configuration</li>
<li>System.ServiceModel</li>
<li>System.ServiceModel.Web</li>
</ul>
<blockquote><p>Now my Assembly Reference tree looks like this:</p>
<p>…</p></blockquote>
<p>4. Now map the SharePoint hive folder “Layouts” to your project:</p>
<p>a) Right click your project in the Solution Explorer Pane</p>
<p>b) In the context menu open sub menu “Add” and click “SharePoint Mapped Folder”</p>
<p>c) Select this:</p>
<p><a href="http://ikarstein.files.wordpress.com/2012/01/image2.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" src="http://ikarstein.files.wordpress.com/2012/01/image_thumb2.png?w=191&#038;h=244" alt="image" width="191" height="244" border="0" /></a></p>
<p>d) Click “OK”</p>
<p>5. Create a sub folder named “ik.SharePoint2010.SPWCFWebServiceDemo” in folder “Layouts”</p>
<p>6. Add a new project item of type “Interface” to your project. Name it “ISPWCFSvc.cs”.</p>
<pre class="code"><span style="color:blue;">using </span>System;
<span style="color:blue;">using </span>System.Collections.Generic;
<span style="color:blue;">using </span>System.Linq;
<span style="color:blue;">using </span>System.Runtime.Serialization;
<span style="color:blue;">using </span>System.Runtime.InteropServices;
<span style="color:blue;">using </span>System.ServiceModel;
<span style="color:blue;">using </span>System.ServiceModel.Web;

<span style="color:blue;">namespace </span>ik.SharePoint2010.SPWCFWebServiceDemo
{
    [<span style="color:#2b91af;">ServiceContract</span>(Namespace=<span style="color:#a31515;">"http://schemas.microsoft.com/sharepoint/soap/"</span>),      <span style="color:#2b91af;">Guid</span>(<span style="color:#a31515;">"f01e2ff6-c291-4b8b-a154-cd7059ed4900"</span>)]
    <span style="color:blue;">public interface </span><span style="color:#2b91af;"><span style="color:#2b91af;">ISPWCFSvc </span> </span>{
        [<span style="color:#2b91af;">OperationContract</span>, <span style="color:#2b91af;">WebInvoke</span>(Method = <span style="color:#a31515;">"GET"</span>)]
        <span style="color:#2b91af;">List</span>&lt;<span style="color:blue;">string</span>&gt; GetUsedEmailAliasses();

        [<span style="color:#2b91af;">OperationContract</span>, <span style="color:#2b91af;">WebInvoke</span>(Method = <span style="color:#a31515;">"GET"</span>)]
        <span style="color:blue;">string </span>Ping();
    }
}</pre>
<pre class="code">7. Add a new project item of type “Class” and name it “SPWCFSvc.cs”</pre>
<pre class="code"><span style="color:blue;">using </span>System;
<span style="color:blue;">using </span>System.Collections.Generic;
<span style="color:blue;">using </span>System.Reflection;
<span style="color:blue;">using </span>System.Runtime.InteropServices;
<span style="color:blue;">using </span>System.Security.Permissions;
<span style="color:blue;">using </span>System.ServiceModel;
<span style="color:blue;">using </span>System.ServiceModel.Activation;
<span style="color:blue;">using </span>System.Web;
<span style="color:blue;">using </span>Microsoft.SharePoint;
<span style="color:blue;">using </span>Microsoft.SharePoint.Administration;
<span style="color:blue;">using </span>Microsoft.SharePoint.Client;
<span style="color:blue;">using </span>Microsoft.SharePoint.Security;

<span style="color:blue;">namespace </span>ik.SharePoint2010.SPWCFWebServiceDemo
{
    [<span style="color:#2b91af;">Guid</span>(<span style="color:#a31515;">"ae428eb5-02d1-4e50-8cee-eb3806f16ffd"</span>),
    <span style="color:#2b91af;">ServiceBehavior</span>(Namespace = <span style="color:#a31515;">"http://schemas.microsoft.com/sharepoint/soap/"</span>),
    <span style="color:#2b91af;">AspNetCompatibilityRequirements</span>(RequirementsMode = <span style="color:#2b91af;">AspNetCompatibilityRequirementsMode</span>.Required),
    <span style="color:#2b91af;">ClientRequestServiceBehavior</span>,
    <span style="color:#2b91af;">SharePointPermission</span>(<span style="color:#2b91af;">SecurityAction</span>.Demand, ObjectModel = <span style="color:blue;">true</span>),
    <span style="color:#2b91af;">AspNetHostingPermission</span>(<span style="color:#2b91af;">SecurityAction</span>.Demand, Level = <span style="color:#2b91af;">AspNetHostingPermissionLevel</span>.Minimal)]
    <span style="color:blue;">public class </span><span style="color:#2b91af;"><span style="color:#2b91af;">SPWCFSvc </span></span>: <span style="color:#2b91af;"><span style="color:#2b91af;"><span style="color:#2b91af;">ISPWCFSvc </span></span> </span>{
        [<span style="color:#2b91af;">SharePointPermission</span>(<span style="color:#2b91af;">SecurityAction</span>.Demand, ObjectModel = <span style="color:blue;">true</span>)]
        <span style="color:blue;">public </span><span style="color:#2b91af;">List</span>&lt;<span style="color:blue;">string</span>&gt; GetUsedEmailAliasses()
        {
            <span style="color:#2b91af;">List</span>&lt;<span style="color:blue;">string</span>&gt; l = <span style="color:blue;">new </span><span style="color:#2b91af;">List</span>&lt;<span style="color:blue;">string</span>&gt;();

            <span style="color:#2b91af;">SPProcessIdentity </span>pi = <span style="color:#2b91af;">SPContext</span>.Current.Site.WebApplication.Farm.TimerService.ProcessIdentity;
            <span style="color:blue;">string </span>userName = pi.Username;
            <span style="color:blue;">object </span>configDB = pi.GetType().GetProperty(<span style="color:#a31515;">"ConfigurationDatabase"</span>, <span style="color:#2b91af;">BindingFlags</span>.Instance | <span style="color:#2b91af;">BindingFlags</span>.NonPublic).GetValue(pi, <span style="color:blue;">null</span>);
            <span style="color:#2b91af;">SPServer </span>server = (<span style="color:#2b91af;">SPServer</span>)configDB.GetType().GetProperty(<span style="color:#a31515;">"Server"</span>).GetValue(configDB, <span style="color:blue;">null</span>);
            <span style="color:blue;">string </span>dbName = (<span style="color:blue;">string</span>)configDB.GetType().GetProperty(<span style="color:#a31515;">"Name"</span>).GetValue(configDB, <span style="color:blue;">null</span>);
            <span style="color:blue;">string </span>serverName = server.Name;

            <span style="color:#2b91af;">SPSecurity</span>.RunWithElevatedPrivileges(() =&gt;
            {
                System.Data.SqlClient.<span style="color:#2b91af;">SqlConnection </span>s = <span style="color:blue;">new </span>System.Data.SqlClient.<span style="color:#2b91af;">SqlConnection</span>(<span style="color:blue;">new </span>System.Data.SqlClient.<span style="color:#2b91af;">SqlConnectionStringBuilder </span>{
                    DataSource = serverName,
                    InitialCatalog = dbName,
                    IntegratedSecurity = <span style="color:blue;">true </span>}.ConnectionString);

                <span style="color:#2b91af;">SPConfigDBDataContext </span>dc = <span style="color:blue;">new </span><span style="color:#2b91af;">SPConfigDBDataContext</span>(s);

                <span style="color:blue;">foreach</span>( <span style="color:blue;">var </span>item <span style="color:blue;">in </span>dc.EmailEnabledLists )
                {
                    l.Add(item.Alias);
                }
            });

            <span style="color:blue;">return </span>l;
        }

        [<span style="color:#2b91af;">SharePointPermission</span>(<span style="color:#2b91af;">SecurityAction</span>.Demand, ObjectModel = <span style="color:blue;">true</span>)]
        <span style="color:blue;">public string </span>Ping()
        {
            <span style="color:blue;">return </span><span style="color:#a31515;">"Pong"</span>;
        }
    }
}</pre>
<div>8. Now add a new “Text File” project item and name it “spwcfsvc.svc”</div>
<blockquote>
<pre class="code"><span style="background:yellow;">&lt;%</span><span style="color:blue;"> @</span><span style="color:maroon;">ServiceHost </span><span style="color:red;">Service</span><span style="color:blue;">="$SharePoint.Type.ae428eb5-02d1-4e50-8cee-eb3806f16ffd.AssemblyQualifiedName$" </span><span style="color:red;">Factory</span><span style="color:blue;">="Microsoft.SharePoint.Client.Services.MultipleBaseAddressWebServiceHostFactory, Microsoft.SharePoint.Client.ServerRuntime, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"</span><span style="background:yellow;">%&gt;</span></pre>
</blockquote>
<blockquote><p>Here we use an existing service factory of SharePoint that will handle the service instanciation for us.</p></blockquote>
<blockquote><p>In this file we use the token replacement functionality of Visual Studio 2010 for SharePoint 2010 development. We like to replace the token “$SharePoint.Type.ae428eb5-02d1-4e50-8cee-eb3806f16ffd.AssemblyQualifiedName$” through the “real” full qualified name during package creation.</p>
<p>By default *.svc files will not be processed by the token replacement engine. We need to specify *.svc files for that build step. Therefore we edit the C# project file in notepad.  Insert this line as shown in the screenshot:</p>
<p>&lt;TokenReplacementFileExtensions&gt;svc&lt;/TokenReplacementFileExtensions&gt;</p>
<p><a href="http://ikarstein.files.wordpress.com/2012/01/image3.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="image" src="http://ikarstein.files.wordpress.com/2012/01/image_thumb3.png?w=364&#038;h=229" alt="image" width="364" height="229" border="0" /></a></p>
<p>After deploying the solution you may have a look into the SharePoint hive and look into “spwcfsvc.svc”</p></blockquote>
<p>9. Now Copy &amp; Paste this file into the you folder in the mapped Layouts folder:</p>
<blockquote><p>C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI\web.config</p></blockquote>
<p>10. You need to edit this file. Remove the complete “&lt;system.web&gt;” tag and the (four) “location” tags at the beginning of the <span style="text-decoration:underline;">copied</span> file! – The configuration settings in the copied &amp; modified web.config file will manage the diffrent authentication methods for us. This works by using the class attribute “<span style="color:#2b91af;">ClientRequestServiceBehavior</span>” in the code above.</p>
<p>11. Now we add a “Linq to SQL” connection to the SharePoint Configuration database. <strong>Be sure only to read this DB!!!</strong></p>
<p>12. Add a new project item of type “Linq to SQL Classes” to the project. Name it “SPConfigDB.dbml”</p>
<blockquote><p><a href="http://ikarstein.files.wordpress.com/2012/01/image4.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" src="http://ikarstein.files.wordpress.com/2012/01/image_thumb4.png?w=244&#038;h=170" alt="image" width="244" height="170" border="0" /></a></p></blockquote>
<p>13. In the Server Explorer of Visual Studio 2010 create a connection to the SharePoint Configuration DB of your development environment. – After that, open the connection, open the “Table” node and select “EmailEnabledLists”.</p>
<blockquote><p><a href="http://ikarstein.files.wordpress.com/2012/01/image5.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" src="http://ikarstein.files.wordpress.com/2012/01/image_thumb5.png?w=135&#038;h=244" alt="image" width="135" height="244" border="0" /></a></p></blockquote>
<p>14. Drag the “EmailEnabledLists” node to the “SPConfigDB.dbml” canvas. – It looks like this:</p>
<blockquote><p><a href="http://ikarstein.files.wordpress.com/2012/01/image6.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" src="http://ikarstein.files.wordpress.com/2012/01/image_thumb6.png?w=244&#038;h=116" alt="image" width="244" height="116" border="0" /></a></p></blockquote>
<p>15. In the Properties Pane set the “Context Namespace” property to “ik.SharePoint2010.SPWCFWebServiceDemo”. (If you do not see this properties like in the screenshot below you need to right click the “SPConfigDB.dbml” project item node in the Solution explorer and click “Properties” in the context menu.</p>
<blockquote><p><a href="http://ikarstein.files.wordpress.com/2012/01/image7.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" src="http://ikarstein.files.wordpress.com/2012/01/image_thumb7.png?w=244&#038;h=199" alt="image" width="244" height="199" border="0" /></a></p></blockquote>
<p>16. Now you should be able to compile and deploy your project.</p>
<p>17. Edit the startup settings. In the “Debug” select “Start browser with URL” and enter there the URL to your webservice: “http://&lt;central-administration-url-and-port&gt;/_layouts/ik.sharepoint2010.spwcfwebservicedemo/spwcf.svc/GetUsedEmailAliasses”</p>
<blockquote><p><a href="http://ikarstein.files.wordpress.com/2012/01/snaghtml4b070d4.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="SNAGHTML4b070d4" src="http://ikarstein.files.wordpress.com/2012/01/snaghtml4b070d4_thumb.png?w=244&#038;h=107" alt="SNAGHTML4b070d4" width="244" height="107" border="0" /></a></p></blockquote>
<p>18. Now start the project. You get something like this:</p>
<blockquote><p><a href="http://ikarstein.files.wordpress.com/2012/01/snaghtml4acbe57.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="SNAGHTML4acbe57" src="http://ikarstein.files.wordpress.com/2012/01/snaghtml4acbe57_thumb.png?w=244&#038;h=77" alt="SNAGHTML4acbe57" width="244" height="77" border="0" /></a></p>
<p>I’ve only one e-mail enabled list or library in my current dev system.</p></blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ikarstein.wordpress.com/1555/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ikarstein.wordpress.com/1555/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ikarstein.wordpress.com/1555/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ikarstein.wordpress.com/1555/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ikarstein.wordpress.com/1555/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ikarstein.wordpress.com/1555/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ikarstein.wordpress.com/1555/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ikarstein.wordpress.com/1555/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ikarstein.wordpress.com/1555/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ikarstein.wordpress.com/1555/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ikarstein.wordpress.com/1555/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ikarstein.wordpress.com/1555/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ikarstein.wordpress.com/1555/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ikarstein.wordpress.com/1555/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ikarstein.wordpress.com&amp;blog=14218320&amp;post=1555&amp;subd=ikarstein&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ikarstein.wordpress.com/2012/01/21/walkthrough-create-simple-wcf-web-service-for-sharepoint-2010-with-visual-studio-2010/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c26cf503c3296c4f8dcc59e1d14792d5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ikarstein</media:title>
		</media:content>

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

		<media:content url="http://ikarstein.files.wordpress.com/2012/01/image_thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ikarstein.files.wordpress.com/2012/01/image_thumb2.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ikarstein.files.wordpress.com/2012/01/image_thumb3.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ikarstein.files.wordpress.com/2012/01/image_thumb4.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ikarstein.files.wordpress.com/2012/01/image_thumb5.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ikarstein.files.wordpress.com/2012/01/image_thumb6.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ikarstein.files.wordpress.com/2012/01/image_thumb7.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ikarstein.files.wordpress.com/2012/01/snaghtml4b070d4_thumb.png" medium="image">
			<media:title type="html">SNAGHTML4b070d4</media:title>
		</media:content>

		<media:content url="http://ikarstein.files.wordpress.com/2012/01/snaghtml4acbe57_thumb.png" medium="image">
			<media:title type="html">SNAGHTML4acbe57</media:title>
		</media:content>
	</item>
		<item>
		<title>Migration Issue &#8211; Error in Upgrade Log: &#8220;Exception thrown while applying the global template to the web with URL &quot;(unknown)&quot; (Id: &#8221;) from site with URL &quot;(unknown)&quot; (Id: &#8221;). Adding web to the exceptions list. Exception: System.IO.FileNotFoundException: The site with the id could not be found.&#8221;</title>
		<link>http://ikarstein.wordpress.com/2012/01/20/migration-issue-error-in-upgrade-log-exception-thrown-while-applying-the-global-template-to-the-web-with-url-unknown-id-from-site-with-url-unknown-id/</link>
		<comments>http://ikarstein.wordpress.com/2012/01/20/migration-issue-error-in-upgrade-log-exception-thrown-while-applying-the-global-template-to-the-web-with-url-unknown-id-from-site-with-url-unknown-id/#comments</comments>
		<pubDate>Fri, 20 Jan 2012 15:00:57 +0000</pubDate>
		<dc:creator>ikarstein</dc:creator>
				<category><![CDATA[Migration]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Migration;SharePoint 2010]]></category>

		<guid isPermaLink="false">https://ikarstein.wordpress.com/?p=1526</guid>
		<description><![CDATA[In my curent migration project I got this error in an Content Database upgrade log on the new SharePoint 2010 farm: Template MPS#0: Exception thrown while applying the global template to the web with URL &#8220;(unknown)&#8221; (Id: &#8216;a98475b1-385d-4ac6-bc1b-226f2e35a27e&#8217;) from site with URL &#8220;(unknown)&#8221; (Id: &#8217;3e800bc3-296f-47f0-a04d-b1e4ae385cb8&#8242;). Adding web to the exceptions list. Exception: System.IO.FileNotFoundException: The site [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ikarstein.wordpress.com&amp;blog=14218320&amp;post=1526&amp;subd=ikarstein&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In my curent migration project I got this error in an Content Database upgrade log on the new SharePoint 2010 farm:</p>
<blockquote><p>Template MPS#0: Exception thrown while applying the global template to the web with URL &#8220;(unknown)&#8221; (Id: &#8216;a98475b1-385d-4ac6-bc1b-226f2e35a27e&#8217;) from site with URL &#8220;(unknown)&#8221; (Id: &#8217;3e800bc3-296f-47f0-a04d-b1e4ae385cb8&#8242;). Adding web to the exceptions list. Exception: System.IO.FileNotFoundException: The site with the id 3e800bc3-296f-47f0-a04d-b1e4ae385cb8 could not be found.</p>
<p>Template <em>&lt;templateId&gt;</em>: Exception thrown while applying the global template to the web with URL &#8220;(unknown)&#8221; (Id: &#8216;<em>&lt;guid&gt;</em>&#8216;) from site with URL &#8220;(unknown)&#8221; (Id: &#8216;&lt;guid&gt;&#8217;). Adding web to the exceptions list. Exception: System.IO.FileNotFoundException: The site with the id <em>&lt;guid&gt;</em> could not be found.</p></blockquote>
<p>This is a piece of text of the upgrade log file:</p>
<blockquote>
<div style="border-bottom:#7f7f7f 1px solid;border-left:#7f7f7f 1px solid;font-size:1.2em;overflow:auto;border-top:#7f7f7f 1px solid;border-right:#aaaaaa 1px solid;padding:10px;">
<pre> 
[ScriptEditor] [SPWebTemplateSequence] [DEBUG] [12/8/2011 7:04:24 PM]: Template MPS#0: Exception thrown while applying the global template to the web with URL "(unknown)" (Id: 'e5c2cec5-7d3a-483b-ac55-0ca60a7ba432') from site with URL "(unknown)" (Id: '3e800bc3-296f-47f0-a04d-b1e4ae385cb8'). Adding web to the exceptions list. Exception: System.IO.FileNotFoundException: The site with the id 3e800bc3-296f-47f0-a04d-b1e4ae385cb8 could not be found.
   at Microsoft.SharePoint.SPSite..ctor(Guid id, SPFarm farm, SPUrlZone zone, SPUserToken userToken)
   at Microsoft.SharePoint.SPSite..ctor(Guid id)
   at Microsoft.SharePoint.Upgrade.SPWebTemplateSequence.ApplyGlobalTemplateToWebs(List`1 lstwebinfoToUpgrade, List`1&amp; lstwebinfoExceptions)
[ScriptEditor] [SPWebTemplateSequence] [DEBUG] [12/8/2011 7:04:24 PM]: Template MPS#0: Exception thrown while applying the global template to the web with URL "(unknown)" (Id: 'a98475b1-385d-4ac6-bc1b-226f2e35a27e') from site with URL "(unknown)" (Id: '3e800bc3-296f-47f0-a04d-b1e4ae385cb8'). Adding web to the exceptions list. Exception: System.IO.FileNotFoundException: The site with the id 3e800bc3-296f-47f0-a04d-b1e4ae385cb8 could not be found.
   at Microsoft.SharePoint.SPSite..ctor(Guid id, SPFarm farm, SPUrlZone zone, SPUserToken userToken)
   at Microsoft.SharePoint.SPSite..ctor(Guid id)
   at Microsoft.SharePoint.Upgrade.SPWebTemplateSequence.ApplyGlobalTemplateToWebs(List`1 lstwebinfoToUpgrade, List`1&amp; lstwebinfoExceptions)
[ScriptEditor] [SPWebTemplateSequence] [DEBUG] [12/8/2011 7:04:24 PM]: Template MPS#0: Exception thrown while applying the global template to the web with URL "(unknown)" (Id: '71f74b12-8ba9-4483-8554-38894878a620') from site with URL "(unknown)" (Id: '3e800bc3-296f-47f0-a04d-b1e4ae385cb8'). Adding web to the exceptions list. Exception: System.IO.FileNotFoundException: The site with the id 3e800bc3-296f-47f0-a04d-b1e4ae385cb8 could not be found.
   at Microsoft.SharePoint.SPSite..ctor(Guid id, SPFarm farm, SPUrlZone zone, SPUserToken userToken)
   at Microsoft.SharePoint.SPSite..ctor(Guid id)
   at Microsoft.SharePoint.Upgrade.SPWebTemplateSequence.ApplyGlobalTemplateToWebs(List`1 lstwebinfoToUpgrade, List`1&amp; lstwebinfoExceptions)
[ScriptEditor] [SPWebTemplateSequence] [DEBUG] [12/8/2011 7:04:24 PM]: Template MPS#0: Exception thrown while applying the global template to the web with URL "(unknown)" (Id: '48b3e9f9-e9fa-4981-93ce-3dec85dc3ee7') from site with URL "(unknown)" (Id: '3e800bc3-296f-47f0-a04d-b1e4ae385cb8'). Adding web to the exceptions list. Exception: System.IO.FileNotFoundException: The site with the id 3e800bc3-296f-47f0-a04d-b1e4ae385cb8 could not be found.
   at Microsoft.SharePoint.SPSite..ctor(Guid id, SPFarm farm, SPUrlZone zone, SPUserToken userToken)
   at Microsoft.SharePoint.SPSite..ctor(Guid id)
   at Microsoft.SharePoint.Upgrade.SPWebTemplateSequence.ApplyGlobalTemplateToWebs(List`1 lstwebinfoToUpgrade, List`1&amp; lstwebinfoExceptions)
[ScriptEditor] [SPWebTemplateSequence] [DEBUG] [12/8/2011 7:04:24 PM]: Template MPS#0: Exception thrown while applying the global template to the web with URL "(unknown)" (Id: '75ddba70-768c-435e-96a1-4491c61083b6') from site with URL "(unknown)" (Id: '3e800bc3-296f-47f0-a04d-b1e4ae385cb8'). Adding web to the exceptions list. Exception: System.IO.FileNotFoundException: The site with the id 3e800bc3-296f-47f0-a04d-b1e4ae385cb8 could not be found.
   at Microsoft.SharePoint.SPSite..ctor(Guid id, SPFarm farm, SPUrlZone zone, SPUserToken userToken)
   at Microsoft.SharePoint.SPSite..ctor(Guid id)
   at Microsoft.SharePoint.Upgrade.SPWebTemplateSequence.ApplyGlobalTemplateToWebs(List`1 lstwebinfoToUpgrade, List`1&amp; lstwebinfoExceptions)
[ScriptEditor] [SPWebTemplateSequence] [DEBUG] [12/8/2011 7:04:24 PM]: Template MPS#0: Exception thrown while applying the global template to the web with URL "(unknown)" (Id: 'ebb027c8-56ec-4526-9962-514ef0b33f7a') from site with URL "(unknown)" (Id: '3e800bc3-296f-47f0-a04d-b1e4ae385cb8'). Adding web to the exceptions list. Exception: System.IO.FileNotFoundException: The site with the id 3e800bc3-296f-47f0-a04d-b1e4ae385cb8 could not be found.
   at Microsoft.SharePoint.SPSite..ctor(Guid id, SPFarm farm, SPUrlZone zone, SPUserToken userToken)
   at Microsoft.SharePoint.SPSite..ctor(Guid id)
   at Microsoft.SharePoint.Upgrade.SPWebTemplateSequence.ApplyGlobalTemplateToWebs(List`1 lstwebinfoToUpgrade, List`1&amp; lstwebinfoExceptions)
[ScriptEditor] [SPWebTemplateSequence] [DEBUG] [12/8/2011 7:04:24 PM]: Template MPS#0: Exception thrown while applying the global template to the web with URL "(unknown)" (Id: 'bedbd386-98cd-4070-ab96-6dc5a58c2908') from site with URL "(unknown)" (Id: '3e800bc3-296f-47f0-a04d-b1e4ae385cb8'). Adding web to the exceptions list. Exception: System.IO.FileNotFoundException: The site with the id 3e800bc3-296f-47f0-a04d-b1e4ae385cb8 could not be found.
   at Microsoft.SharePoint.SPSite..ctor(Guid id, SPFarm farm, SPUrlZone zone, SPUserToken userToken)
   at Microsoft.SharePoint.SPSite..ctor(Guid id)
   at Microsoft.SharePoint.Upgrade.SPWebTemplateSequence.ApplyGlobalTemplateToWebs(List`1 lstwebinfoToUpgrade, List`1&amp; lstwebinfoExceptions)
[ScriptEditor] [SPWebTemplateSequence] [DEBUG] [12/8/2011 7:04:24 PM]: Template MPS#0: Exception thrown while applying the global template to the web with URL "(unknown)" (Id: '22a173d5-68e3-40a4-b749-71f5c26a57d7') from site with URL "(unknown)" (Id: '3e800bc3-296f-47f0-a04d-b1e4ae385cb8'). Adding web to the exceptions list. Exception: System.IO.FileNotFoundException: The site with the id 3e800bc3-296f-47f0-a04d-b1e4ae385cb8 could not be found.
   at Microsoft.SharePoint.SPSite..ctor(Guid id, SPFarm farm, SPUrlZone zone, SPUserToken userToken)
   at Microsoft.SharePoint.SPSite..ctor(Guid id)
   at Microsoft.SharePoint.Upgrade.SPWebTemplateSequence.ApplyGlobalTemplateToWebs(List`1 lstwebinfoToUpgrade, List`1&amp; lstwebinfoExceptions)
[ScriptEditor] [SPWebTemplateSequence] [DEBUG] [12/8/2011 7:04:24 PM]: Template MPS#0: Exception thrown while applying the global template to the web with URL "(unknown)" (Id: 'b4e93fdf-9412-44ad-9402-77f215534d88') from site with URL "(unknown)" (Id: '3e800bc3-296f-47f0-a04d-b1e4ae385cb8'). Adding web to the exceptions list. Exception: System.IO.FileNotFoundException: The site with the id 3e800bc3-296f-47f0-a04d-b1e4ae385cb8 could not be found.
   at Microsoft.SharePoint.SPSite..ctor(Guid id, SPFarm farm, SPUrlZone zone, SPUserToken userToken)
   at Microsoft.SharePoint.SPSite..ctor(Guid id)
   at Microsoft.SharePoint.Upgrade.SPWebTemplateSequence.ApplyGlobalTemplateToWebs(List`1 lstwebinfoToUpgrade, List`1&amp; lstwebinfoExceptions)
[ScriptEditor] [SPWebTemplateSequence] [DEBUG] [12/8/2011 7:04:24 PM]: Template MPS#0: Exception thrown while applying the global template to the web with URL "(unknown)" (Id: 'be229958-2680-4d85-ba72-79f036ab075a') from site with URL "(unknown)" (Id: '3e800bc3-296f-47f0-a04d-b1e4ae385cb8'). Adding web to the exceptions list. Exception: System.IO.FileNotFoundException: The site with the id 3e800bc3-296f-47f0-a04d-b1e4ae385cb8 could not be found.
   at Microsoft.SharePoint.SPSite..ctor(Guid id, SPFarm farm, SPUrlZone zone, SPUserToken userToken)
   at Microsoft.SharePoint.SPSite..ctor(Guid id)
   at Microsoft.SharePoint.Upgrade.SPWebTemplateSequence.ApplyGlobalTemplateToWebs(List`1 lstwebinfoToUpgrade, List`1&amp; lstwebinfoExceptions)
[ScriptEditor] [SPWebTemplateSequence] [DEBUG] [12/8/2011 7:04:24 PM]: Template MPS#0: Exception thrown while applying the global template to the web with URL "(unknown)" (Id: '79ae9a08-845b-4502-affe-a836b7783ae8') from site with URL "(unknown)" (Id: '3e800bc3-296f-47f0-a04d-b1e4ae385cb8'). Adding web to the exceptions list. Exception: System.IO.FileNotFoundException: The site with the id 3e800bc3-296f-47f0-a04d-b1e4ae385cb8 could not be found.
   at Microsoft.SharePoint.SPSite..ctor(Guid id, SPFarm farm, SPUrlZone zone, SPUserToken userToken)
   at Microsoft.SharePoint.SPSite..ctor(Guid id)
   at Microsoft.SharePoint.Upgrade.SPWebTemplateSequence.ApplyGlobalTemplateToWebs(List`1 lstwebinfoToUpgrade, List`1&amp; lstwebinfoExceptions)
[ScriptEditor] [SPWebTemplateSequence] [DEBUG] [12/8/2011 7:04:24 PM]: Template MPS#0: Exception thrown while applying the global template to the web with URL "(unknown)" (Id: '27a97c8e-3652-4fe2-9fe2-ca8d47eca28d') from site with URL "(unknown)" (Id: '3e800bc3-296f-47f0-a04d-b1e4ae385cb8'). Adding web to the exceptions list. Exception: System.IO.FileNotFoundException: The site with the id 3e800bc3-296f-47f0-a04d-b1e4ae385cb8 could not be found.
   at Microsoft.SharePoint.SPSite..ctor(Guid id, SPFarm farm, SPUrlZone zone, SPUserToken userToken)
   at Microsoft.SharePoint.SPSite..ctor(Guid id)
   at Microsoft.SharePoint.Upgrade.SPWebTemplateSequence.ApplyGlobalTemplateToWebs(List`1 lstwebinfoToUpgrade, List`1&amp; lstwebinfoExceptions)
[ScriptEditor] [SPWebTemplateSequence] [DEBUG] [12/8/2011 7:04:24 PM]: Template MPS#0: Exception thrown while applying the global template to the web with URL "(unknown)" (Id: '4d755906-d3ca-4c23-b505-d7f0f5ef0a2c') from site with URL "(unknown)" (Id: '3e800bc3-296f-47f0-a04d-b1e4ae385cb8'). Adding web to the exceptions list. Exception: System.IO.FileNotFoundException: The site with the id 3e800bc3-296f-47f0-a04d-b1e4ae385cb8 could not be found.
   at Microsoft.SharePoint.SPSite..ctor(Guid id, SPFarm farm, SPUrlZone zone, SPUserToken userToken)
   at Microsoft.SharePoint.SPSite..ctor(Guid id)
   at Microsoft.SharePoint.Upgrade.SPWebTemplateSequence.ApplyGlobalTemplateToWebs(List`1 lstwebinfoToUpgrade, List`1&amp; lstwebinfoExceptions)
[ScriptEditor] [SPWebTemplateSequence] [DEBUG] [12/8/2011 7:04:24 PM]: Template MPS#0: Exception thrown while applying the global template to the web with URL "(unknown)" (Id: '8cc79a95-c567-4b8d-902e-ed944d64d84d') from site with URL "(unknown)" (Id: '3e800bc3-296f-47f0-a04d-b1e4ae385cb8'). Adding web to the exceptions list. Exception: System.IO.FileNotFoundException: The site with the id 3e800bc3-296f-47f0-a04d-b1e4ae385cb8 could not be found.
   at Microsoft.SharePoint.SPSite..ctor(Guid id, SPFarm farm, SPUrlZone zone, SPUserToken userToken)
   at Microsoft.SharePoint.SPSite..ctor(Guid id)
   at Microsoft.SharePoint.Upgrade.SPWebTemplateSequence.ApplyGlobalTemplateToWebs(List`1 lstwebinfoToUpgrade, List`1&amp; lstwebinfoExceptions)
[ScriptEditor] [SPWebTemplateSequence] [DEBUG] [12/8/2011 7:04:24 PM]: Template MPS#0: Exception thrown while applying the global template to the web with URL "(unknown)" (Id: 'ec8f2991-c91a-41af-84be-fef8597035a2') from site with URL "(unknown)" (Id: '3e800bc3-296f-47f0-a04d-b1e4ae385cb8'). Adding web to the exceptions list. Exception: System.IO.FileNotFoundException: The site with the id 3e800bc3-296f-47f0-a04d-b1e4ae385cb8 could not be found.
   at Microsoft.SharePoint.SPSite..ctor(Guid id, SPFarm farm, SPUrlZone zone, SPUserToken userToken)
   at Microsoft.SharePoint.SPSite..ctor(Guid id)
   at Microsoft.SharePoint.Upgrade.SPWebTemplateSequence.ApplyGlobalTemplateToWebs(List`1 lstwebinfoToUpgrade, List`1&amp; lstwebinfoExceptions)</pre>
</div>
</blockquote>
<p><strong><span style="text-decoration:underline;">Solution</span></strong> in my case:</p>
<blockquote><p>There was an <strong>incorrect managed path</strong> in the web applications configured. The managed path was available, but set to “Wildcard inclusion” in the new farm (2010) instead of “Explicit inclusion” as in the old farm (2007).</p></blockquote>
<p>I did remove the managed path and added it again with the correct setting. After that I had to re-attach the content database. The error was gone.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ikarstein.wordpress.com/1526/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ikarstein.wordpress.com/1526/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ikarstein.wordpress.com/1526/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ikarstein.wordpress.com/1526/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ikarstein.wordpress.com/1526/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ikarstein.wordpress.com/1526/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ikarstein.wordpress.com/1526/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ikarstein.wordpress.com/1526/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ikarstein.wordpress.com/1526/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ikarstein.wordpress.com/1526/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ikarstein.wordpress.com/1526/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ikarstein.wordpress.com/1526/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ikarstein.wordpress.com/1526/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ikarstein.wordpress.com/1526/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ikarstein.wordpress.com&amp;blog=14218320&amp;post=1526&amp;subd=ikarstein&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ikarstein.wordpress.com/2012/01/20/migration-issue-error-in-upgrade-log-exception-thrown-while-applying-the-global-template-to-the-web-with-url-unknown-id-from-site-with-url-unknown-id/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c26cf503c3296c4f8dcc59e1d14792d5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ikarstein</media:title>
		</media:content>
	</item>
		<item>
		<title>Exclude Asset Library from search results by modifying search scopes</title>
		<link>http://ikarstein.wordpress.com/2011/11/28/exclude-asset-library-from-search-results-by-modifying-search-scopes/</link>
		<comments>http://ikarstein.wordpress.com/2011/11/28/exclude-asset-library-from-search-results-by-modifying-search-scopes/#comments</comments>
		<pubDate>Mon, 28 Nov 2011 18:30:10 +0000</pubDate>
		<dc:creator>ikarstein</dc:creator>
				<category><![CDATA[SharePoint 2010]]></category>

		<guid isPermaLink="false">https://ikarstein.wordpress.com/?p=1518</guid>
		<description><![CDATA[It’s possible to exclude SharePoint Lists from search results by excluding their types in the search scope definition. Therefore you need to define an search scope rule based on a “property”. You have to use “contentclass” and a value. There are much lists of the possible values out in the web. Here is mine Value [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ikarstein.wordpress.com&amp;blog=14218320&amp;post=1518&amp;subd=ikarstein&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It’s possible to exclude SharePoint Lists from search results by excluding their types in the search scope definition.</p>
<p>Therefore you need to define an search scope rule based on a “property”. You have to use “contentclass” and a value.</p>
<p>There are much lists of the possible values out in the web. </p>
<p>Here is mine <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  </p>
<table border="0" cellspacing="0" cellpadding="2" width="452">
<tbody>
<tr>
<td valign="top" width="278"><strong>Value</strong></td>
<td valign="top" width="172"><strong>Description</strong></td>
</tr>
<tr>
<td valign="top" width="278">STS_Web</td>
<td valign="top" width="172">Site</td>
</tr>
<tr>
<td valign="top" width="278">STS_List</td>
<td valign="top" width="172">Custom List</td>
</tr>
<tr>
<td valign="top" width="278">STS_ListItem</td>
<td valign="top" width="172">Custom List item</td>
</tr>
<tr>
<td valign="top" width="278">STS_List_DocumentLibrary</td>
<td valign="top" width="172">Document Library</td>
</tr>
<tr>
<td valign="top" width="278">STS_ListItem_DocumentLibrary</td>
<td valign="top" width="172">Document Libary item</td>
</tr>
<tr>
<td valign="top" width="278">STS_List_Links</td>
<td valign="top" width="172">Link List</td>
</tr>
<tr>
<td valign="top" width="278">STS_ListItem_Links</td>
<td valign="top" width="172">Link List item</td>
</tr>
<tr>
<td valign="top" width="278">STS_List_Events</td>
<td valign="top" width="172">Event List</td>
</tr>
<tr>
<td valign="top" width="278">STS_ListItem_Events</td>
<td valign="top" width="172">Event List item</td>
</tr>
<tr>
<td valign="top" width="278">STS_List_Tasks</td>
<td valign="top" width="172">Task List</td>
</tr>
<tr>
<td valign="top" width="278">STS_ListItem_Tasks</td>
<td valign="top" width="172">Task List item</td>
</tr>
<tr>
<td valign="top" width="278">STS_List_Contacts</td>
<td valign="top" width="172">Contact List</td>
</tr>
<tr>
<td valign="top" width="278">STS_ListItem_Contacts</td>
<td valign="top" width="172">Contact List item</td>
</tr>
<tr>
<td valign="top" width="278">STS_List_Announcements</td>
<td valign="top" width="172">Announcements List</td>
</tr>
<tr>
<td valign="top" width="278">STS_ListItem_Announcements</td>
<td valign="top" width="172">Announcements List item</td>
</tr>
<tr>
<td valign="top" width="278">STS_List_DiscussionBoard</td>
<td valign="top" width="172">Discussion Board</td>
</tr>
<tr>
<td valign="top" width="278">STS_ListItem_DiscussionBoard</td>
<td valign="top" width="172">Discussion Board item</td>
</tr>
<tr>
<td valign="top" width="278">STS_List_GanttTasks</td>
<td valign="top" width="172">Gantt Task List</td>
</tr>
<tr>
<td valign="top" width="278">STS_ListItem_GanttTasks</td>
<td valign="top" width="172">Gantt Task item</td>
</tr>
<tr>
<td valign="top" width="278">STS_List_IssueTracking</td>
<td valign="top" width="172">Issue Tracking list</td>
</tr>
<tr>
<td valign="top" width="278">STS_ListItem_IssueTracking</td>
<td valign="top" width="172">Issue Tracking item</td>
</tr>
<tr>
<td valign="top" width="278">STS_List_Survey</td>
<td valign="top" width="172">Survey</td>
</tr>
<tr>
<td valign="top" width="278">STS_ListItem_Survey</td>
<td valign="top" width="172">Survey item</td>
</tr>
<tr>
<td valign="top" width="278">STS_List_PictureLibrary</td>
<td valign="top" width="172">Picture Library</td>
</tr>
<tr>
<td valign="top" width="278">STS_ListItem_PictureLibrary</td>
<td valign="top" width="172">Picture Library Item</td>
</tr>
<tr>
<td valign="top" width="278">STS_List_WebPageLibrary</td>
<td valign="top" width="172">Web Page Library</td>
</tr>
<tr>
<td valign="top" width="278">STS_ListItem_WebPageLibrary</td>
<td valign="top" width="172">Web Page Library Item</td>
</tr>
<tr>
<td valign="top" width="278">STS_List_XMLForm</td>
<td valign="top" width="172">(InfoPath) Form Library</td>
</tr>
<tr>
<td valign="top" width="278">STS_ListItem_XMLForm</td>
<td valign="top" width="172">(InfoPath) Form Library item</td>
</tr>
<tr>
<td valign="top" width="278"><font color="#ff0000">STS_List_850</font></td>
<td valign="top" width="172"><font color="#ff0000">Page Library</font></td>
</tr>
<tr>
<td valign="top" width="278"><font color="#ff0000">STS_ListItem_850</font></td>
<td valign="top" width="172"><font color="#ff0000">Page Library item</font></td>
</tr>
<tr>
<td valign="top" width="278">urn:content-class:SPSSearchQuery</td>
<td valign="top" width="172">Search Query</td>
</tr>
<tr>
<td valign="top" width="278">urn:content-class:SPSListing:News</td>
<td valign="top" width="172">News Listing</td>
</tr>
<tr>
<td valign="top" width="278">urn:content-class:SPSPeople</td>
<td valign="top" width="172">People</td>
</tr>
<tr>
<td valign="top" width="278">urn:content-classes:SPSCategory</td>
<td valign="top" width="172">Category</td>
</tr>
<tr>
<td valign="top" width="278">urn:content-classes:SPSListing</td>
<td valign="top" width="172">Listing</td>
</tr>
<tr>
<td valign="top" width="278">urn:content-classes:SPSPersonListing</td>
<td valign="top" width="172">Person Listing</td>
</tr>
<tr>
<td valign="top" width="278">urn:content-classes:SPSTextListing</td>
<td valign="top" width="172">Text Listing</td>
</tr>
<tr>
<td valign="top" width="278">urn:content-classes:SPSSiteListing</td>
<td valign="top" width="172">Site Listing</td>
</tr>
<tr>
<td valign="top" width="278">urn:content-classes:SPSSiteRegistry</td>
<td valign="top" width="172">Site Registry Listing</td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<p>You can generally exclude list items from search by using the value “STS_ListItem_PictureLibrary” for the property “contentclass”. </p>
<p>But how to exclude items or lists of type “Asset Library” which is also a standard list template like “Document Library”, “Picture Library”, “Calendar List”, … and “Page Library” which has as code (850) as name. (Marked red in the list above.)</p>
<p>I checked the 14 hive and figured out the 850 is the list template ID of “Page Library”. And the list template ID of “Asset Library” is 851.</p>
<p>So I used the following query in the search box: “<font size="3" face="Courier New">(scope:&quot;All Websites&quot;) (contentclass:STS_List_851)</font>”</p>
<p>I created a new search scope exclude rule on the site collection using “STS_List_851” in it worked! Now there are no more Asset Libary links in the search result. If you you “STS_ListItem_851” you can exclude Asset Library Litems.</p>
<p>(No screenshots today, sorry!) </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ikarstein.wordpress.com/1518/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ikarstein.wordpress.com/1518/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ikarstein.wordpress.com/1518/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ikarstein.wordpress.com/1518/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ikarstein.wordpress.com/1518/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ikarstein.wordpress.com/1518/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ikarstein.wordpress.com/1518/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ikarstein.wordpress.com/1518/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ikarstein.wordpress.com/1518/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ikarstein.wordpress.com/1518/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ikarstein.wordpress.com/1518/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ikarstein.wordpress.com/1518/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ikarstein.wordpress.com/1518/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ikarstein.wordpress.com/1518/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ikarstein.wordpress.com&amp;blog=14218320&amp;post=1518&amp;subd=ikarstein&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ikarstein.wordpress.com/2011/11/28/exclude-asset-library-from-search-results-by-modifying-search-scopes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c26cf503c3296c4f8dcc59e1d14792d5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ikarstein</media:title>
		</media:content>
	</item>
		<item>
		<title>PowerShell Script for Recreating the Server Cache (related to error in Windows Event Log, Event ID 6482: Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchServiceInstance)</title>
		<link>http://ikarstein.wordpress.com/2011/11/04/powershell-script-for-recreating-the-server-cache-related-to-error-in-windows-event-log-event-id-6482-application-server-administration-job-failed-for-service-instance-microsoft-office-server-searc/</link>
		<comments>http://ikarstein.wordpress.com/2011/11/04/powershell-script-for-recreating-the-server-cache-related-to-error-in-windows-event-log-event-id-6482-application-server-administration-job-failed-for-service-instance-microsoft-office-server-searc/#comments</comments>
		<pubDate>Thu, 03 Nov 2011 23:01:40 +0000</pubDate>
		<dc:creator>ikarstein</dc:creator>
				<category><![CDATA[SharePoint 2010]]></category>

		<guid isPermaLink="false">https://ikarstein.wordpress.com/?p=1515</guid>
		<description><![CDATA[Today I’ve had the error: Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchServiceInstance (150CA1DD-02E3-47C0-AA55-005A2927751F). Reason: An update conflict has occurred, and you must re-try this action. The object SearchDataAccessServiceInstance was updated by DOMAIN\spfarm, in the OWSTIMER (5040) process, on machine sps2010.&#160; View the tracing log for more information about the conflict. Technical Support Details:Microsoft.SharePoint.Administration.SPUpdatedConcurrencyException: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ikarstein.wordpress.com&amp;blog=14218320&amp;post=1515&amp;subd=ikarstein&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Today I’ve had the error:</p>
<p>Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchServiceInstance (150CA1DD-02E3-47C0-AA55-005A2927751F).</p>
<blockquote><pre>

Reason: An update conflict has occurred, and you must re-try this action. The object SearchDataAccessServiceInstance was updated by DOMAIN\spfarm, in the OWSTIMER (5040) process, on machine sps2010.&#160; View the tracing log for more information about the conflict.

Technical Support Details:Microsoft.SharePoint.Administration.SPUpdatedConcurrencyException: An update conflict has occurred, and you must re-try this action. The object SearchDataAccessServiceInstance was updated by domain\user, in the OWSTIMER (5040) process, on machine (server name).&#160; View the tracing log for more information about the conflict.
&#160;&#160; at Microsoft.Office.Server.Search.Administration.SearchServiceInstance.Synchronize()
&#160;&#160; at Microsoft.Office.Server.Administration.ApplicationServerJob.ProvisionLocalSharedServiceInstances(Boolean isAdministrationServiceJob)

&#160;
</pre>
</blockquote>
<p>There is a nice article on Jeff DeVerter’s blog: </p>
<ul>
<li><a href="http://www.social-point.com/sharepoint-2010-event-id-6482-application-server-administration-job-failed-for-service-instance-microsoft-office-server-search-administration-searchserviceinstance">http://www.social-point.com/sharepoint-2010-event-id-6482-application-server-administration-job-failed-for-service-instance-microsoft-office-server-search-administration-searchserviceinstance</a> </li>
</ul>
<p>Jeff references to this articles:</p>
<ul>
<li><a href="http://goodbadtechnology.blogspot.com/2010/07/error-message-when-you-try-to-start.html">http://goodbadtechnology.blogspot.com/2010/07/error-message-when-you-try-to-start.html</a> </li>
<li><a href="http://support.microsoft.com/kb/939308">http://support.microsoft.com/kb/939308</a> </li>
</ul>
<p>I had to clean up lots of servers. Because of that I’ve created a little PowerShell script.</p>
<p>The script will automatically process all steps descripted by the KB article, <font color="#000000">Chaitu Madala</font><font color="#000000">&#160;</font>and Jeff.</p>
<p>You can execute the script on every server.</p>
<p>If your receive a yellow message at the end of the process that the resulting “cache.ini” file is diffrent from the original one. I think the cache.ini file contains a timestamp and it is OK if the new timestamp value is greater than the original one… But you use the script at your own rist – as always.</p>
<p>&#160;</p>
<p>SCRIPT:</p>
<blockquote>
<div style="border-bottom:#7f7f7f 1px solid;border-left:#7f7f7f 1px solid;font-size:1.2em;overflow:auto;border-top:#7f7f7f 1px solid;border-right:#aaaaaa 1px solid;padding:10px;">
<pre><span style="color:#008000;">#</span><span style="color:#008000;"> Script created by Ingo Karstein (http://ikarstein.wordpress.com)</span><span style="color:#008000;">
</span><span style="color:#5f9ea0;font-weight:bold;">Write-Host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Script created by Ingo Karstein (http://ikarstein.wordpress.com)</span><span style="color:#800000;">&quot;</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-ForegroundColor</span><span style="color:#000000;"> </span><span style="color:#800000;">DarkGreen</span><span style="color:#000000;">

</span><span style="color:#800080;">$cacheFolderRoot</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;font-weight:bold;">Join-Path</span><span style="color:#000000;"> </span><span style="color:#800080;">${env:ProgramData}</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Microsoft\SharePoint\Config</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
</span><span style="color:#800080;">$cacheFileCopy</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;font-weight:bold;">Join-Path</span><span style="color:#000000;"> </span><span style="color:#800080;">${env:temp}</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">cacheFileTmp.ini.ik</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">

</span><span style="color:#5f9ea0;font-weight:bold;">Write-Host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;&quot;</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-ForegroundColor</span><span style="color:#000000;"> </span><span style="color:#800000;">DarkBlue</span><span style="color:#000000;">
</span><span style="color:#5f9ea0;font-weight:bold;">Write-Host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Starting</span><span style="color:#800000;">&quot;</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-ForegroundColor</span><span style="color:#000000;"> </span><span style="color:#800000;">DarkBlue</span><span style="color:#000000;">

</span><span style="color:#0000ff;">if</span><span style="color:#000000;">( </span><span style="color:#5f9ea0;font-weight:bold;">Test-Path</span><span style="color:#000000;"> </span><span style="color:#800080;">$cacheFileCopy</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-PathType</span><span style="color:#000000;"> </span><span style="color:#800000;">Leaf</span><span style="color:#000000;">) {
    </span><span style="color:#5f9ea0;font-weight:bold;">write-host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Cache File copy lopcation does already exist. Please remove it: $($cacheFileCopy)</span><span style="color:#800000;">&quot;</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-ForegroundColor</span><span style="color:#000000;"> </span><span style="color:#800000;">Red</span><span style="color:#000000;">
    </span><span style="color:#0000ff;">return</span><span style="color:#000000;">
}

</span><span style="color:#5f9ea0;font-weight:bold;">Write-Host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Looking for cache folder</span><span style="color:#800000;">&quot;</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-ForegroundColor</span><span style="color:#000000;"> </span><span style="color:#800000;">DarkBlue</span><span style="color:#000000;">
</span><span style="color:#800080;">$cacheFolder</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;">  @(</span><span style="color:#5f9ea0;font-weight:bold;">GEt-ChildItem</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-Path</span><span style="color:#000000;"> </span><span style="color:#800080;">$cacheFolderRoot</span><span style="color:#000000;"> | ? {</span><span style="color:#5f9ea0;font-weight:bold;">Test-Path</span><span style="color:#000000;"> </span><span style="color:#800080;">$_</span><span style="color:#000000;">.FullName </span><span style="font-style:italic;color:#5f9ea0;">-PathType</span><span style="color:#000000;"> </span><span style="color:#800000;">Container</span><span style="color:#000000;">} | ? {</span><span style="color:#5f9ea0;font-weight:bold;">Test-Path</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-Path</span><span style="color:#000000;"> (</span><span style="color:#5f9ea0;font-weight:bold;">Join-Path</span><span style="color:#000000;"> </span><span style="color:#800080;">$_</span><span style="color:#000000;">.FullName </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">cache.ini</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">) </span><span style="font-style:italic;color:#5f9ea0;">-PathType</span><span style="color:#000000;"> </span><span style="color:#800000;">Leaf</span><span style="color:#000000;">})

</span><span style="color:#0000ff;">if</span><span style="color:#000000;">( </span><span style="color:#800080;">$cacheFolder</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-ne</span><span style="color:#000000;"> </span><span style="color:#800080;">$null</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-and</span><span style="color:#000000;"> </span><span style="color:#800080;">$cacheFolder</span><span style="color:#000000;">.</span><span style="color:#8b4513;">Count</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-eq</span><span style="color:#000000;"> </span><span style="color:#000000;">1</span><span style="color:#000000;">) {
    </span><span style="color:#800080;">$cacheFolder0</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">$cacheFolder</span><span style="color:#000000;">[0].FullName
    </span><span style="color:#5f9ea0;font-weight:bold;">Write-Host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Cache folder found: $($cacheFolder0)</span><span style="color:#800000;">&quot;</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-ForegroundColor</span><span style="color:#000000;"> </span><span style="color:#800000;">DarkBlue</span><span style="color:#000000;">
    </span><span style="color:#800080;">$cacheFile</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;font-weight:bold;">join-path</span><span style="color:#000000;"> </span><span style="color:#800080;">$cacheFolder0</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">cache.ini</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
    </span><span style="color:#5f9ea0;font-weight:bold;">Write-Host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Cache ini file: $($cacheFile)</span><span style="color:#800000;">&quot;</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-ForegroundColor</span><span style="color:#000000;"> </span><span style="color:#800000;">DarkBlue</span><span style="color:#000000;">

    </span><span style="color:#5f9ea0;font-weight:bold;">Write-Host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Stop SharePoint timer service</span><span style="color:#800000;">&quot;</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-ForegroundColor</span><span style="color:#000000;"> </span><span style="color:#800000;">DarkBlue</span><span style="color:#000000;">
    </span><span style="color:#5f9ea0;font-weight:bold;">stop-service</span><span style="color:#000000;"> </span><span style="color:#800000;">sptimerv4</span><span style="color:#000000;">

    </span><span style="color:#5f9ea0;font-weight:bold;">Write-Host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Copy cache.ini to it's temp location ($($cacheFileCopy))</span><span style="color:#800000;">&quot;</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-ForegroundColor</span><span style="color:#000000;"> </span><span style="color:#800000;">DarkBlue</span><span style="color:#000000;">
    </span><span style="color:#5f9ea0;font-weight:bold;">copy-item</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-path</span><span style="color:#000000;"> </span><span style="color:#800080;">$cacheFile</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-Destination</span><span style="color:#000000;"> </span><span style="color:#800080;">$cacheFileCopy</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-force</span><span style="color:#000000;">

    </span><span style="color:#5f9ea0;font-weight:bold;">Write-Host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Set the content of cache.ini to </span><span style="color:#800000;">&quot;&quot;</span><span style="color:#800000;">1</span><span style="color:#800000;">&quot;&quot;&quot;</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-ForegroundColor</span><span style="color:#000000;"> </span><span style="color:#800000;">DarkBlue</span><span style="color:#000000;">
    </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">1</span><span style="color:#800000;">&quot;</span><span style="color:#000000;"> | </span><span style="color:#5f9ea0;font-weight:bold;">set-content</span><span style="color:#000000;"> </span><span style="color:#800080;">$cacheFile</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-encoding</span><span style="color:#000000;"> </span><span style="color:#800000;">ascii</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-force</span><span style="color:#000000;">

    </span><span style="color:#5f9ea0;font-weight:bold;">Write-Host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Remove all .XML files from the cache folder</span><span style="color:#800000;">&quot;</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-ForegroundColor</span><span style="color:#000000;"> </span><span style="color:#800000;">DarkBlue</span><span style="color:#000000;">
    </span><span style="color:#5f9ea0;font-weight:bold;">get-childitem</span><span style="color:#000000;"> </span><span style="color:#800080;">$cacheFolder0</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-filter</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">*.xml</span><span style="color:#800000;">&quot;</span><span style="color:#000000;"> | </span><span style="color:#5f9ea0;font-weight:bold;">remove-item</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-force</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-confirm</span><span style="color:#000000;">:</span><span style="color:#800080;">$false</span><span style="color:#000000;">

    </span><span style="color:#5f9ea0;font-weight:bold;">Write-Host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Start SharePoint timer service</span><span style="color:#800000;">&quot;</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-ForegroundColor</span><span style="color:#000000;"> </span><span style="color:#800000;">DarkBlue</span><span style="color:#000000;">
    </span><span style="color:#5f9ea0;font-weight:bold;">start-service</span><span style="color:#000000;"> </span><span style="color:#800000;">sptimerv4</span><span style="color:#000000;">

    </span><span style="color:#800080;">$xmlFound</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-</span><span style="color:#000000;">1</span><span style="color:#000000;">
    </span><span style="color:#800080;">$xmlFoundLast</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-</span><span style="color:#000000;">1</span><span style="color:#000000;">
    </span><span style="color:#800080;">$eqCount</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#000000;">0</span><span style="color:#000000;">

    </span><span style="color:#5f9ea0;font-weight:bold;">Write-Host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Now the cache will be recreated... Waiting... This will take a minute or so...</span><span style="color:#800000;">&quot;</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-ForegroundColor</span><span style="color:#000000;"> </span><span style="color:#800000;">DarkBlue</span><span style="color:#000000;">
    </span><span style="color:#5f9ea0;font-weight:bold;">write-host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">(every second a dot will appear on the end of the next line)</span><span style="color:#800000;">&quot;</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-ForegroundColor</span><span style="color:#000000;"> </span><span style="color:#800000;">gray</span><span style="color:#000000;">
    </span><span style="color:#0000ff;">do</span><span style="color:#000000;"> {
        </span><span style="color:#5f9ea0;font-weight:bold;">write-host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">.</span><span style="color:#800000;">&quot;</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-nonewline</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-ForegroundColor</span><span style="color:#000000;"> </span><span style="color:#800000;">Magenta</span><span style="color:#000000;">
        </span><span style="color:#5f9ea0;font-weight:bold;">start-sleep</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-second</span><span style="color:#000000;"> </span><span style="color:#000000;">1</span><span style="color:#000000;">
        </span><span style="color:#800080;">$xmlFoundLast</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">$xmlFound</span><span style="color:#000000;">
        </span><span style="color:#800080;">$xmlFound</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> (@(</span><span style="color:#5f9ea0;font-weight:bold;">get-childitem</span><span style="color:#000000;"> </span><span style="color:#800080;">$cacheFolder0</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-filter</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">*.xml</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">)).Count
        </span><span style="color:#0000ff;">if</span><span style="color:#000000;">( </span><span style="color:#800080;">$xmlFound</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-eq</span><span style="color:#000000;"> </span><span style="color:#800080;">$xmlFoundLast</span><span style="color:#000000;"> ) {
            </span><span style="color:#800080;">$eqCount</span><span style="color:#ff0000;">++</span><span style="color:#000000;">
        } </span><span style="color:#0000ff;">else</span><span style="color:#000000;"> {
            </span><span style="color:#800080;">$eqCount</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#000000;">0</span><span style="color:#000000;">
        }
    } </span><span style="color:#0000ff;">while</span><span style="color:#000000;"> (</span><span style="color:#800080;">$eqCount</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-lt</span><span style="color:#000000;"> </span><span style="color:#000000;">30</span><span style="color:#000000;">)

    </span><span style="color:#5f9ea0;font-weight:bold;">Write-Host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;&quot;</span><span style="color:#000000;">
    </span><span style="color:#5f9ea0;font-weight:bold;">Write-Host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Done</span><span style="color:#800000;">&quot;</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-ForegroundColor</span><span style="color:#000000;"> </span><span style="color:#800000;">DarkBlue</span><span style="color:#000000;">

    </span><span style="color:#800080;">$a</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;font-weight:bold;">get-content</span><span style="color:#000000;"> </span><span style="color:#800080;">$cacheFileCopy</span><span style="color:#000000;">
    </span><span style="color:#800080;">$b</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;font-weight:bold;">get-content</span><span style="color:#000000;"> </span><span style="color:#800080;">$cacheFile</span><span style="color:#000000;">

    </span><span style="color:#0000ff;">if</span><span style="color:#000000;">( </span><span style="color:#800080;">$a</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-ne</span><span style="color:#000000;"> </span><span style="color:#800080;">$b</span><span style="color:#000000;"> ) {
        </span><span style="color:#0000ff;">if</span><span style="color:#000000;">( [</span><span style="color:#008080;">int</span><span style="color:#000000;">]</span><span style="color:#800080;">$a</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-gt</span><span style="color:#000000;"> [</span><span style="color:#008080;">int</span><span style="color:#000000;">]</span><span style="color:#800080;">$b</span><span style="color:#000000;"> ) {
            </span><span style="color:#5f9ea0;font-weight:bold;">write-host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">An error occured. the content of the cache file is not identically to it's value before processing.</span><span style="color:#800000;">&quot;</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-ForegroundColor</span><span style="color:#000000;"> </span><span style="color:#800000;">Red</span><span style="color:#000000;">
            </span><span style="color:#5f9ea0;font-weight:bold;">write-host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Old: $($a)</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
            </span><span style="color:#5f9ea0;font-weight:bold;">write-host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">New: $($b)</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
        } </span><span style="color:#0000ff;">else</span><span style="color:#000000;"> {
            </span><span style="color:#5f9ea0;font-weight:bold;">write-host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">MAYBE an error occured. the content of the cache file is not identically to it's value before processing.</span><span style="color:#800000;">&quot;</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-ForegroundColor</span><span style="color:#000000;"> </span><span style="color:#800000;">DarkYellow</span><span style="color:#000000;">
            </span><span style="color:#5f9ea0;font-weight:bold;">write-host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Old: $($a)</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
            </span><span style="color:#5f9ea0;font-weight:bold;">write-host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">New: $($b)</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
        }
    } </span><span style="color:#0000ff;">else</span><span style="color:#000000;"> {
        </span><span style="color:#5f9ea0;font-weight:bold;">write-host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Processing finished successfully! You need to execute the  script on every server!!</span><span style="color:#800000;">&quot;</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-foregroundcolor</span><span style="color:#000000;"> </span><span style="color:#800000;">darkgreen</span><span style="color:#000000;">
        </span><span style="color:#5f9ea0;font-weight:bold;">remove-item</span><span style="color:#000000;"> </span><span style="color:#800080;">$cacheFileCopy</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-Force</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-confirm</span><span style="color:#000000;">:</span><span style="color:#800080;">$false</span><span style="color:#000000;">
    }
} </span><span style="color:#0000ff;">else</span><span style="color:#000000;"> {
    </span><span style="color:#5f9ea0;font-weight:bold;">write-host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Could not find the cache folder or found too much cache folders!</span><span style="color:#800000;">&quot;</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-foregroundcolor</span><span style="color:#000000;"> </span><span style="color:#800000;">red</span><span style="color:#000000;">
}

</span></pre>
</p></div>
</blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ikarstein.wordpress.com/1515/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ikarstein.wordpress.com/1515/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ikarstein.wordpress.com/1515/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ikarstein.wordpress.com/1515/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ikarstein.wordpress.com/1515/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ikarstein.wordpress.com/1515/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ikarstein.wordpress.com/1515/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ikarstein.wordpress.com/1515/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ikarstein.wordpress.com/1515/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ikarstein.wordpress.com/1515/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ikarstein.wordpress.com/1515/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ikarstein.wordpress.com/1515/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ikarstein.wordpress.com/1515/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ikarstein.wordpress.com/1515/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ikarstein.wordpress.com&amp;blog=14218320&amp;post=1515&amp;subd=ikarstein&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ikarstein.wordpress.com/2011/11/04/powershell-script-for-recreating-the-server-cache-related-to-error-in-windows-event-log-event-id-6482-application-server-administration-job-failed-for-service-instance-microsoft-office-server-searc/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c26cf503c3296c4f8dcc59e1d14792d5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ikarstein</media:title>
		</media:content>
	</item>
		<item>
		<title>Strange Error on Web Frontend Server of MOSS 2007 farm: stsadm operation &#8220;enumallwebs&#8221; with &#8220;includewebparts&#8221; options results in lots of missing WebParts</title>
		<link>http://ikarstein.wordpress.com/2011/10/26/strange-error-on-web-frontend-server-of-moss-2007-farm-stsadm-operation-enumallwebs-with-includewebparts-options-results-in-lots-of-missing-webparts/</link>
		<comments>http://ikarstein.wordpress.com/2011/10/26/strange-error-on-web-frontend-server-of-moss-2007-farm-stsadm-operation-enumallwebs-with-includewebparts-options-results-in-lots-of-missing-webparts/#comments</comments>
		<pubDate>Wed, 26 Oct 2011 16:22:05 +0000</pubDate>
		<dc:creator>ikarstein</dc:creator>
				<category><![CDATA[SharePoint 2007 (MOSS)]]></category>

		<guid isPermaLink="false">https://ikarstein.wordpress.com/?p=1507</guid>
		<description><![CDATA[During a migration project from MOSS 2007 to SharePoint 2010 we got a strange error that took some hours to resolve. For an automated migration tasks I tried to create a PowerShell script to enumerate all WebParts on all ASPX pages using SPLimitedWebPartManager on a WFE of the MOSS 2007 farm. But I only got [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ikarstein.wordpress.com&amp;blog=14218320&amp;post=1507&amp;subd=ikarstein&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>During a migration project from MOSS 2007 to SharePoint 2010 we got a strange error that took some hours to resolve.</p>
<p>For an automated migration tasks I tried to create a PowerShell script to enumerate all WebParts on all ASPX pages using SPLimitedWebPartManager on a WFE of the MOSS 2007 farm. But I only got “ErrorWebPart” for <span style="text-decoration:underline;">every</span> WebPart on the Web Application!</p>
<p>Then I used “stsadm” to enumerate all WebParts:</p>
<p>stsadm –o enumallwebs –databasename sharepoint_content_local_sharepoint_local –includewebparts &gt; allwebparts.txt</p>
<p>This is the result:</p>
<blockquote><p>&lt;Databases&gt;      <br />&#160; &lt;Database SiteCount=&quot;2&quot; Name=&quot;sharepoint_content_local_sharepoint_local&quot; DataSource=&quot;server&quot;&gt;      <br />&#160;&#160;&#160; &lt;Site Id=&quot;12345678-716d-44a3-a973-fffffffffff&quot; OwnerLogin=&quot;domain\spadmin&quot; InSiteMap=&quot;True&quot;&gt;      <br />&#160;&#160;&#160;&#160;&#160; &lt;Webs Count=&quot;5&quot;&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;Web Id=&quot;12345678-17d9-4870-8d94-fffffffffff&quot; Url=&quot;/sites/test1&quot; LanguageId=&quot;1031&quot; TemplateName=&quot;STS#0&quot; TemplateId=&quot;1&quot;&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebParts&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;00f5bad9-f117-4eca-8d77-194bb598d7c6&quot; Count=&quot;1&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;e398c8f4-1750-b857-cca9-2542cadaee8f&quot; Count=&quot;1&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;d23f666e-372e-8f7d-e9f4-341c7fab5653&quot; Count=&quot;1&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;9f7a9f30-76a0-2d43-0d84-402ba6c3c125&quot; Count=&quot;1&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;ce9aa113-48cf-ddee-0c03-597445e5b7ab&quot; Count=&quot;1&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;e60f6c95-e86c-4717-2c0d-6d8563c9caf7&quot; Count=&quot;1&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;293e8d0e-486f-e21e-40e3-75bfb77202de&quot; Count=&quot;103&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;6bbb6e7d-fe0d-5d79-6c79-76a90de47e1c&quot; Count=&quot;1&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;9f030319-fa14-b625-4892-89f6f9f9d58b&quot; Count=&quot;1&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;b9a7f972-708a-cd77-4ffd-a235dfed5c38&quot; Count=&quot;1&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;2242cce6-491a-657a-c8ee-b10a2a993eda&quot; Count=&quot;182&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;db128878-9a93-4768-2256-cc2c390ffb57&quot; Count=&quot;1&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/WebParts&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/Web&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;Web Id=&quot;12345678-3bda-4109-aacd-fffffffffff&quot; Url=&quot;/sites/test1/subweb1&quot; LanguageId=&quot;1031&quot; TemplateName=&quot;STS#1&quot; TemplateId=&quot;1&quot;&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebParts&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;ce9aa113-48cf-ddee-0c03-597445e5b7ab&quot; Count=&quot;1&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;293e8d0e-486f-e21e-40e3-75bfb77202de&quot; Count=&quot;9&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;2242cce6-491a-657a-c8ee-b10a2a993eda&quot; Count=&quot;7&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/WebParts&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/Web&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;Web Id=&quot;12345678-b479-4157-91e5-fffffffffff&quot; Url=&quot;/sites/test1/subweb2&quot; LanguageId=&quot;1031&quot; TemplateName=&quot;STS#1&quot; TemplateId=&quot;1&quot;&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebParts&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;ce9aa113-48cf-ddee-0c03-597445e5b7ab&quot; Count=&quot;1&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;293e8d0e-486f-e21e-40e3-75bfb77202de&quot; Count=&quot;6&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;2242cce6-491a-657a-c8ee-b10a2a993eda&quot; Count=&quot;5&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/WebParts&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/Web&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;Web Id=&quot;12345678-25f3-450f-b44d-fffffffffff&quot; Url=&quot;/sites/test1/subweb3&quot; LanguageId=&quot;1031&quot; TemplateName=&quot;STS#0&quot; TemplateId=&quot;1&quot;&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebParts&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;ce9aa113-48cf-ddee-0c03-597445e5b7ab&quot; Count=&quot;1&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;293e8d0e-486f-e21e-40e3-75bfb77202de&quot; Count=&quot;21&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;2242cce6-491a-657a-c8ee-b10a2a993eda&quot; Count=&quot;22&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/WebParts&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/Web&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;Web Id=&quot;12345678-b341-4370-b0c6-fffffffffff&quot; Url=&quot;/sites/test1/subweb4&quot; LanguageId=&quot;1031&quot; TemplateName=&quot;STS#0&quot; TemplateId=&quot;1&quot;&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebParts&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;ce9aa113-48cf-ddee-0c03-597445e5b7ab&quot; Count=&quot;1&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;e60f6c95-e86c-4717-2c0d-6d8563c9caf7&quot; Count=&quot;1&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;293e8d0e-486f-e21e-40e3-75bfb77202de&quot; Count=&quot;23&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;2242cce6-491a-657a-c8ee-b10a2a993eda&quot; Count=&quot;27&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/WebParts&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/Web&gt;      <br />&#160;&#160;&#160;&#160;&#160; &lt;/Webs&gt;      <br />&#160;&#160;&#160; &lt;/Site&gt;      <br />&#160;&#160;&#160; &lt;Site Id=&quot;12345678-730c-46fd-a114-fffffffffff&quot; OwnerLogin=&quot;domain\spadmin&quot; InSiteMap=&quot;True&quot;&gt;      <br />&#160;&#160;&#160;&#160;&#160; &lt;Webs Count=&quot;2&quot;&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;Web Id=&quot;12345678-7cd6-447d-8107-fffffffffff&quot; Url=&quot;/sites/test2&quot; LanguageId=&quot;1031&quot; TemplateName=&quot;STS#0&quot; TemplateId=&quot;1&quot;&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebParts&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;d55b3b6b-6281-707b-73d0-0c49581475ad&quot; Count=&quot;1&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;aadc2962-fc63-03e2-f119-13e7096bab20&quot; Count=&quot;1&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;2f1510c7-75d5-921f-b120-2ce98fe3afe3&quot; Count=&quot;1&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;f5c3ff60-e752-3a90-84f8-3677f8384e2d&quot; Count=&quot;2&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;f2c50a02-9894-4ace-bb3f-4146a24cd940&quot; Count=&quot;2&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;ce9aa113-48cf-ddee-0c03-597445e5b7ab&quot; Count=&quot;2&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;e60f6c95-e86c-4717-2c0d-6d8563c9caf7&quot; Count=&quot;2&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;293e8d0e-486f-e21e-40e3-75bfb77202de&quot; Count=&quot;83&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;9f030319-fa14-b625-4892-89f6f9f9d58b&quot; Count=&quot;1&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;c9b34b5d-bf06-dc91-d23e-94ecad31cd0a&quot; Count=&quot;2&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;2242cce6-491a-657a-c8ee-b10a2a993eda&quot; Count=&quot;83&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;74bd016c-baa0-14a8-d5d8-b75dc7e6f429&quot; Count=&quot;1&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;94e9c166-264a-f84b-2377-bccefb8b3771&quot; Count=&quot;1&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;fb35a198-aea0-3c26-e40c-df473fe9b07b&quot; Count=&quot;2&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;669602d9-e116-ccb8-eea3-e37ad589b14b&quot; Count=&quot;1&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;f5897322-ddd4-c990-d012-f9d4fe2180ad&quot; Count=&quot;2&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/WebParts&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/Web&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;Web Id=&quot;12345678-80e5-425d-b0d9-fffffffffff&quot; Url=&quot;/sites/test4&quot; LanguageId=&quot;1031&quot; TemplateName=&quot;STS#0&quot; TemplateId=&quot;1&quot;&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebParts&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;ce9aa113-48cf-ddee-0c03-597445e5b7ab&quot; Count=&quot;1&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;e60f6c95-e86c-4717-2c0d-6d8563c9caf7&quot; Count=&quot;1&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;293e8d0e-486f-e21e-40e3-75bfb77202de&quot; Count=&quot;81&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WebPart Id=&quot;2242cce6-491a-657a-c8ee-b10a2a993eda&quot; Count=&quot;105&quot; Status=&quot;Missing&quot; /&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/WebParts&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/Web&gt;      <br />&#160;&#160;&#160;&#160;&#160; &lt;/Webs&gt;      <br />&#160;&#160;&#160; &lt;/Site&gt;      <br />&#160; &lt;/Database&gt;      <br />&lt;/Databases&gt;</p>
</blockquote>
<p>(This file is modified: I’ve changed Web and Site IDs and I’ve removed lots of webs and sites.)</p>
<p><strong>EVERY WEBPART IS MISSING!! Also all default MOSS 2007 WebParts with default SharePoint DLLs!</strong></p>
<p>BUT… On the second Web Frontend Server all WebParts are Status=”Installed” !!! Strange…</p>
<p>In the events viewer we found:</p>
<blockquote><p><a href="http://ikarstein.files.wordpress.com/2011/10/clip_image002.jpg"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="clip_image002" border="0" alt="clip_image002" src="http://ikarstein.files.wordpress.com/2011/10/clip_image002_thumb.jpg?w=244&#038;h=175" width="244" height="175" /></a></p>
<p><a href="http://ikarstein.files.wordpress.com/2011/10/image18.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" border="0" alt="image" src="http://ikarstein.files.wordpress.com/2011/10/image_thumb18.png?w=219&#038;h=244" width="219" height="244" /></a></p>
<p>It’s a SharePoint Feature DLL that is missing!</p>
</blockquote>
<p>This error is not present on the second WFE!</p>
<p>So we installed the missing DLL in the GAC.</p>
<p>And… now it works! – All WebParts have status “Installed” in the stsadm output!</p>
<p><span style="text-decoration:underline;">Summary</span></p>
<p>The feature deployment on the WFE was not successfull. There must be an error but MOSS 2007 doesn’t tell us about it. All solutions seems to be deployed in the Solution Management of the farm…</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ikarstein.wordpress.com/1507/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ikarstein.wordpress.com/1507/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ikarstein.wordpress.com/1507/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ikarstein.wordpress.com/1507/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ikarstein.wordpress.com/1507/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ikarstein.wordpress.com/1507/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ikarstein.wordpress.com/1507/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ikarstein.wordpress.com/1507/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ikarstein.wordpress.com/1507/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ikarstein.wordpress.com/1507/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ikarstein.wordpress.com/1507/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ikarstein.wordpress.com/1507/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ikarstein.wordpress.com/1507/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ikarstein.wordpress.com/1507/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ikarstein.wordpress.com&amp;blog=14218320&amp;post=1507&amp;subd=ikarstein&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ikarstein.wordpress.com/2011/10/26/strange-error-on-web-frontend-server-of-moss-2007-farm-stsadm-operation-enumallwebs-with-includewebparts-options-results-in-lots-of-missing-webparts/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c26cf503c3296c4f8dcc59e1d14792d5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ikarstein</media:title>
		</media:content>

		<media:content url="http://ikarstein.files.wordpress.com/2011/10/clip_image002_thumb.jpg" medium="image">
			<media:title type="html">clip_image002</media:title>
		</media:content>

		<media:content url="http://ikarstein.files.wordpress.com/2011/10/image_thumb18.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Deploying &#8220;Fantastic Fourty&#8220; templates of MOSS 2007 on SharePoint 2010</title>
		<link>http://ikarstein.wordpress.com/2011/10/25/deploying-fantastic-fourty-templates-of-moss-2007-on-sharepoint-2010/</link>
		<comments>http://ikarstein.wordpress.com/2011/10/25/deploying-fantastic-fourty-templates-of-moss-2007-on-sharepoint-2010/#comments</comments>
		<pubDate>Tue, 25 Oct 2011 13:07:29 +0000</pubDate>
		<dc:creator>ikarstein</dc:creator>
				<category><![CDATA[SharePoint 2010]]></category>

		<guid isPermaLink="false">https://ikarstein.wordpress.com/?p=1492</guid>
		<description><![CDATA[There are the “Fantastic Fourty” templates you all now… They are create for MOSS 2007 and there are no update available for SharePoint 2010… Because of a migration of MOSS 2007 to SharePoint 2010 I need to deploy some of the site definitions to SharePoint 2010 to get the “old” sites working… Do you know [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ikarstein.wordpress.com&amp;blog=14218320&amp;post=1492&amp;subd=ikarstein&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There are the “Fantastic Fourty” templates you all now… They are create for MOSS 2007 and there are no update available for SharePoint 2010… Because of a migration of MOSS 2007 to SharePoint 2010 I need to deploy some of the site definitions to SharePoint 2010 to get the “old” sites working…</p>
<p>Do you know you can publish the Fantastic-40 on SharePoint 2010? – Here is a nice article about that: <a href="http://marijnsomers.blogspot.com/2010/06/fantastic-40-templates-on-sharepoint.html">http://marijnsomers.blogspot.com/2010/06/fantastic-40-templates-on-sharepoint.html</a></p>
<p>On this page you’ll find updates solution packages: <a href="http://techsolutions.net/Blog/tabid/65/EntryId/17/Fab-40-Templates-for-MOSS-2010.aspx">http://techsolutions.net/Blog/tabid/65/EntryId/17/Fab-40-Templates-for-MOSS-2010.aspx</a></p>
<p>&#160;</p>
<p>BUT…</p>
<p>After deployment of the base solution “ApplicationTemplateCore.wsp” this is what I liked to do:</p>
<p>1. Create a Site Collection</p>
<blockquote><p><a href="http://ikarstein.files.wordpress.com/2011/10/image.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" border="0" alt="image" src="http://ikarstein.files.wordpress.com/2011/10/image_thumb.png?w=244&#038;h=155" width="244" height="155" /></a></p>
</blockquote>
<p>2. Enter some data and choose the “Custom” category for the site template. Click “Select template later”…</p>
<blockquote><p><a href="http://ikarstein.files.wordpress.com/2011/10/snaghtmlc2b02f.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="SNAGHTMLc2b02f" border="0" alt="SNAGHTMLc2b02f" src="http://ikarstein.files.wordpress.com/2011/10/snaghtmlc2b02f_thumb.png?w=244&#038;h=155" width="244" height="155" /></a></p>
</blockquote>
<p>3. Now create the site and open them. You get:</p>
<blockquote><p><a href="http://ikarstein.files.wordpress.com/2011/10/image1.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" border="0" alt="image" src="http://ikarstein.files.wordpress.com/2011/10/image_thumb1.png?w=244&#038;h=155" width="244" height="155" /></a></p>
</blockquote>
<p>4. Now open the “Site Settings” from the “Site Actions” menu.</p>
<p>5. Click “Site Collection Features”.</p>
<p>6. Try to activate feature “Fields and Content Types for the Windows SharePoint Services Application Templates”</p>
<blockquote><p><a href="http://ikarstein.files.wordpress.com/2011/10/image2.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" border="0" alt="image" src="http://ikarstein.files.wordpress.com/2011/10/image_thumb2.png?w=244&#038;h=155" width="244" height="155" /></a></p>
</blockquote>
<p>7. You get:</p>
<blockquote><p><a href="http://ikarstein.files.wordpress.com/2011/10/image3.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" border="0" alt="image" src="http://ikarstein.files.wordpress.com/2011/10/image_thumb3.png?w=244&#038;h=155" width="244" height="155" /></a></p>
</blockquote>
<p>&#160;</p>
<p>But as I tried to deploy and activate them I got this error:</p>
<blockquote><div style="border-bottom:#7f7f7f 1px solid;border-left:#7f7f7f 1px solid;font-size:1.2em;overflow:auto;border-top:#7f7f7f 1px solid;border-right:#aaaaaa 1px solid;padding:10px;">
<pre>

Server Error in '/' Application.
    --------------------------------------------------------------------------------

<strong><font color="#ff0000">The field with Id {46b00cd2-bc51-45d8-87e1-68f1be35275f} defined in feature {75a0fea7-cd50-401e-af0e-782f3662a299} was found in the current site collection or in a subsite.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. </font></strong>

Exception Details: Microsoft.SharePoint.SPException: The field with Id {46b00cd2-bc51-45d8-87e1-68f1be35275f} defined in feature {75a0fea7-cd50-401e-af0e-782f3662a299} was found in the current site collection or in a subsite.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.&#160; 

&#160;

Stack Trace: 

   [SPException: The field with Id {46b00cd2-bc51-45d8-87e1-68f1be35275f} defined in feature {75a0fea7-cd50-401e-af0e-782f3662a299} was found in the current site collection or in a subsite.]

&#160;&#160; Microsoft.SharePoint.Utilities.SPUtility.ThrowSPExceptionWithTraceTag(UInt32 tagId, ULSCat traceCategory, String resourceId, Object[] resourceArgs) +27772295&#160;&#160;&#160; 

   Microsoft.SharePoint.Administration.SPElementDefinitionCollection.ProvisionFieldsAndContentTypes(SPFeaturePropertyCollection props, SPSite site, SPWeb web, Boolean fForce) +23652209&#160;&#160;&#160; 

   Microsoft.SharePoint.Administration.SPElementDefinitionCollection.ProvisionElements(SPFeaturePropertyCollection props, SPWebApplication webapp, SPSite site, SPWeb web, Boolean fForce) +138&#160;&#160;&#160; 

   Microsoft.SharePoint.SPFeature.Activate(SPSite siteParent, SPWeb webParent, SPFeaturePropertyCollection props, Boolean fForce) +25437423&#160;&#160;&#160; 

   Microsoft.SharePoint.SPFeatureCollection.AddInternal(SPFeatureDefinition featdef, Version version, SPFeaturePropertyCollection properties, Boolean force, Boolean fMarkOnly) +27496895&#160;&#160;&#160; 

   Microsoft.SharePoint.SPFeatureCollection.AddInternalWithName(Guid featureId, String featureName, Version version, SPFeaturePropertyCollection properties, Boolean force, Boolean fMarkOnly, SPFeatureDefinitionScope featdefScope) +150&#160;&#160;&#160; 

   Microsoft.SharePoint.SPFeatureCollection.Add(Guid featureId, Boolean force, SPFeatureDefinitionScope featdefScope) +83&#160;&#160;&#160; 

   Microsoft.SharePoint.WebControls.FeatureActivator.ActivateFeature(Guid featid, SPFeatureDefinitionScope featdefScope) +699&#160;&#160;&#160; 

   Microsoft.SharePoint.WebControls.FeatureActivatorItem.BtnActivateFeature_Click(Object objSender, EventArgs evtargs) +140&#160;&#160;&#160; 

   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +115&#160;&#160;&#160; System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +140&#160;&#160;&#160; 

   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +29&#160;&#160;&#160; System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2981
</pre></div>
</blockquote>
<p>&#160;</p>
<p>Okay… This is the solution that I’ve developed some minutes ago.</p>
<p>1. You need to decompress the “ApplicationTemplateCore.WSP” file. – It’s nothing else than a CAB file renamed to WSP. – Use 7zip to decompress it.</p>
<p>2. Open the file &lt;fantastic40-folder&gt;\ApplicationTemplateCore\TSATypes\Fields.xml. Search for 46b00cd2-bc51-45d8-87e1-68f1be35275f and remove one of the double entries of this field definition:</p>
<blockquote>
<p><a href="http://ikarstein.files.wordpress.com/2011/10/snaghtml5a2ab1a.png"><img style="background-image:none;border-bottom:0;border-left:0;padding-left:0;padding-right:0;display:inline;border-top:0;border-right:0;padding-top:0;margin:0;" title="SNAGHTML5a2ab1a" border="0" alt="SNAGHTML5a2ab1a" src="http://ikarstein.files.wordpress.com/2011/10/snaghtml5a2ab1a_thumb.png?w=244&#038;h=184" width="244" height="184" /></a></p>
<p><a href="http://ikarstein.files.wordpress.com/2011/10/image5.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" border="0" alt="image" src="http://ikarstein.files.wordpress.com/2011/10/image_thumb5.png?w=244&#038;h=155" width="244" height="155" /></a></p>
<p>(Remove the code in the red frame.)</p>
</blockquote>
<p>3. By the way: This is not the only bug in the WSP file. But for now we go ahead… We need to recreate the WSP file.</p>
<blockquote>
<p>This is not easy.</p>
<p>a) First download “DDFGenerator.exe” from <a href="http://ddfgenerator.codeplex.com/">http://ddfgenerator.codeplex.com/</a></p>
<p>b) Open a command line prompt.</p>
<p>c) Type the path to “DDFGenerator.exe” and specify the path of the WSP content as parameter.</p>
<p><a href="http://ikarstein.files.wordpress.com/2011/10/image6.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" border="0" alt="image" src="http://ikarstein.files.wordpress.com/2011/10/image_thumb6.png?w=244&#038;h=124" width="244" height="124" /></a></p>
<p>d) In the WSP content folder you’ll find a file named “solution.ddf”. Edit this file in Notepad. Insert “.Set CabinetNameTemplate=ApplicationTemplateCore.WSP” as 5th line. – Save and close the file.</p>
<p><a href="http://ikarstein.files.wordpress.com/2011/10/image7.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" border="0" alt="image" src="http://ikarstein.files.wordpress.com/2011/10/image_thumb7.png?w=244&#038;h=122" width="244" height="122" /></a></p>
<p>e) Go into the folder and execute “MakeCab.exe /F solution.ddf”</p>
<p><a href="http://ikarstein.files.wordpress.com/2011/10/snaghtmlda5e2a.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="SNAGHTMLda5e2a" border="0" alt="SNAGHTMLda5e2a" src="http://ikarstein.files.wordpress.com/2011/10/snaghtmlda5e2a_thumb.png?w=244&#038;h=409" width="244" height="409" /></a></p>
<p>Now you have a new WSP file in a sub folder of the WSP content folder.</p>
<p><a href="http://ikarstein.files.wordpress.com/2011/10/image8.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" border="0" alt="image" src="http://ikarstein.files.wordpress.com/2011/10/image_thumb8.png?w=244&#038;h=184" width="244" height="184" /></a></p>
</blockquote>
<p>4. Now run a solution upgrade.</p>
<p>5. Try to activate the feature again. You get another error:</p>
<blockquote>
<p><a href="http://ikarstein.files.wordpress.com/2011/10/image9.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" border="0" alt="image" src="http://ikarstein.files.wordpress.com/2011/10/image_thumb9.png?w=244&#038;h=148" width="244" height="148" /></a></p>
<pre><font color="#ff0000">The field with Id {26118c12-ea11-48ae-950b-a7219a9738f8} defined in feature {75a0fea7-cd50-401e-af0e-782f3662a299} was found in the current site collection or in a subsite.</font> </pre>
</blockquote>
<p>6. If your search for GUID “26118c12-ea11-48ae-950b-a7219a9738f8” you’ll find another field that is deployed twice:</p>
<blockquote>
<p>&lt;Field ID=&quot;{26118C12-EA11-48ae-950B-A7219A9738F8}&quot; Name=&quot;TextFileName&quot; DisplayName=&quot;$Resources:core,Name;&quot; Type=&quot;Text&quot; Group=&quot;_Hidden&quot; Sealed=&quot;TRUE&quot; AllowDeletion=&quot;FALSE&quot;&gt;&lt;/Field&gt;</p>
<p>…in file &lt;fantastic40-folder&gt;\ApplicationTemplateCore\TSATypes\Fields.xml</p>
<p>Here you need to delete one of the entries…</p>
</blockquote>
<p>7. The next try also results in an error:</p>
<blockquote>
<p><a href="http://ikarstein.files.wordpress.com/2011/10/image10.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" border="0" alt="image" src="http://ikarstein.files.wordpress.com/2011/10/image_thumb10.png?w=244&#038;h=149" width="244" height="149" /></a></p>
<pre><font color="#ff0000">The field with Id {ebb85cf8-047c-4ba7-9fd6-01bfa5ef126d} defined in feature {75a0fea7-cd50-401e-af0e-782f3662a299} was found in the current site collection or in a subsite.</font></pre>
</blockquote>
<p>8. Search for GUID “ebb85cf8-047c-4ba7-9fd6-01bfa5ef126d”. – Here it’s more complexe to resolve this issue. Because there are to diffrent fields with the same ID!</p>
<blockquote>
<p><a href="http://ikarstein.files.wordpress.com/2011/10/image17.png"><img style="background-image:none;border-bottom:0;border-left:0;padding-left:0;padding-right:0;display:inline;border-top:0;border-right:0;padding-top:0;margin:0;" title="image" border="0" alt="image" src="http://ikarstein.files.wordpress.com/2011/10/image_thumb17.png?w=244&#038;h=167" width="244" height="167" /></a></p>
<p>(It’s file &lt;fantastic40-folder&gt;\ApplicationTemplateCore\TSATypes\Fields.xml<strong> </strong>again!<strong>)</strong></p>
<p>You need to create a new ID for one of the field.</p>
<p>I’ve choosen “93B5756C-727F-4C4B-A081-E8654A234739” as new ID for field “AssetPurchasePrice”. You can use this GUID too!</p>
<p>Now you need to change every reference to field “AssetPurchasePrice” in all files of the project. Here is a list of files:</p>
<ul>
<li>&lt;fantastic40-folder&gt;\ApplicationTemplateCore\TSATypes\Fields.xml </li>
<li>&lt;fantastic40-folder&gt;\ApplicationTemplateCore\TSATypes\CTypes.xml </li>
<li>&lt;fantastic40-folder&gt;\ApplicationTemplateCore\LendingLibraryList\Assets\schema.xml </li>
<li>&lt;fantastic40-folder&gt;\ApplicationTemplateCore\InventoryTrackingInventoryList\Inventory\schema.xml </li>
<li>&lt;fantastic40-folder&gt;\ApplicationTemplateCore\AssetTrackingProposalsList\Proposals\schema.xml </li>
<li>&lt;fantastic40-folder&gt;\ApplicationTemplateCore\AssetTrackingAssetsList\Assets\schema.xml </li>
</ul>
<p>Be sure to replace the ID of all references of “AssetPurchasePrice” with the new ID! Don’t touch the references of the other field “AssetDateRetired” with the same ID. Do not use Search and Replace to replace the GUID.</p>
<p>A sample for file &lt;fantastic40-folder&gt;\ApplicationTemplateCore\AssetTrackingAssetsList\Assets\schema.xml after replacing the ID of “AssetPurchasePrice”:</p>
<p><a href="http://ikarstein.files.wordpress.com/2011/10/image12.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" border="0" alt="image" src="http://ikarstein.files.wordpress.com/2011/10/image_thumb12.png?w=244&#038;h=166" width="244" height="166" /></a></p>
<p>(In the red box I’ve replaced the ID. In the green oval I’ve left the ID untouched!)</p>
<p>BTW: The GUID of “AssetDateRetired” is “EBB85CF8-047C-4ba7-9FD6-01BFA5EF126D”: There are lower case letters and upper case letters in the GUID. I think they are edited by hand by someone and that’s the reason of the error…</p>
</blockquote>
<p>9. Save your work and repack the solution as described above and deploy the package to SharePoint.</p>
<p>10. Now I’m able to activate the feature “Fields and Content Types for the Windows SharePoint Services Application Templates”:</p>
<blockquote>
<p><a href="http://ikarstein.files.wordpress.com/2011/10/image13.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" border="0" alt="image" src="http://ikarstein.files.wordpress.com/2011/10/image_thumb13.png?w=244&#038;h=149" width="244" height="149" /></a></p>
</blockquote>
<p>12. That’s it so far. </p>
<p>13. Now I’d like to use a Fantastic-40 template. In my case “Helpdesk”. I deployed the “Helpdesk.WSP” of the Fantastic-40 bundle to SharePoint 2010. – Without any error.</p>
<p>14. Click the homepage of your site and you’ll reach the “Template Picker” application page if you did not select a template for the site before like me.</p>
<blockquote>
<p><a href="http://ikarstein.files.wordpress.com/2011/10/image16.png"><img style="background-image:none;border-bottom:0;border-left:0;padding-left:0;padding-right:0;display:inline;border-top:0;border-right:0;padding-top:0;margin:0;" title="image" border="0" alt="image" src="http://ikarstein.files.wordpress.com/2011/10/image_thumb16.png?w=244&#038;h=148" width="244" height="148" /></a></p>
</blockquote>
<p>15. Now I have a working “Helpdesk” site – as far as I can see.</p>
<blockquote>
<p><a href="http://ikarstein.files.wordpress.com/2011/10/image15.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" border="0" alt="image" src="http://ikarstein.files.wordpress.com/2011/10/image_thumb15.png?w=244&#038;h=152" width="244" height="152" /></a></p>
</blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ikarstein.wordpress.com/1492/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ikarstein.wordpress.com/1492/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ikarstein.wordpress.com/1492/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ikarstein.wordpress.com/1492/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ikarstein.wordpress.com/1492/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ikarstein.wordpress.com/1492/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ikarstein.wordpress.com/1492/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ikarstein.wordpress.com/1492/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ikarstein.wordpress.com/1492/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ikarstein.wordpress.com/1492/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ikarstein.wordpress.com/1492/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ikarstein.wordpress.com/1492/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ikarstein.wordpress.com/1492/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ikarstein.wordpress.com/1492/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ikarstein.wordpress.com&amp;blog=14218320&amp;post=1492&amp;subd=ikarstein&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ikarstein.wordpress.com/2011/10/25/deploying-fantastic-fourty-templates-of-moss-2007-on-sharepoint-2010/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c26cf503c3296c4f8dcc59e1d14792d5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ikarstein</media:title>
		</media:content>

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

		<media:content url="http://ikarstein.files.wordpress.com/2011/10/snaghtmlc2b02f_thumb.png" medium="image">
			<media:title type="html">SNAGHTMLc2b02f</media:title>
		</media:content>

		<media:content url="http://ikarstein.files.wordpress.com/2011/10/image_thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ikarstein.files.wordpress.com/2011/10/image_thumb2.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ikarstein.files.wordpress.com/2011/10/image_thumb3.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ikarstein.files.wordpress.com/2011/10/snaghtml5a2ab1a_thumb.png" medium="image">
			<media:title type="html">SNAGHTML5a2ab1a</media:title>
		</media:content>

		<media:content url="http://ikarstein.files.wordpress.com/2011/10/image_thumb5.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ikarstein.files.wordpress.com/2011/10/image_thumb6.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ikarstein.files.wordpress.com/2011/10/image_thumb7.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ikarstein.files.wordpress.com/2011/10/snaghtmlda5e2a_thumb.png" medium="image">
			<media:title type="html">SNAGHTMLda5e2a</media:title>
		</media:content>

		<media:content url="http://ikarstein.files.wordpress.com/2011/10/image_thumb8.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ikarstein.files.wordpress.com/2011/10/image_thumb9.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ikarstein.files.wordpress.com/2011/10/image_thumb10.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ikarstein.files.wordpress.com/2011/10/image_thumb17.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ikarstein.files.wordpress.com/2011/10/image_thumb12.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ikarstein.files.wordpress.com/2011/10/image_thumb13.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ikarstein.files.wordpress.com/2011/10/image_thumb16.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ikarstein.files.wordpress.com/2011/10/image_thumb15.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
	</channel>
</rss>
