<?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>Edward Wilde &#187; sharepoint</title>
	<atom:link href="http://blogs.edwardwilde.com/tag/sharepoint/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.edwardwilde.com</link>
	<description>.Net &#38; SharePoint Developer / Architect</description>
	<lastBuildDate>Tue, 07 Feb 2012 08:19:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blogs.edwardwilde.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Edward Wilde &#187; sharepoint</title>
		<link>http://blogs.edwardwilde.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blogs.edwardwilde.com/osd.xml" title="Edward Wilde" />
	<atom:link rel='hub' href='http://blogs.edwardwilde.com/?pushpress=hub'/>
		<item>
		<title>How do you update the &#8216;Author&#8217; or &#8216;Created by&#8217; and &#8216;Editor&#8217; or &#8216;Modified By / Last Modified&#8217; fields of a list item (SPListItem)</title>
		<link>http://blogs.edwardwilde.com/2010/04/21/how-do-you-update-the-author-or-created-by-and-editor-or-modified-by-last-modified-fields-of-a-list-item-splistitem/</link>
		<comments>http://blogs.edwardwilde.com/2010/04/21/how-do-you-update-the-author-or-created-by-and-editor-or-modified-by-last-modified-fields-of-a-list-item-splistitem/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 13:49:26 +0000</pubDate>
		<dc:creator>Edward Wilde</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[sharepoint]]></category>
		<category><![CDATA[SPListItem]]></category>
		<category><![CDATA[SPListItem.UpdateOverwriteVersion()]]></category>

		<guid isPermaLink="false">http://edwardwilde.wordpress.com/?p=373</guid>
		<description><![CDATA[Sometimes it&#8217;s useful to overwrite the created by and last modified by fields and get rid of that pesky &#8216;System Account&#8217; ! Created By The internal field name for the person who created a list item is ‘Author’ use SPBuiltInFieldId.Author to access this field. The display name for this field is ‘Created By’ it can [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blogs.edwardwilde.com&amp;blog=9417511&amp;post=373&amp;subd=edwardwilde&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Sometimes it&#8217;s useful to overwrite the created by and last modified by fields and get rid of that pesky &#8216;System Account&#8217; !</p>
<h3>Created By</h3>
<p>The internal field name for the person who created a list item is ‘<strong>Author</strong>’ use SPBuiltInFieldId.Author to access this field. The display name for this field is ‘<strong>Created By</strong>’ it can be seen in the UI circled below:</p>
<p><a href="http://edwardwilde.files.wordpress.com/2010/04/splistitemcreatedbyauthor.png"><img style="display:inline;border:0;" title="SPListItem CreatedBy Author" src="http://edwardwilde.files.wordpress.com/2010/04/splistitemcreatedbyauthor_thumb.png?w=481&#038;h=295" border="0" alt="SPListItem CreatedBy Author" width="481" height="295" /></a></p>
<h3>Last modified</h3>
<p>The internal field name for the person who created a list item is ‘<strong>Editor</strong>’ use SPBuiltInFieldId.Editor to access this field. The display name for this field is ‘<strong>Modified By</strong>’ it can be seen in the UI circled below:</p>
<p><a href="http://edwardwilde.files.wordpress.com/2010/04/splistitemmodifiedbyeditor.png"><img style="display:inline;border:0;" title="SPListItem ModifiedBy Editor" src="http://edwardwilde.files.wordpress.com/2010/04/splistitemmodifiedbyeditor_thumb.png?w=481&#038;h=301" border="0" alt="SPListItem ModifiedBy Editor" width="481" height="301" /></a></p>
<h3>Updating Created By, Modified By</h3>
<p>The trick here is to call <strong>SPListItem.UpdateOverwriteVersion()</strong> instead of SPListItem.Update()</p>
<p><pre class="brush: csharp;">
SPListItem item = list.Items[0];
item[SPBuiltInFieldId.Author] = &quot;1;#Edward Wilde&quot;;
item[SPBuiltInFieldId.Editor] = &quot;1;#Edward Wilde&quot;;
copiedItem.UpdateOverwriteVersion();
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/edwardwilde.wordpress.com/373/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/edwardwilde.wordpress.com/373/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/edwardwilde.wordpress.com/373/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/edwardwilde.wordpress.com/373/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/edwardwilde.wordpress.com/373/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/edwardwilde.wordpress.com/373/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/edwardwilde.wordpress.com/373/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/edwardwilde.wordpress.com/373/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/edwardwilde.wordpress.com/373/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/edwardwilde.wordpress.com/373/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/edwardwilde.wordpress.com/373/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/edwardwilde.wordpress.com/373/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/edwardwilde.wordpress.com/373/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/edwardwilde.wordpress.com/373/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blogs.edwardwilde.com&amp;blog=9417511&amp;post=373&amp;subd=edwardwilde&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blogs.edwardwilde.com/2010/04/21/how-do-you-update-the-author-or-created-by-and-editor-or-modified-by-last-modified-fields-of-a-list-item-splistitem/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/196d33ea9cdaf7817b98b981afe62c16?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Edward Wilde</media:title>
		</media:content>

		<media:content url="http://edwardwilde.files.wordpress.com/2010/04/splistitemcreatedbyauthor_thumb.png" medium="image">
			<media:title type="html">SPListItem CreatedBy Author</media:title>
		</media:content>

		<media:content url="http://edwardwilde.files.wordpress.com/2010/04/splistitemmodifiedbyeditor_thumb.png" medium="image">
			<media:title type="html">SPListItem ModifiedBy Editor</media:title>
		</media:content>
	</item>
		<item>
		<title>InfoPath forms with workflow: &#8216;The form has been closed&#8217; or Exception occurred during request processing. (User: {Domain}\{UserName}, Form Name: , IP: , Request: http://localhost/_layouts/CstWrkflIP.aspx?List={ID}, Form ID: , Type: InfoPathLocalizedException, Exception Message: The specified form cannot be found.)</title>
		<link>http://blogs.edwardwilde.com/2010/04/07/infopath-forms-with-workflow-the-form-has-been-closed-or-exception-occurred-during-request-processing-user-domainusername-form-name-ip-request-httplocalhost_layouts/</link>
		<comments>http://blogs.edwardwilde.com/2010/04/07/infopath-forms-with-workflow-the-form-has-been-closed-or-exception-occurred-during-request-processing-user-domainusername-form-name-ip-request-httplocalhost_layouts/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 15:31:53 +0000</pubDate>
		<dc:creator>Edward Wilde</dc:creator>
				<category><![CDATA[infopath]]></category>
		<category><![CDATA[sharepoint]]></category>

		<guid isPermaLink="false">http://edwardwilde.wordpress.com/2010/04/07/infopath-forms-with-workflow-the-form-has-been-closed-or-exception-occurred-during-request-processing-user-domainusername-form-name-ip-request-httplocalhost_layouts/</guid>
		<description><![CDATA[Okay so today’s error message, totally my fault: was Exception occurred during request processing. (User: DOMAIN\xx, Form Name: , IP: , Request: http://localhost/_layouts/CstWrkflIP.aspx?List={ID}, Form ID: , Type: InfoPathLocalizedException, Exception Message: The specified form cannot be found.) Make sure that: Your feature file has the RegisterFroms property correctly pointing to a folder in your solution package [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blogs.edwardwilde.com&amp;blog=9417511&amp;post=361&amp;subd=edwardwilde&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Okay so today’s error message, totally my fault: was</p>
<blockquote><p>Exception occurred during request processing. (User: DOMAIN\xx, Form Name: , IP: , Request: <a href="http://localhost/_layouts/CstWrkflIP.aspx?List={ID}">http://localhost/_layouts/CstWrkflIP.aspx?List={ID}</a>, Form ID: , Type: InfoPathLocalizedException, Exception Message: The specified form cannot be found.)</p>
</blockquote>
<blockquote></blockquote>
<p><font color="#333333"></font></p>
<p>Make sure that:</p>
<ul>
<li>Your feature file has the RegisterFroms property correctly pointing to a folder in your solution package that contains your infopath forms     </p>
<p><a href="http://edwardwilde.files.wordpress.com/2010/04/windowclipping23.png"><img title="WindowClipping (23)" style="border-right:0;border-top:0;display:inline;border-left:0;border-bottom:0;" height="100" alt="WindowClipping (23)" src="http://edwardwilde.files.wordpress.com/2010/04/windowclipping23_thumb.png?w=541&#038;h=100" width="541" border="0" /></a>       <br />In my example all my info paths forms are contained in a sub directory called ‘Forms’ relative to feature file:      <br /><a href="http://edwardwilde.files.wordpress.com/2010/04/windowclipping24.png"><img title="WindowClipping (24)" style="border-right:0;border-top:0;display:inline;border-left:0;border-bottom:0;" height="381" alt="WindowClipping (24)" src="http://edwardwilde.files.wordpress.com/2010/04/windowclipping24_thumb.png?w=359&#038;h=381" width="359" border="0" /></a>       </li>
<li>Once the feature has been installed using <strong>stsadm –o install feature</strong> check that the forms have been placed in the InfoPath template library.
<p>Central Administration –&gt; <strong>Application Management –&gt; Manage Form Templates</strong>:      </p>
<p><a href="http://edwardwilde.files.wordpress.com/2010/04/windowclipping25.png"><img title="WindowClipping (25)" style="border-right:0;border-top:0;display:inline;border-left:0;border-bottom:0;" height="612" alt="WindowClipping (25)" src="http://edwardwilde.files.wordpress.com/2010/04/windowclipping25_thumb.png?w=642&#038;h=612" width="642" border="0" /></a> </li>
</ul>
</p>
<p>As always, your mileage my vary. If this doesn’t help you could try some of the tips on Lucy’s blog: h<a title="http://blogs.tamtam.nl/lucy/2007/06/08/WorkflowErrors.aspx" href="http://blogs.tamtam.nl/lucy/2007/06/08/WorkflowErrors.aspx">ttp://blogs.tamtam.nl/lucy/2007/06/08/WorkflowErrors.aspx</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/edwardwilde.wordpress.com/361/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/edwardwilde.wordpress.com/361/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/edwardwilde.wordpress.com/361/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/edwardwilde.wordpress.com/361/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/edwardwilde.wordpress.com/361/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/edwardwilde.wordpress.com/361/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/edwardwilde.wordpress.com/361/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/edwardwilde.wordpress.com/361/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/edwardwilde.wordpress.com/361/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/edwardwilde.wordpress.com/361/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/edwardwilde.wordpress.com/361/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/edwardwilde.wordpress.com/361/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/edwardwilde.wordpress.com/361/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/edwardwilde.wordpress.com/361/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blogs.edwardwilde.com&amp;blog=9417511&amp;post=361&amp;subd=edwardwilde&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blogs.edwardwilde.com/2010/04/07/infopath-forms-with-workflow-the-form-has-been-closed-or-exception-occurred-during-request-processing-user-domainusername-form-name-ip-request-httplocalhost_layouts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/196d33ea9cdaf7817b98b981afe62c16?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Edward Wilde</media:title>
		</media:content>

		<media:content url="http://edwardwilde.files.wordpress.com/2010/04/windowclipping23_thumb.png" medium="image">
			<media:title type="html">WindowClipping (23)</media:title>
		</media:content>

		<media:content url="http://edwardwilde.files.wordpress.com/2010/04/windowclipping24_thumb.png" medium="image">
			<media:title type="html">WindowClipping (24)</media:title>
		</media:content>

		<media:content url="http://edwardwilde.files.wordpress.com/2010/04/windowclipping25_thumb.png" medium="image">
			<media:title type="html">WindowClipping (25)</media:title>
		</media:content>
	</item>
		<item>
		<title>Cannot change the lookup list of the lookup field.</title>
		<link>http://blogs.edwardwilde.com/2010/02/08/cannot-change-the-lookup-list-of-the-lookup-field/</link>
		<comments>http://blogs.edwardwilde.com/2010/02/08/cannot-change-the-lookup-list-of-the-lookup-field/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 17:05:59 +0000</pubDate>
		<dc:creator>Edward Wilde</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[sharepoint]]></category>
		<category><![CDATA[SPFieldLookup]]></category>

		<guid isPermaLink="false">http://blogs.edwardwilde.com/?p=346</guid>
		<description><![CDATA[Ever get this error message SPException &#8220;Cannot change the lookup list of the lookup field.&#8221; Once a lookup field (SPFieldLookup) has had it&#8217;s LookupList and LookupWebId set you can&#8217;t change them. There is a good reason for this if your lookup field is used in multiple lists or already has data entered, you would effectively [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blogs.edwardwilde.com&amp;blog=9417511&amp;post=346&amp;subd=edwardwilde&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ever get this error message</p>
<p>SPException &#8220;Cannot change the lookup list of the lookup field.&#8221;</p>
<p>Once a lookup field (SPFieldLookup) has had it&#8217;s LookupList and LookupWebId set you can&#8217;t change them.</p>
<p><strong>There is a good reason for this </strong>if your lookup field is used in multiple lists or already has data entered, you would effectively break the referential integrity of the data. So what I&#8217;m showing here as a work-around to this error message should only be used if you are *sure* no lists reference the lookup column or no lists have any data using this column</p>
<p>Okay with the health warning out of the way the work-around is simply to update the Schema property to overwrite the intervalues for List &amp; WebId</p>
<p>I created a handy extension method for dealing with the string manipulation:</p>
<p><strong>Usage:</strong><br />
<pre class="brush: csharp;">
SPFieldLookup field = (SPFieldLookup)site.RootWeb.Fields[MyId];
field.UpdateLookupReferences(newWeb, newList);
</pre></p>
<p><strong>Implementation:</strong><br />
<pre class="brush: csharp;">
public static class SPFieldLookupExtensions
{
    public static void UpdateLookupReferences(this SPFieldLookup lookupField, SPWeb web, SPList list)
    {
        if (string.IsNullOrEmpty(lookupField.LookupList))
        {
            lookupField.LookupWebId = web.ID;
            lookupField.LookupList = list.ID.ToString();
        }
        else
        {
            lookupField.SchemaXml =
                lookupField.SchemaXml
                    .ReplaceXmlAttributeValue(&quot;List&quot;, list.ID.ToString())
                    .ReplaceXmlAttributeValue(&quot;WebId&quot;, web.ID.ToString());
        }

        lookupField.Update(true);
    }
}

public static string ReplaceXmlAttributeValue(this string xml, string attributeName, string value)
{
    if (string.IsNullOrEmpty(xml))
    {
        throw new ArgumentNullException(&quot;xml&quot;);
    }

    if (string.IsNullOrEmpty(value))
    {
        throw new ArgumentNullException(&quot;value&quot;);
    }


    int indexOfAttributeName = xml.IndexOf(attributeName, StringComparison.CurrentCultureIgnoreCase);
    if (indexOfAttributeName == -1)
    {
        throw new ArgumentOutOfRangeException(&quot;attributeName&quot;, string.Format(&quot;Attribute {0} not found in source xml&quot;, attributeName));
    }

    int indexOfAttibuteValueBegin = xml.IndexOf('&quot;', indexOfAttributeName);
    int indexOfAttributeValueEnd = xml.IndexOf('&quot;', indexOfAttibuteValueBegin + 1);

    return xml.Substring(0, indexOfAttibuteValueBegin + 1) + value + xml.Substring(indexOfAttributeValueEnd);
}
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/edwardwilde.wordpress.com/346/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/edwardwilde.wordpress.com/346/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/edwardwilde.wordpress.com/346/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/edwardwilde.wordpress.com/346/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/edwardwilde.wordpress.com/346/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/edwardwilde.wordpress.com/346/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/edwardwilde.wordpress.com/346/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/edwardwilde.wordpress.com/346/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/edwardwilde.wordpress.com/346/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/edwardwilde.wordpress.com/346/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/edwardwilde.wordpress.com/346/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/edwardwilde.wordpress.com/346/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/edwardwilde.wordpress.com/346/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/edwardwilde.wordpress.com/346/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blogs.edwardwilde.com&amp;blog=9417511&amp;post=346&amp;subd=edwardwilde&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blogs.edwardwilde.com/2010/02/08/cannot-change-the-lookup-list-of-the-lookup-field/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/196d33ea9cdaf7817b98b981afe62c16?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Edward Wilde</media:title>
		</media:content>
	</item>
		<item>
		<title>Engine RunWorkflow: System.Workflow.ComponentModel.Compiler.WorkflowValidationFailedException: The workflow failed validation.</title>
		<link>http://blogs.edwardwilde.com/2010/01/21/engine-runworkflow-system-workflow-componentmodel-compiler-workflowvalidationfailedexception-the-workflow-failed-validation/</link>
		<comments>http://blogs.edwardwilde.com/2010/01/21/engine-runworkflow-system-workflow-componentmodel-compiler-workflowvalidationfailedexception-the-workflow-failed-validation/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 14:42:22 +0000</pubDate>
		<dc:creator>Edward Wilde</dc:creator>
				<category><![CDATA[sharepoint]]></category>
		<category><![CDATA[rules]]></category>
		<category><![CDATA[workflow]]></category>

		<guid isPermaLink="false">http://edwardwilde.wordpress.com/2010/01/21/engine-runworkflow-system-workflow-componentmodel-compiler-workflowvalidationfailedexception-the-workflow-failed-validation/</guid>
		<description><![CDATA[Getting this error message today: Engine RunWorkflow: System.Workflow.ComponentModel.Compiler.WorkflowValidationFailedException: The workflow failed validation.&#160;&#160;&#160;&#160; at System.Workflow.Runtime.WorkflowDefinitionDispenser.ValidateDefinition(Activity root, Boolean isNewType, ITypeProvider typeProvider)&#160;&#160;&#160;&#160; at System.Workflow.Runtime.WorkflowDefinitionDispenser.LoadRootActivity(Type workflowType, Boolean createDefinition, Boolean initForRuntime)&#160;&#160;&#160;&#160; at System.Workflow.Runtime.WorkflowDefinitionDispenser.GetRootActivity(Type workflowType, Boolean createNew, Boolean initForRuntime)&#160;&#160;&#160;&#160; at System.Workflow.Runtime.WorkflowRuntime.InitializeExecutor(Guid instanceId, CreationContext context, WorkflowExecutor executor, WorkflowInstance workflowInstance)&#160;&#160;&#160;&#160; at System.Workflow.Runtime.WorkflowRuntime.Load(Guid key, CreationContext context, WorkflowInstance workflowInstance)&#160;&#160;&#160;&#160; at System.Workflow.Runtime.WorkflowRuntime.GetWorkflowExecutor(Guid instanceId, CreationContext context)&#160;&#160;&#160;&#160; at [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blogs.edwardwilde.com&amp;blog=9417511&amp;post=319&amp;subd=edwardwilde&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Getting this error message today:</p>
<p>Engine RunWorkflow: System.Workflow.ComponentModel.Compiler.WorkflowValidationFailedException: The workflow failed validation.&#160;&#160;&#160;&#160; at System.Workflow.Runtime.WorkflowDefinitionDispenser.ValidateDefinition(Activity root, Boolean isNewType, ITypeProvider typeProvider)&#160;&#160;&#160;&#160; at System.Workflow.Runtime.WorkflowDefinitionDispenser.LoadRootActivity(Type workflowType, Boolean createDefinition, Boolean initForRuntime)&#160;&#160;&#160;&#160; at System.Workflow.Runtime.WorkflowDefinitionDispenser.GetRootActivity(Type workflowType, Boolean createNew, Boolean initForRuntime)&#160;&#160;&#160;&#160; at System.Workflow.Runtime.WorkflowRuntime.InitializeExecutor(Guid instanceId, CreationContext context, WorkflowExecutor executor, WorkflowInstance workflowInstance)&#160;&#160;&#160;&#160; at System.Workflow.Runtime.WorkflowRuntime.Load(Guid key, CreationContext context, WorkflowInstance workflowInstance)&#160;&#160;&#160;&#160; at System.Workflow.Runtime.WorkflowRuntime.GetWorkflowExecutor(Guid instanceId, CreationContext context)&#160;&#160;&#160;&#160; at System.Workflow.Runtime.WorkflowRuntime.InternalCreateWorkflow(CreationContext context, Guid instanceId)&#160;&#160;&#160;&#160; at System.Workflow.Runtime.WorkflowRuntime.CreateWorkflow(Type workflowType, Dictionary`2 namedArgumentValues, Guid instanceId)&#160;&#160;&#160;&#160; at Microsoft.SharePoint.Workflow.SPWinOeHostServices.Send(SPWinOeWorkflow winoeworkflow, SPWorkflowEvent e)&#160;&#160;&#160;&#160; at Microsoft.SharePoint.Workflow.SPWinOeEngine.RunWorkflow(Guid trackingId, SPWorkflowHostService host, SPWorkflow workflow, Collection`1 events, TimeSpan timeOut)</p>
<p>&#160;</p>
<p>If your workflow uses validation rules it might be:</p>
<p>1) A problem with your validation rules, restart Visual Studio re-compile are any errors picked up?</p>
<p>&#160;</p>
<p>2) Missing the .net 3.5 workflow targets in your project file see: <a title="http://blog.hhebnes.no/post/WSPBuilder-Workflow-Failed-On-Start.aspx" href="http://blog.hhebnes.no/post/WSPBuilder-Workflow-Failed-On-Start.aspx">http://blog.hhebnes.no/post/WSPBuilder-Workflow-Failed-On-Start.aspx</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/edwardwilde.wordpress.com/319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/edwardwilde.wordpress.com/319/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/edwardwilde.wordpress.com/319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/edwardwilde.wordpress.com/319/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/edwardwilde.wordpress.com/319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/edwardwilde.wordpress.com/319/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/edwardwilde.wordpress.com/319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/edwardwilde.wordpress.com/319/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/edwardwilde.wordpress.com/319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/edwardwilde.wordpress.com/319/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/edwardwilde.wordpress.com/319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/edwardwilde.wordpress.com/319/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/edwardwilde.wordpress.com/319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/edwardwilde.wordpress.com/319/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blogs.edwardwilde.com&amp;blog=9417511&amp;post=319&amp;subd=edwardwilde&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blogs.edwardwilde.com/2010/01/21/engine-runworkflow-system-workflow-componentmodel-compiler-workflowvalidationfailedexception-the-workflow-failed-validation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/196d33ea9cdaf7817b98b981afe62c16?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Edward Wilde</media:title>
		</media:content>
	</item>
		<item>
		<title>An error occured while validating or updating the directory service connection. No update was performed.</title>
		<link>http://blogs.edwardwilde.com/2010/01/11/an-error-occured-while-validating-or-updating-the-directory-service-connection-no-update-was-performed/</link>
		<comments>http://blogs.edwardwilde.com/2010/01/11/an-error-occured-while-validating-or-updating-the-directory-service-connection-no-update-was-performed/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 12:05:25 +0000</pubDate>
		<dc:creator>Edward Wilde</dc:creator>
				<category><![CDATA[bugs]]></category>
		<category><![CDATA[sharepoint]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[userprofiles]]></category>

		<guid isPermaLink="false">http://edwardwilde.wordpress.com/2010/01/11/an-error-occured-while-validating-or-updating-the-directory-service-connection-no-update-was-performed/</guid>
		<description><![CDATA[I got this error whilst trying to get User Profiles to work. Things to check: &#160; Domain name is correct If using custom sources, try creating a new custom source and deleting the old one<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blogs.edwardwilde.com&amp;blog=9417511&amp;post=318&amp;subd=edwardwilde&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I got this error whilst trying to get User Profiles to work. Things to check:</p>
<p>&#160;</p>
<ol>
<li><strong>Domain name </strong>is correct</li>
<li>If using <strong>custom sources</strong>, try creating a new custom source and deleting the old one</li>
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/edwardwilde.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/edwardwilde.wordpress.com/318/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/edwardwilde.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/edwardwilde.wordpress.com/318/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/edwardwilde.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/edwardwilde.wordpress.com/318/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/edwardwilde.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/edwardwilde.wordpress.com/318/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/edwardwilde.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/edwardwilde.wordpress.com/318/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/edwardwilde.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/edwardwilde.wordpress.com/318/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/edwardwilde.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/edwardwilde.wordpress.com/318/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blogs.edwardwilde.com&amp;blog=9417511&amp;post=318&amp;subd=edwardwilde&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blogs.edwardwilde.com/2010/01/11/an-error-occured-while-validating-or-updating-the-directory-service-connection-no-update-was-performed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/196d33ea9cdaf7817b98b981afe62c16?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Edward Wilde</media:title>
		</media:content>
	</item>
		<item>
		<title>SharePoint custom workflow activity. &#8220;Failed to load toolbox item. It will be removed from toolbox.&#8221;</title>
		<link>http://blogs.edwardwilde.com/2009/12/27/sharepoint-custom-workflow-activity-failed-to-load-toolbox-item-it-will-be-removed-from-toolbox/</link>
		<comments>http://blogs.edwardwilde.com/2009/12/27/sharepoint-custom-workflow-activity-failed-to-load-toolbox-item-it-will-be-removed-from-toolbox/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 13:39:03 +0000</pubDate>
		<dc:creator>Edward Wilde</dc:creator>
				<category><![CDATA[sharepoint]]></category>
		<category><![CDATA[workflow]]></category>
		<category><![CDATA[activity]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[custom activity]]></category>
		<category><![CDATA[custom workflow]]></category>

		<guid isPermaLink="false">http://edwardwilde.wordpress.com/2009/12/27/sharepoint-custom-workflow-activity-failed-to-load-toolbox-item-it-will-be-removed-from-toolbox/</guid>
		<description><![CDATA[I was getting this error message in Visual Studio 2008 when adding a custom activity to an existing workflow. &#160; Solution This worked for me, your mileage, may and probably will vary. It was necessary for me to un-gac the workflow project, then the custom activities could be added to the design surface as expected.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blogs.edwardwilde.com&amp;blog=9417511&amp;post=317&amp;subd=edwardwilde&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I was getting this error message in Visual Studio 2008 when adding a custom activity to an existing workflow.</p>
<p>&#160;</p>
<p><strong>Solution</strong></p>
<p>This worked for me, your mileage, may and probably will vary. </p>
<p>It was necessary for me to un-gac the workflow project, then the custom activities could be added to the design surface as expected. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/edwardwilde.wordpress.com/317/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/edwardwilde.wordpress.com/317/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/edwardwilde.wordpress.com/317/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/edwardwilde.wordpress.com/317/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/edwardwilde.wordpress.com/317/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/edwardwilde.wordpress.com/317/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/edwardwilde.wordpress.com/317/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/edwardwilde.wordpress.com/317/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/edwardwilde.wordpress.com/317/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/edwardwilde.wordpress.com/317/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/edwardwilde.wordpress.com/317/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/edwardwilde.wordpress.com/317/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/edwardwilde.wordpress.com/317/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/edwardwilde.wordpress.com/317/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blogs.edwardwilde.com&amp;blog=9417511&amp;post=317&amp;subd=edwardwilde&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blogs.edwardwilde.com/2009/12/27/sharepoint-custom-workflow-activity-failed-to-load-toolbox-item-it-will-be-removed-from-toolbox/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/196d33ea9cdaf7817b98b981afe62c16?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Edward Wilde</media:title>
		</media:content>
	</item>
		<item>
		<title>Safe mode did not start successfully. Could not load file or assembly</title>
		<link>http://blogs.edwardwilde.com/2009/12/22/safe-mode-did-not-start-successfully-could-not-load-file-or-assembly/</link>
		<comments>http://blogs.edwardwilde.com/2009/12/22/safe-mode-did-not-start-successfully-could-not-load-file-or-assembly/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 11:41:36 +0000</pubDate>
		<dc:creator>Edward Wilde</dc:creator>
				<category><![CDATA[sharepoint]]></category>
		<category><![CDATA[debugging]]></category>

		<guid isPermaLink="false">http://edwardwilde.wordpress.com/2009/12/22/safe-mode-did-not-start-successfully-could-not-load-file-or-assembly/</guid>
		<description><![CDATA[Ever get any of these errors? The DataSourceID of &#8216;TopNavigationMenu&#8217; must be the ID of a control of type IHierarchicalDataSource.&#160; A control with ID &#8216;topSiteMap&#8217; could not be found.&#160;&#160; at System.Web.UI.WebControls.HierarchicalDataBoundControl.GetDataSource() &#160;&#160; at System.Web.UI.WebControls.HierarchicalDataBoundControl.ConnectToHierarchicalDataSource() &#160;&#160; at System.Web.UI.WebControls.HierarchicalDataBoundControl.OnLoad(EventArgs e) &#160;&#160; at System.Web.UI.Control.LoadRecursive() &#160;&#160; at System.Web.UI.Control.LoadRecursive() &#160;&#160; at System.Web.UI.Control.LoadRecursive() &#160;&#160; at System.Web.UI.Control.LoadRecursive() &#160;&#160; at System.Web.UI.Control.LoadRecursive() &#160;&#160; at [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blogs.edwardwilde.com&amp;blog=9417511&amp;post=315&amp;subd=edwardwilde&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ever get any of these errors?</p>
<p><a href="http://edwardwilde.files.wordpress.com/2009/12/windowclipping17.png"><img title="WindowClipping (17)" style="display:inline;border-width:0;" height="268" alt="WindowClipping (17)" src="http://edwardwilde.files.wordpress.com/2009/12/windowclipping17_thumb.png?w=650&#038;h=268" width="650" border="0" /></a> </p>
<p>The DataSourceID of &#8216;TopNavigationMenu&#8217; must be the ID of a control of type IHierarchicalDataSource.&#160; A control with ID &#8216;topSiteMap&#8217; could not be found.&#160;&#160; at System.Web.UI.WebControls.HierarchicalDataBoundControl.GetDataSource()    <br />&#160;&#160; at System.Web.UI.WebControls.HierarchicalDataBoundControl.ConnectToHierarchicalDataSource()     <br />&#160;&#160; at System.Web.UI.WebControls.HierarchicalDataBoundControl.OnLoad(EventArgs e)     <br />&#160;&#160; at System.Web.UI.Control.LoadRecursive()     <br />&#160;&#160; at System.Web.UI.Control.LoadRecursive()     <br />&#160;&#160; at System.Web.UI.Control.LoadRecursive()     <br />&#160;&#160; at System.Web.UI.Control.LoadRecursive()     <br />&#160;&#160; at System.Web.UI.Control.LoadRecursive()     <br />&#160;&#160; at System.Web.UI.Control.LoadRecursive()     <br />&#160;&#160; at System.Web.UI.Control.LoadRecursive()     <br />&#160;&#160; at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)</p>
<p><a href="http://dev03.trading.ad.int.local/">Troubleshoot issues with Windows SharePoint Services.</a></p>
<p>&#160;</p>
<h3>Server Error in &#8216;/&#8217; Application.<br />
<hr width="100%" size="1" /></h3>
<h4><i>Parser Error</i></h4>
<p> <b>Description: </b>An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.   <br /><b>Parser Error Message: </b>This page has encountered a critical error. Contact your system administrator if this problem persists.   <br /><b>Source Error:</b>
<p><code></code></p>
<pre>Line 1:  &lt;%@ Page Inherits=&quot;Microsoft.SharePoint.Publishing.TemplateRedirectionPage,Microsoft.SharePoint.Publishing,</pre>
<pre>Version=12.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c&quot; %&gt; </pre>
<pre>&lt;%@ Reference VirtualPath=&quot;~TemplatePageUrl&quot; %&gt; </pre>
<pre>&lt;%@ Reference VirtualPath=&quot;~masterurl/custom.master&quot; %&gt;
Line 2:  &lt;html xmlns:mso=&quot;urn:schemas-microsoft-com:office:office&quot; </pre>
<pre>xmlns:msdt=&quot;uuid:C2F41010-65B3-11d1-A29F-00AA00C14882&quot;&gt;&lt;head&gt;
Line 3:  &lt;!--[if gte mso 9]&gt;&lt;xml&gt;</pre>
</p>
<p><b>Source File: </b>/Pages/Default.aspx<b>&#160;&#160;&#160; Line: </b>1 </p>
</p>
<hr width="100%" size="1" /><b>Version Information:</b> Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082 </p>
<p>&#160;</p>
<h2>Event log error message</h2>
<p><strong>Safe mode did not start successfully</strong>. Could not load file or assembly &#8216;MyCompany, Version=1.0.0.0, Culture=neutral, PublicKeyToken=XXXXXXXX&#8217; or one of its dependencies. The system cannot find the file specified.</p>
<h2>Solution</h2>
<p>In my case the error message from the event log was spot on. I had accidentally removed a MyCompany assembly from the GAC.</p>
<p>&#160;</p>
<p>Other errors can also cause the same problem, whilst debugging this issue I came across another blog post that might be of interest: <a title="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2008/09/24/safe-mode-did-not-start-successfully-request-failed.aspx" href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2008/09/24/safe-mode-did-not-start-successfully-request-failed.aspx">http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2008/09/24/safe-mode-did-not-start-successfully-request-failed.aspx</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/edwardwilde.wordpress.com/315/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/edwardwilde.wordpress.com/315/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/edwardwilde.wordpress.com/315/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/edwardwilde.wordpress.com/315/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/edwardwilde.wordpress.com/315/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/edwardwilde.wordpress.com/315/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/edwardwilde.wordpress.com/315/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/edwardwilde.wordpress.com/315/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/edwardwilde.wordpress.com/315/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/edwardwilde.wordpress.com/315/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/edwardwilde.wordpress.com/315/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/edwardwilde.wordpress.com/315/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/edwardwilde.wordpress.com/315/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/edwardwilde.wordpress.com/315/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blogs.edwardwilde.com&amp;blog=9417511&amp;post=315&amp;subd=edwardwilde&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blogs.edwardwilde.com/2009/12/22/safe-mode-did-not-start-successfully-could-not-load-file-or-assembly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/196d33ea9cdaf7817b98b981afe62c16?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Edward Wilde</media:title>
		</media:content>

		<media:content url="http://edwardwilde.files.wordpress.com/2009/12/windowclipping17_thumb.png" medium="image">
			<media:title type="html">WindowClipping (17)</media:title>
		</media:content>
	</item>
		<item>
		<title>Programmatically determine is a feature is activated or even installed</title>
		<link>http://blogs.edwardwilde.com/2009/12/17/programmatically-determine-is-a-feature-is-activated-or-even-installed/</link>
		<comments>http://blogs.edwardwilde.com/2009/12/17/programmatically-determine-is-a-feature-is-activated-or-even-installed/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 17:23:00 +0000</pubDate>
		<dc:creator>Edward Wilde</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[sharepoint]]></category>
		<category><![CDATA[SPFeature]]></category>
		<category><![CDATA[SPFeatureCollection]]></category>
		<category><![CDATA[SPFeatureDefinition]]></category>

		<guid isPermaLink="false">http://blogs.edwardwilde.com/?p=308</guid>
		<description><![CDATA[Okay so ever needed to see if a particular web or site feature is activated? Well if it&#8217;s activated it will be in the SPWeb.Features SPFeatureCollection or SPSite.Features. If it&#8217;s not activated it won&#8217;t be. Simple. To check if a feature is installed examine the feature definitions collection on the SPFarm object, below are a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blogs.edwardwilde.com&amp;blog=9417511&amp;post=308&amp;subd=edwardwilde&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Okay so ever needed to see if a particular web or site feature is activated? Well if it&#8217;s activated it will be in the SPWeb.Features SPFeatureCollection or SPSite.Features. If it&#8217;s not activated it won&#8217;t be. Simple.</p>
<p>To check if a feature is installed examine the feature definitions collection on the SPFarm object, below are a couple of little extension methods that demonstrate this concept.</p>
<p><pre class="brush: csharp;">
/// &lt;summary&gt;
/// Defines extensions made to the &lt;see cref=&quot;SPWeb&quot;/&gt; class
/// &lt;/summary&gt;
[CLSCompliant(false)]
public static class SPWebExtensions
{
    public static bool IsFeatureActivated(this SPWeb web, Guid featureId)
    {
        return web.Features[featureId] != null;
    }

    public static bool IsFeatureInstalled(this SPWeb web, Guid featureId)
    {
        SPFeatureDefinition featureDefinition = SPFarm.Local.FeatureDefinitions[featureId];
        if (featureDefinition == null)
        {
            return false;
        }

        if (featureDefinition.Scope != SPFeatureScope.Web)
        {
            throw new GeneralApplicationException(
                string.Format(&quot;Feature with the ID {0} was installed but is not scoped at the web level.&quot;, featureId));
        }

        return true;
    }
}
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/edwardwilde.wordpress.com/308/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/edwardwilde.wordpress.com/308/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/edwardwilde.wordpress.com/308/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/edwardwilde.wordpress.com/308/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/edwardwilde.wordpress.com/308/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/edwardwilde.wordpress.com/308/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/edwardwilde.wordpress.com/308/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/edwardwilde.wordpress.com/308/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/edwardwilde.wordpress.com/308/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/edwardwilde.wordpress.com/308/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/edwardwilde.wordpress.com/308/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/edwardwilde.wordpress.com/308/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/edwardwilde.wordpress.com/308/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/edwardwilde.wordpress.com/308/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blogs.edwardwilde.com&amp;blog=9417511&amp;post=308&amp;subd=edwardwilde&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blogs.edwardwilde.com/2009/12/17/programmatically-determine-is-a-feature-is-activated-or-even-installed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/196d33ea9cdaf7817b98b981afe62c16?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Edward Wilde</media:title>
		</media:content>
	</item>
		<item>
		<title>The imported project &#8220;C:\Program Files\MSBuild\Microsoft.Office.InfoPath.targets&#8221; was not found</title>
		<link>http://blogs.edwardwilde.com/2009/12/17/the-imported-project-cprogram-filesmsbuildmicrosoft-office-infopath-targets-was-not-found/</link>
		<comments>http://blogs.edwardwilde.com/2009/12/17/the-imported-project-cprogram-filesmsbuildmicrosoft-office-infopath-targets-was-not-found/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 14:03:55 +0000</pubDate>
		<dc:creator>Edward Wilde</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[sharepoint]]></category>
		<category><![CDATA[infopath]]></category>
		<category><![CDATA[msbuild]]></category>

		<guid isPermaLink="false">http://edwardwilde.wordpress.com/2009/12/17/the-imported-project-cprogram-filesmsbuildmicrosoft-office-infopath-targets-was-not-found/</guid>
		<description><![CDATA[If you get this error message, which I did this morning opening up someone else&#8217;s SharePoint solution, make sure you have InfoPath installed. &#160; Once I installed the InfoPath client application&#160; with .Net Programmability Support, see below, the targets file was installed to the MSBuild directory.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blogs.edwardwilde.com&amp;blog=9417511&amp;post=307&amp;subd=edwardwilde&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you get this error message, which I did this morning opening up someone else&#8217;s SharePoint solution, make sure you have InfoPath installed.</p>
<p><a href="http://edwardwilde.files.wordpress.com/2009/12/microsoftvisualstudio.png"><img title="Microsoft Visual Studio" style="border-right:0;border-top:0;display:inline;border-left:0;border-bottom:0;" height="132" alt="Microsoft Visual Studio" src="http://edwardwilde.files.wordpress.com/2009/12/microsoftvisualstudio_thumb.png?w=697&#038;h=132" width="697" border="0" /></a></p>
<p>&#160;</p>
<p>Once I installed the InfoPath client application&#160; with .Net Programmability Support, see below, the targets file was installed to the MSBuild directory.</p>
<p><a href="http://edwardwilde.files.wordpress.com/2009/12/microsoftofficeenterprise2007.png"><img title="Microsoft Office Enterprise 2007" style="border-right:0;border-top:0;display:inline;border-left:0;border-bottom:0;" height="522" alt="Microsoft Office Enterprise 2007" src="http://edwardwilde.files.wordpress.com/2009/12/microsoftofficeenterprise2007_thumb.png?w=619&#038;h=522" width="619" border="0" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/edwardwilde.wordpress.com/307/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/edwardwilde.wordpress.com/307/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/edwardwilde.wordpress.com/307/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/edwardwilde.wordpress.com/307/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/edwardwilde.wordpress.com/307/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/edwardwilde.wordpress.com/307/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/edwardwilde.wordpress.com/307/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/edwardwilde.wordpress.com/307/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/edwardwilde.wordpress.com/307/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/edwardwilde.wordpress.com/307/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/edwardwilde.wordpress.com/307/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/edwardwilde.wordpress.com/307/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/edwardwilde.wordpress.com/307/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/edwardwilde.wordpress.com/307/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blogs.edwardwilde.com&amp;blog=9417511&amp;post=307&amp;subd=edwardwilde&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blogs.edwardwilde.com/2009/12/17/the-imported-project-cprogram-filesmsbuildmicrosoft-office-infopath-targets-was-not-found/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/196d33ea9cdaf7817b98b981afe62c16?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Edward Wilde</media:title>
		</media:content>

		<media:content url="http://edwardwilde.files.wordpress.com/2009/12/microsoftvisualstudio_thumb.png" medium="image">
			<media:title type="html">Microsoft Visual Studio</media:title>
		</media:content>

		<media:content url="http://edwardwilde.files.wordpress.com/2009/12/microsoftofficeenterprise2007_thumb.png" medium="image">
			<media:title type="html">Microsoft Office Enterprise 2007</media:title>
		</media:content>
	</item>
		<item>
		<title>You cannot customize permission levels in a web site with inherited permission levels.   at Microsoft.SharePoint.SPRoleDefinitionCollection.Add(SPRoleDefinition role)</title>
		<link>http://blogs.edwardwilde.com/2009/12/16/you-cannot-customize-permission-levels-in-a-web-site-with-inherited-permission-levels-at-microsoft-sharepoint-sproledefinitioncollection-addsproledefinition-role/</link>
		<comments>http://blogs.edwardwilde.com/2009/12/16/you-cannot-customize-permission-levels-in-a-web-site-with-inherited-permission-levels-at-microsoft-sharepoint-sproledefinitioncollection-addsproledefinition-role/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 15:24:44 +0000</pubDate>
		<dc:creator>Edward Wilde</dc:creator>
				<category><![CDATA[sharepoint]]></category>
		<category><![CDATA[SPRoleDefinition]]></category>

		<guid isPermaLink="false">http://edwardwilde.wordpress.com/?p=298</guid>
		<description><![CDATA[Okay simple solution here: Make sure that if you are not the root SPWeb and you want to add custom role definitions i.e. SPRoleDefinitions call SPRoleDefinitionCollection.BreakInheritance(bool,bool)<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blogs.edwardwilde.com&amp;blog=9417511&amp;post=298&amp;subd=edwardwilde&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Okay simple solution here: Make sure that if you are <strong>not</strong> the root SPWeb and you want to add custom role definitions i.e. SPRoleDefinitions call <strong>SPRoleDefinitionCollection.BreakInheritance(bool,bool)</strong></p>
<p><pre class="brush: csharp;">
if (!web.IsRootWeb &amp;&amp; !web.HasUniqueRoleDefinitions)
{
      web.RoleDefinitions.BreakInheritance(true, false);
}
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/edwardwilde.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/edwardwilde.wordpress.com/298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/edwardwilde.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/edwardwilde.wordpress.com/298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/edwardwilde.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/edwardwilde.wordpress.com/298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/edwardwilde.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/edwardwilde.wordpress.com/298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/edwardwilde.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/edwardwilde.wordpress.com/298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/edwardwilde.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/edwardwilde.wordpress.com/298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/edwardwilde.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/edwardwilde.wordpress.com/298/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blogs.edwardwilde.com&amp;blog=9417511&amp;post=298&amp;subd=edwardwilde&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blogs.edwardwilde.com/2009/12/16/you-cannot-customize-permission-levels-in-a-web-site-with-inherited-permission-levels-at-microsoft-sharepoint-sproledefinitioncollection-addsproledefinition-role/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/196d33ea9cdaf7817b98b981afe62c16?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Edward Wilde</media:title>
		</media:content>
	</item>
	</channel>
</rss>
