<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://randomdust.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">Ryan McIntyre</title><subtitle type="html">Some .NET, some BizTalk, some SharePoint, some SQL Server, and a Whole Lot of Whatever the Heck I Feel Like</subtitle><id>http://randomdust.com/blogs/ryan/atom.aspx</id><link rel="alternate" type="text/html" href="http://randomdust.com/blogs/ryan/default.aspx" /><link rel="self" type="application/atom+xml" href="http://randomdust.com/blogs/ryan/atom.aspx" /><generator uri="http://communityserver.org" version="2.1.61129.2">Community Server</generator><updated>2008-01-09T20:15:40Z</updated><entry><title>Document Version Properties</title><link rel="alternate" type="text/html" href="http://randomdust.com/blogs/ryan/archive/2009/06/24/document-version-properties.aspx" /><id>http://randomdust.com/blogs/ryan/archive/2009/06/24/document-version-properties.aspx</id><published>2009-06-25T03:09:00Z</published><updated>2009-06-25T03:09:00Z</updated><content type="html">&lt;p&gt;I'm currently working on a SharePoint project involving a requirement to embed the current version into each document.&amp;nbsp; Not an uncommon requirement, but at the end of the day it required an uncommon solution due to various issues I hope to post about.&amp;nbsp; Along the way I found myself needing to access the AfterProperties in an event receiver in order to read the current version of the document.&amp;nbsp; I knew the version info was in there somewhere, but I didn't know which exact property I needed.&amp;nbsp; To figure out my possibilities, I added the below code to my event and ran through it with the debugger seeing what was there:&lt;/p&gt;&lt;p&gt;

&lt;/p&gt;&lt;p style="margin:0in;font-family:Calibri;font-size:11pt;"&gt;//Loop through all
properties to see what's available&lt;/p&gt;

&lt;p style="margin:0in;font-family:Calibri;font-size:11pt;"&gt;foreach
(DictionaryEntry prop1 in properties.AfterProperties)&lt;/p&gt;

&lt;p style="margin:0in;font-family:Calibri;font-size:11pt;"&gt;{&lt;/p&gt;

&lt;p style="margin:0in;font-family:Calibri;font-size:11pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;string key = prop1.Key.ToString();&lt;/p&gt;

&lt;p style="margin:0in;font-family:Calibri;font-size:11pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;string value = prop1.Value.ToString();&lt;/p&gt;

&lt;p style="margin:0in;font-family:Calibri;font-size:11pt;"&gt;}&lt;/p&gt;&lt;p style="margin:0in;font-family:Calibri;font-size:11pt;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0in;font-family:Calibri;font-size:11pt;"&gt;The two properties that looked good were vti_docstoreversion and vti_sourcecontrolversion.&lt;/p&gt;&lt;p style="margin:0in;font-family:Calibri;font-size:11pt;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0in;font-family:Calibri;font-size:11pt;"&gt;After some investigating using the debugger and some different test cases I determined that vti_sourcecontrolversion was the one I needed. &amp;nbsp;&lt;/p&gt;&lt;p style="margin:0in;font-family:Calibri;font-size:11pt;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0in;font-family:Calibri;font-size:11pt;"&gt;The vti_docstoreversion stores an integer that represents how many times the document has changed.&amp;nbsp; The vti_sourcecontrolversion stores the version you see in the UI, such as "2.1". &amp;nbsp; As an example, with major and minor versioning enabled for a library, add a document.&amp;nbsp; Without publishing, it's displayed version will be .1.&amp;nbsp; Make an edit and it will be .2.&amp;nbsp; Publish a major version and the displayed version will be 1.0.&amp;nbsp; In this example, the docstoreversion value will be 3 and the sourcecontrolversion value will be 1.0. &lt;br&gt;&lt;/p&gt;&lt;p style="margin:0in;font-family:Calibri;font-size:11pt;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0in;font-family:Calibri;font-size:11pt;"&gt;I hope that helps someone as I didn't find this documented anywhere online. &lt;br&gt;&lt;/p&gt;&lt;img src="http://randomdust.com/aggbug.aspx?PostID=1225" width="1" height="1"&gt;</content><author><name>ryanm1201</name><uri>http://randomdust.com/members/ryanm1201.aspx</uri></author><category term=".NET" scheme="http://randomdust.com/blogs/ryan/archive/tags/.NET/default.aspx" /><category term="Technical" scheme="http://randomdust.com/blogs/ryan/archive/tags/Technical/default.aspx" /><category term="SharePoint" scheme="http://randomdust.com/blogs/ryan/archive/tags/SharePoint/default.aspx" /></entry><entry><title>Changing the App Pool Identity using STSADM</title><link rel="alternate" type="text/html" href="http://randomdust.com/blogs/ryan/archive/2008/10/13/changing-the-app-pool-identity-using-stsadm.aspx" /><id>http://randomdust.com/blogs/ryan/archive/2008/10/13/changing-the-app-pool-identity-using-stsadm.aspx</id><published>2008-10-13T18:39:00Z</published><updated>2008-10-13T18:39:00Z</updated><content type="html">&lt;p&gt;Ok, ok...I didn't write it.&amp;nbsp; But I was in the room when it was written!!&amp;nbsp; &lt;/p&gt;&lt;p&gt;My co-worker Gary Lapointe presented last week to the Colorado &lt;a href="http://www.cossug.com/CoSSUG/default.aspx" target="_blank"&gt;Springs SharePoint User Group&lt;/a&gt; on customizing STSADM and his "demo" was actually writing a new, functional STSADM command.&amp;nbsp; Very simple to do.&amp;nbsp; &lt;a href="http://stsadm.blogspot.com/2008/10/changing-application-pool-identity-via.html" target="_blank"&gt;Visit his site for the details&lt;/a&gt;.&lt;br&gt;&lt;/p&gt;&lt;p&gt;Not only did I learn some more about Gary's tools, I won the raffle for an MSDN Premium license (with Team Suite!)&amp;nbsp; Well worth the trip.&amp;nbsp; Thanks Gary! &lt;br&gt;&lt;/p&gt;&lt;img src="http://randomdust.com/aggbug.aspx?PostID=1216" width="1" height="1"&gt;</content><author><name>ryanm1201</name><uri>http://randomdust.com/members/ryanm1201.aspx</uri></author><category term=".NET" scheme="http://randomdust.com/blogs/ryan/archive/tags/.NET/default.aspx" /><category term="Technical" scheme="http://randomdust.com/blogs/ryan/archive/tags/Technical/default.aspx" /><category term="SharePoint" scheme="http://randomdust.com/blogs/ryan/archive/tags/SharePoint/default.aspx" /></entry><entry><title>MCS Co-Worker Finally Blogging</title><link rel="alternate" type="text/html" href="http://randomdust.com/blogs/ryan/archive/2008/09/09/mcs-co-worker-finally-blogging.aspx" /><id>http://randomdust.com/blogs/ryan/archive/2008/09/09/mcs-co-worker-finally-blogging.aspx</id><published>2008-09-09T21:20:00Z</published><updated>2008-09-09T21:20:00Z</updated><content type="html">It took him a while, but &lt;A href="http://blogs.msdn.com/sameersurve/" target=_blank&gt;Sameer Surve finally has a blog&lt;/A&gt;!&amp;nbsp; He's been my MCS counterpart at my current client for the last year and a half (give or take), and he definitely has lots of SharePoint and BizTalk info worth sharing.&amp;nbsp; I guarantee you'll have at least one subscriber, Sameer!&lt;img src="http://randomdust.com/aggbug.aspx?PostID=1215" width="1" height="1"&gt;</content><author><name>ryanm1201</name><uri>http://randomdust.com/members/ryanm1201.aspx</uri></author><category term="BizTalk" scheme="http://randomdust.com/blogs/ryan/archive/tags/BizTalk/default.aspx" /><category term="Technical" scheme="http://randomdust.com/blogs/ryan/archive/tags/Technical/default.aspx" /><category term="SharePoint" scheme="http://randomdust.com/blogs/ryan/archive/tags/SharePoint/default.aspx" /></entry><entry><title>Web.Config FeatureReceiver Update</title><link rel="alternate" type="text/html" href="http://randomdust.com/blogs/ryan/archive/2008/07/21/web-config-featurereceiver-update.aspx" /><id>http://randomdust.com/blogs/ryan/archive/2008/07/21/web-config-featurereceiver-update.aspx</id><published>2008-07-21T17:09:14Z</published><updated>2008-07-21T17:09:14Z</updated><content type="html">&lt;p&gt;After my &lt;a href="http://randomdust.com/blogs/ryan/archive/2008/03/22/featurereceiver-for-applying-custom-web-config-changes.aspx" target="_blank"&gt;previous post&lt;/a&gt; outlining my custom Feature Receiver used to update any section of a web.config file, I had some follow up email conversations with Mike about &lt;a href="http://www.sharepointblogs.com/mossms/archive/2008/03/18/making-a-feature-of-spwebconfigmodifications.aspx" target="_blank"&gt;his post&lt;/a&gt; and us possibly collaborating on a combined CodePlex solution.&amp;#160; Well, that hasn’t happened yet.&amp;#160; However, during that discussion, we talked a bit about security.&amp;#160; Mike referred me to a &lt;a href="http://www.cleverworkarounds.com/2008/04/04/guru-of-governance/" target="_blank"&gt;post by a colleague of his&lt;/a&gt; inspired by this very topic.&amp;#160; The gist of the discussion and post is that modifying the web.config with a Feature Receiver really only makes sense, from a security perspective, when the Feature is scoped at the web level.&amp;#160; I agree, so I needed to make a small change to my custom FeatureReceiver.&lt;/p&gt;  &lt;p&gt;The change I needed to make was simply to make sure that it did not update the web.config if the Feature was not deployed at the web scope.&amp;#160; This was a pretty simple change, but I took the opportunity to do a bit more research on the topic to see what others had done.&amp;#160; The best nugget I pulled out of this research time was a change in the way I was applying the updates.&amp;#160; Turns out there is an issue applying an update using&lt;/p&gt;  &lt;p&gt;SPFarm.Local.Services.GetValue&amp;lt; SPWebService&amp;gt;().ApplyWebConfigModifications();&lt;/p&gt;  &lt;p&gt;Using that method, the changes don’t get applied to the entire farm.&amp;#160; Since we’re in a farm environment, I would’ve run into that at some point.&amp;#160; The solution is to use this instead:&lt;/p&gt;  &lt;p&gt;webApp.Farm.Services.GetValue&amp;lt;SPWebService&amp;gt;().ApplyWebConfigModifications();&lt;/p&gt;  &lt;p&gt;Continue to the end of this post for some more reading on the topic.&amp;#160; For now, here is the code update I made:&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;max-height:200px;line-height:12pt;padding-top:4px;border-bottom:gray 1px solid;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4;"&gt;   &lt;div style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;     &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   1:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; UpdateWebConfig(&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; XPathLocation, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; ElementName,  &lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   2:&lt;/span&gt;     Dictionary&amp;lt;&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;&amp;gt; Attributes, &lt;span style="color:#0000ff;"&gt;bool&lt;/span&gt; removeModification)&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   3:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   4:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;try&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   5:&lt;/span&gt;     {&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   6:&lt;/span&gt;         SPWebApplication webApp = &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   7:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   8:&lt;/span&gt;         &lt;span style="color:#008000;"&gt;//Get the web app&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   9:&lt;/span&gt;         webApp = _properties.Feature.Parent &lt;span style="color:#0000ff;"&gt;as&lt;/span&gt; SPWebApplication;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  10:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  11:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (webApp == &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  12:&lt;/span&gt;             &lt;span style="color:#0000ff;"&gt;throw&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; SPException(&lt;span style="color:#006080;"&gt;&amp;quot;Error obtaining reference to Web application. A feature must &amp;quot;&lt;/span&gt; +&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  13:&lt;/span&gt;                 &lt;span style="color:#006080;"&gt;&amp;quot;be deployed at the WebApplication level to use the WebConfigChanges feature.&amp;quot;&lt;/span&gt;);&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  14:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  15:&lt;/span&gt;         SPWebConfigModification modification =&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  16:&lt;/span&gt;             &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; SPWebConfigModification(ElementName + CreateAttributeString(Attributes), XPathLocation);&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  17:&lt;/span&gt;             &lt;span style="color:#008000;"&gt;//new SPWebConfigModification(&amp;quot;authorizedType[@Assembly=\&amp;quot;Company.Moss.Activities, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9eed2245513232a4\&amp;quot;][@Namespace=\&amp;quot;Company.Moss.Activities\&amp;quot;][@TypeName=\&amp;quot;*\&amp;quot;][@Authorized=\&amp;quot;True\&amp;quot;]&amp;quot;, &amp;quot;configuration/System.Workflow.ComponentModel.WorkflowCompiler/authorizedTypes&amp;quot;);&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  18:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  19:&lt;/span&gt;         modification.Owner = &lt;span style="color:#006080;"&gt;&amp;quot;Company.Moss.FeatureReceiver.FDFeatureReceiver&amp;quot;&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  20:&lt;/span&gt;         modification.Sequence = 0;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  21:&lt;/span&gt;         modification.Type = SPWebConfigModification.SPWebConfigModificationType.EnsureChildNode;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  22:&lt;/span&gt;         modification.Value =&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  23:&lt;/span&gt;              &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Format(CultureInfo.InvariantCulture,&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  24:&lt;/span&gt;              CreateModificationValueString(ElementName, Attributes),&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  25:&lt;/span&gt;              CreateModificationValueArgs(Attributes));&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  26:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  27:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (removeModification)&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  28:&lt;/span&gt;             webApp.WebConfigModifications.Remove(modification);&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  29:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;else&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  30:&lt;/span&gt;             webApp.WebConfigModifications.Add(modification);&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  31:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  32:&lt;/span&gt;         &lt;span style="color:#008000;"&gt;//Changing from SPFarm to webApp as advised by http://www.crsw.com/mark/Lists/Posts/Post.aspx?ID=32&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  33:&lt;/span&gt;         &lt;span style="color:#008000;"&gt;//SPFarm.Local.Services.GetValue&amp;lt;SPWebService&amp;gt;().ApplyWebConfigModifications();&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  34:&lt;/span&gt;         webApp.Farm.Services.GetValue&amp;lt;SPWebService&amp;gt;().ApplyWebConfigModifications();&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  35:&lt;/span&gt;         webApp.Update();&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  36:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  37:&lt;/span&gt;     }&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  38:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;catch&lt;/span&gt; (Exception ex)&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  39:&lt;/span&gt;     {&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  40:&lt;/span&gt;         System.Diagnostics.EventLog el = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; System.Diagnostics.EventLog();&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  41:&lt;/span&gt;         el.Source = &lt;span style="color:#006080;"&gt;&amp;quot;WebConfigFeature&amp;quot;&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  42:&lt;/span&gt;         el.WriteEntry(ex.Message, System.Diagnostics.EventLogEntryType.Error);&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  43:&lt;/span&gt;     }&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  44:&lt;/span&gt; }&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Like I said, this is going to look a lot like the code in my previous post.&amp;#160; The first change is in the first few lines of the try block.&amp;#160; I assume the parent of the Feature is a Web App.&amp;#160; If it gets a reference, great.&amp;#160; If it doesn’t, it logs an error and doesn’t do anything else.&amp;#160; It would be nice if there were a way to actually stop the Feature from being deployed, but that can’t be done in a Feature Receiver (it happens after the Feature is activated.)&lt;/p&gt;

&lt;p&gt;The second change is at the end of that code snippet, and is to account for the Farm update issue I mentioned earlier.&lt;/p&gt;

&lt;p&gt;That’s it.&amp;#160; Like I said, not much has changed, but I wanted to put out an update in case others are using this approach.&lt;/p&gt;

&lt;p&gt;For further reading, here are some references:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.devhorizon.com/reza/?p=459" target="_blank"&gt;Reza Alirezaei – SPWebModification’s Top 6 Issues&lt;/a&gt;

  &lt;br /&gt;&lt;a href="http://www.crsw.com/mark/Lists/Posts/Post.aspx?ID=32" target="_blank"&gt;Mark Wagner – How To Modify the web.config File in SharePoint Using SPWebConfigModification&lt;/a&gt;

  &lt;br /&gt;&lt;a href="http://weblogs.asp.net/soever/archive/2007/05/03/sharepoint-features-elements-scope-and-other-info.aspx" target="_blank"&gt;Serge van den Oever – SharePoint Features – elements, scope and other info&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(That last one is useful because he lists the types of features that are allowed at each scope.&amp;#160; Can save you some time so you don’t implement this method to deploy something that can’t be deployed at the WebApplication level.)&lt;/p&gt;&lt;img src="http://randomdust.com/aggbug.aspx?PostID=1176" width="1" height="1"&gt;</content><author><name>ryanm1201</name><uri>http://randomdust.com/members/ryanm1201.aspx</uri></author><category term=".NET" scheme="http://randomdust.com/blogs/ryan/archive/tags/.NET/default.aspx" /><category term="Technical" scheme="http://randomdust.com/blogs/ryan/archive/tags/Technical/default.aspx" /><category term="SharePoint" scheme="http://randomdust.com/blogs/ryan/archive/tags/SharePoint/default.aspx" /></entry><entry><title>InfoPath Master/Detail with SharePoint List Sources</title><link rel="alternate" type="text/html" href="http://randomdust.com/blogs/ryan/archive/2008/07/02/infopath-master-detail-with-sharepoint-list-sources.aspx" /><id>http://randomdust.com/blogs/ryan/archive/2008/07/02/infopath-master-detail-with-sharepoint-list-sources.aspx</id><published>2008-07-02T21:19:38Z</published><updated>2008-07-02T21:19:38Z</updated><content type="html">&lt;p&gt;I picked up some InfoPath requirements after one of our consultants had to leave so this one had to be done after dusting off the InfoPath brain cells.&amp;#160; I’m still not convinced this is the best way to get this done so please leave a comment if there’s a better way.&lt;/p&gt;  &lt;p&gt;The InfoPath form needs to connect to two different SharePoint lists.&amp;#160; The first list is a list of Orders and the second is a list of Versions that apply to an Order.&amp;#160; There can be multiple Versions for each Order.&amp;#160; The goal was to create a master/detail type action where a user selects an order from a drop down, which then reloads the form with all of the version(s) and version details for that order displayed in a repeating table.&amp;#160; Doesn’t sound too hard, but I ran into some road blocks and had to resort to code.&lt;/p&gt;  &lt;p&gt;Both roadblocks had to do with SharePoint lists as a source.&amp;#160; I don’t know if this is specific to SharePoint sources or just external sources in general, but you can’t use a SharePoint source in a master/detail relationship.&amp;#160; After dragging it onto the form, right click on the repeating table and view the properties.&amp;#160; The master/detail section is grayed out.&amp;#160; The second thing I ran into was trying to filter the SharePoint connection.&amp;#160; No luck there either, it’s not available.&lt;/p&gt;  &lt;p&gt;After some searching, I found a post on &lt;a href="http://www.sharepoint-tips.com/2007/01/infopath-form-services-implementing.html" target="_blank"&gt;implementing master/detail for a web based form&lt;/a&gt; which detailed some steps to pull in SharePoint data using a different method.&amp;#160; Instead of using the SharePoint List option when creating the connection, you use the XML option and point it to a URL which outputs the list data in XML format.&amp;#160; I won’t cover the details of that here as he covers it his post very well, but it’s using owssvr.dll.&amp;#160; That post solved my issues completely, but it was using code for InfoPath 2007.&amp;#160; I needed to convert that to be 2003 compatible.&amp;#160; &lt;/p&gt;  &lt;p&gt;Since the 2003 compatible code is probably the only useful part of this post, here it is:&lt;/p&gt;  &lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;max-height:200px;line-height:12pt;padding-top:4px;border-bottom:gray 1px solid;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4;"&gt;   &lt;div style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;     &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   1:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; OrderName_OnAfterChange(DataDOMEvent e)&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   3:&lt;/span&gt;     &lt;span style="color:#008000;"&gt;//Capture the new value for Order so we can filter the data just for that order&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   4:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; newOrder = e.NewValue.ToString();&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   5:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   6:&lt;/span&gt;     &lt;span style="color:#008000;"&gt;//Get a reference to the Card Version Adapter&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   7:&lt;/span&gt;     XMLFileAdapterObject cardVersion = thisXDocument.DataAdapters[&lt;span style="color:#006080;"&gt;&amp;quot;Card Version owssvr&amp;quot;&lt;/span&gt;] &lt;span style="color:#0000ff;"&gt;as&lt;/span&gt; XMLFileAdapterObject;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   8:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   9:&lt;/span&gt;     &lt;span style="color:#008000;"&gt;//Modify the Card Version adapter URL to append the filter&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  10:&lt;/span&gt;     cardVersion.FileURL = cardVersion.FileURL + &lt;span style="color:#006080;"&gt;&amp;quot;&amp;amp;FilterField1=Order_x0020_Name&amp;amp;FilterValue1=&amp;quot;&lt;/span&gt; + newOrder;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  11:&lt;/span&gt;     &lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  12:&lt;/span&gt;     &lt;span style="color:#008000;"&gt;//Re-query&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  13:&lt;/span&gt;     cardVersion.Query();&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  14:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  15:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (e.IsUndoRedo)&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  16:&lt;/span&gt;     {&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  17:&lt;/span&gt;         &lt;span style="color:#008000;"&gt;// An undo or redo operation has occurred and the DOM is read-only.&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  18:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  19:&lt;/span&gt;     }&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  20:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  21:&lt;/span&gt;     &lt;span style="color:#008000;"&gt;// A field change has occurred and the DOM is writable.&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  22:&lt;/span&gt;     &lt;span style="color:#008000;"&gt;// Write your code here.&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  23:&lt;/span&gt; }&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Pretty simple, but it took some SDK searching to find the right classes.&amp;#160; I’m using the XMLFileAdapterObject to grab the “Card Version owssvr” data connection, then I change the URL using FileURL similar to how Ishai modified the FileLocation property of the FileQueryConnection object.&amp;#160; Like I said, nothing fancy, but I thought it may come in handy for folks looking for a solution similar to Ishai’s, but who can’t use InfoPath 2007.&lt;/p&gt;&lt;img src="http://randomdust.com/aggbug.aspx?PostID=1119" width="1" height="1"&gt;</content><author><name>ryanm1201</name><uri>http://randomdust.com/members/ryanm1201.aspx</uri></author><category term=".NET" scheme="http://randomdust.com/blogs/ryan/archive/tags/.NET/default.aspx" /><category term="Technical" scheme="http://randomdust.com/blogs/ryan/archive/tags/Technical/default.aspx" /><category term="SharePoint" scheme="http://randomdust.com/blogs/ryan/archive/tags/SharePoint/default.aspx" /><category term="InfoPath" scheme="http://randomdust.com/blogs/ryan/archive/tags/InfoPath/default.aspx" /></entry><entry><title>Test Twitter Notifier from Live Writer</title><link rel="alternate" type="text/html" href="http://randomdust.com/blogs/ryan/archive/2008/06/30/test-twitter-notifier-from-live-writer.aspx" /><id>http://randomdust.com/blogs/ryan/archive/2008/06/30/test-twitter-notifier-from-live-writer.aspx</id><published>2008-06-30T21:50:21Z</published><updated>2008-06-30T21:50:21Z</updated><content type="html">&lt;p&gt;Trying out the Twitter Notifier using Live Writer.&amp;#160; Found in the &lt;a href="http://writerdevzone.spaces.live.com/blog/cns!FF912D98C958E9D3!170.entry" target="_blank"&gt;Live Writer SDK for Technical Preview&lt;/a&gt;.&amp;#160; This should show up on my &lt;a href="http://twitter.com/ryanmcintyre" target="_blank"&gt;Twitter feed&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://randomdust.com/aggbug.aspx?PostID=1118" width="1" height="1"&gt;</content><author><name>ryanm1201</name><uri>http://randomdust.com/members/ryanm1201.aspx</uri></author><category term=".NET" scheme="http://randomdust.com/blogs/ryan/archive/tags/.NET/default.aspx" /><category term="SQL Server" scheme="http://randomdust.com/blogs/ryan/archive/tags/SQL+Server/default.aspx" /><category term="Personal" scheme="http://randomdust.com/blogs/ryan/archive/tags/Personal/default.aspx" /><category term="Business" scheme="http://randomdust.com/blogs/ryan/archive/tags/Business/default.aspx" /><category term="Politics" scheme="http://randomdust.com/blogs/ryan/archive/tags/Politics/default.aspx" /><category term="BizTalk" scheme="http://randomdust.com/blogs/ryan/archive/tags/BizTalk/default.aspx" /><category term="Technical" scheme="http://randomdust.com/blogs/ryan/archive/tags/Technical/default.aspx" /><category term="Windows Workflow" scheme="http://randomdust.com/blogs/ryan/archive/tags/Windows+Workflow/default.aspx" /><category term="SharePoint" scheme="http://randomdust.com/blogs/ryan/archive/tags/SharePoint/default.aspx" /><category term="Mobile" scheme="http://randomdust.com/blogs/ryan/archive/tags/Mobile/default.aspx" /><category term="Photography" scheme="http://randomdust.com/blogs/ryan/archive/tags/Photography/default.aspx" /></entry><entry><title>FeedReader Update</title><link rel="alternate" type="text/html" href="http://randomdust.com/blogs/ryan/archive/2008/06/30/feedreader-update.aspx" /><id>http://randomdust.com/blogs/ryan/archive/2008/06/30/feedreader-update.aspx</id><published>2008-06-30T17:21:00Z</published><updated>2008-06-30T17:21:00Z</updated><content type="html">&lt;p&gt;Tim just put together a new release for his &lt;a href="http://www.codeplex.com/FeedReader" target="_blank"&gt;FeedReader&lt;/a&gt; web part which includes the &lt;a href="http://randomdust.com/blogs/ryan/archive/2008/01/17/feedreader-contribution.aspx" target="_blank"&gt;code contributions&lt;/a&gt; I made a few months ago.&amp;#160; He details some installation steps on his blog &lt;a href="http://timheuer.com/blog/archive/2008/06/28/new-feedreader-sharepoint-web-part-release.aspx" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Thanks again for the opportunity to contribute, Tim!&lt;/p&gt;&lt;img src="http://randomdust.com/aggbug.aspx?PostID=1116" width="1" height="1"&gt;</content><author><name>ryanm1201</name><uri>http://randomdust.com/members/ryanm1201.aspx</uri></author><category term="SharePoint" scheme="http://randomdust.com/blogs/ryan/archive/tags/SharePoint/default.aspx" /></entry><entry><title>Drill Here, Drill Now!</title><link rel="alternate" type="text/html" href="http://randomdust.com/blogs/ryan/archive/2008/06/16/drill-here-drill-now.aspx" /><id>http://randomdust.com/blogs/ryan/archive/2008/06/16/drill-here-drill-now.aspx</id><published>2008-06-17T02:36:27Z</published><updated>2008-06-17T02:36:27Z</updated><content type="html">&lt;p&gt;I guess if you sit and wait long enough, someone will do something to solve a problem.&amp;#160; In my eyes, the problem is our dependency on foreign oil.&amp;#160; There are two angles of attack to solve the problem.&amp;#160; First, reduce our dependency on oil regardless of source through alternative fuels.&amp;#160; This is a great idea and it's awesome to see work done in this area, including my uncle creating a home-brew hydrogen cell as an example.&amp;#160; Second, increase our production of oil so we don't need to depend on foreign sources.&amp;#160; If both of these could be done at the same time I think we'd be well on our way to solving the problem for good.&lt;/p&gt;  &lt;p&gt;Not much is needed to increase our production.&amp;#160; The oil is there, we just need to go get it.&amp;#160; To that end, I came across a petition earlier which was started by Newt Gingrich called &amp;quot;Drill Here, Drill Now, Pay Less&amp;quot; which is meant to collect signatures which will be presented to the Senate.&amp;#160; He's already delivered 350,000, and the site is up to 805,000.&amp;#160; One of those signatures belonging to Chuck Norris!&amp;#160; Take a look at &lt;a href="http://www.americansolutions.com/" target="_blank"&gt;americansolutions.com&lt;/a&gt; and sign the petition if it looks like a good solution to you!&lt;/p&gt;&lt;img src="http://randomdust.com/aggbug.aspx?PostID=1115" width="1" height="1"&gt;</content><author><name>ryanm1201</name><uri>http://randomdust.com/members/ryanm1201.aspx</uri></author><category term="Politics" scheme="http://randomdust.com/blogs/ryan/archive/tags/Politics/default.aspx" /></entry><entry><title>FeatureReceiver For Applying Custom Web.Config Changes</title><link rel="alternate" type="text/html" href="http://randomdust.com/blogs/ryan/archive/2008/03/22/featurereceiver-for-applying-custom-web-config-changes.aspx" /><id>http://randomdust.com/blogs/ryan/archive/2008/03/22/featurereceiver-for-applying-custom-web-config-changes.aspx</id><published>2008-03-22T22:32:31Z</published><updated>2008-03-22T22:32:31Z</updated><content type="html">&lt;p&gt;As I was reading through my SharePoint feeds I came across a post that struck a cord with me.&amp;#160; The post is by Mike Stringfellow and is about &lt;a href="http://www.sharepointblogs.com/mossms/archive/2008/03/18/making-a-feature-of-spwebconfigmodifications.aspx" target="_blank"&gt;updating sections of the web.config through a SPFeatureReceiver&lt;/a&gt;.&amp;#160; It struck a cord because I had developed something very similar last July to make it simpler to make changes to the web.config through deployment.&amp;#160; It was always on my TODO list to blog about it but I obviously never got around to it.&amp;#160; Thanks to the &amp;quot;reminder&amp;quot; from Mike, let's see what I did!&lt;/p&gt;  &lt;p&gt;(By the way, the purpose of this is not to steal any of Mike's thunder.&amp;#160; Actually, it looks like his solution is built better than mine, so I'll give credit where credit is due.&amp;#160; My hope is to provide some nuggets to the community with the hope that a public solution can be made available.&amp;#160; Mike, if you read this, perhaps we could put together a CodePlex project?)&lt;/p&gt;  &lt;p&gt;I'll point out two things worth mentioning, then I'll let the code speak for itself as once you understand these two concepts the rest falls into place.&lt;/p&gt;  &lt;p&gt;First is the use of the SPWebConfigModification class to manage the updates to the web.config file.&amp;#160; The class is flexible...it allows you to create any modification, then using xpath define where the modification lives in web.config.&amp;#160; So with a little string manipulation to create the entry and some xpath work to find the location in the config file, all that's left is to determine if we're performing an Add or Remove and then call the proper method on the SPWebApplication.WebConfigModifications.&amp;#160; You'll see this illustrated in the UpdateWebConfig method in the code below.&lt;/p&gt;  &lt;p&gt;Second is the use, and format, of a settings file which needs to be packaged with the Feature and defines the changes to be made to web.config.&amp;#160; This allows the developer to simply include a new settings file in their Feature and the FeatureReceiver pulls that in and reads the changes.&amp;#160; No code for the developer.&amp;#160; As you can see in the code, the file needs to be named WebConfigChanges.xml.&amp;#160; Here's the XSD:&lt;/p&gt;  &lt;div&gt;   &lt;div style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;     &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color:#800000;"&gt;xml&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;version&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;1.0&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;encoding&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;utf-8&amp;quot;&lt;/span&gt;?&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;xs:schema&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;id&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;WebConfigChanges&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;xmlns&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;xmlns:xs&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;http://www.w3.org/2001/XMLSchema&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;xmlns:msdata&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;urn:schemas-microsoft-com:xml-msdata&amp;quot;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;  &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;xs:element&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;name&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;WebConfigChanges&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;msdata:IsDataSet&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;true&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;msdata:UseCurrentLocale&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;true&amp;quot;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;    &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;xs:complexType&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;      &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;xs:choice&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;minOccurs&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;maxOccurs&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;unbounded&amp;quot;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;        &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;xs:element&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;name&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;WebConfigChange&amp;quot;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;          &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;xs:complexType&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;            &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;xs:sequence&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;              &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;xs:element&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;name&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;Attributes&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;minOccurs&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;maxOccurs&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;xs:complexType&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                  &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;xs:sequence&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                    &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;xs:element&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;name&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;Attribute&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;minOccurs&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;maxOccurs&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;unbounded&amp;quot;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                      &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;xs:complexType&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                        &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;xs:attribute&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;name&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;Name&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;type&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;xs:string&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                        &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;xs:attribute&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;name&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;Value&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;type&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;xs:string&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                      &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;xs:complexType&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                    &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;xs:element&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                  &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;xs:sequence&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;xs:complexType&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;              &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;xs:element&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;            &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;xs:sequence&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;            &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;xs:attribute&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;name&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;XPathLocation&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;type&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;xs:string&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;            &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;xs:attribute&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;name&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;ElementName&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;type&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;xs:string&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;          &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;xs:complexType&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;        &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;xs:element&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;      &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;xs:choice&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;    &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;xs:complexType&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;  &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;xs:element&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;xs:schema&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;div&gt;&amp;#160;&lt;/div&gt;

&lt;div&gt;Here's some explanation on the file:&lt;/div&gt;

&lt;div&gt;&amp;#160;&lt;/div&gt;

&lt;table cellspacing="0" cellpadding="2"&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Name&lt;/strong&gt;&lt;/td&gt;

      &lt;td&gt;&lt;strong&gt;Description&lt;/strong&gt;&lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td&gt;WebConfigChanges&lt;/td&gt;

      &lt;td&gt;A collection of WebConfigChange entries to be applied to the web.config file. The top element of the file.&lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td&gt;WebConfigChange&lt;/td&gt;

      &lt;td&gt;A single WebConfigChange to be applied to the web.config file.&lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td&gt;XPathLocation&lt;/td&gt;

      &lt;td&gt;Gives the XPath location to the element where the new entry should be inserted.&lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td&gt;ElementName&lt;/td&gt;

      &lt;td&gt;The name of the element to insert.&lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td&gt;Attributes&lt;/td&gt;

      &lt;td&gt;A collection of Attribute entries to be applied to the element being inserted.&lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td&gt;Attribute&lt;/td&gt;

      &lt;td&gt;A single Attribute to be applied to the element being inserted.&lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td&gt;Attribute:Name&lt;/td&gt;

      &lt;td&gt;The name of the attribute.&lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td&gt;Attribute:Value&lt;/td&gt;

      &lt;td&gt;The value of the attribute.&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;

&lt;div&gt;&amp;#160;&lt;/div&gt;

&lt;div&gt;And an example which enters a new authorizedType entry for a new custom workflow activity:&lt;/div&gt;

&lt;div&gt;&amp;#160;&lt;/div&gt;

&lt;div&gt;
  &lt;div style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;
    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color:#800000;"&gt;xml&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;version&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;1.0&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;encoding&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;utf-8&amp;quot;&lt;/span&gt; ?&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;WebConfigChanges&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;  &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;WebConfigChange&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;XPathLocation&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;configuration/System.Workflow.ComponentModel.WorkflowCompiler/authorizedTypes&amp;quot;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                     &lt;span style="color:#ff0000;"&gt;ElementName&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;authorizedType&amp;quot;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;    &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;Attributes&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;      &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;Attribute&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;Name&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;Assembly&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;Value&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;Company.Moss.Activities, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9eed2245513232a4&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;      &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;Attribute&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;Name&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;Namespace&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;Value&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;Company.Moss.Activities&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;      &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;Attribute&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;Name&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;TypeName&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;Value&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;*&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;      &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;Attribute&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;Name&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;Authorized&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;Value&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;True&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;    &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;Attributes&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;  &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;WebConfigChange&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;WebConfigChanges&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Hopefully that all makes sense.&amp;#160; That foundation being set, I'll let the code explain the rest.&amp;#160; If you have any questions or suggestions please leave a comment.&lt;/p&gt;

&lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;max-height:400px;line-height:12pt;padding-top:4px;border-bottom:gray 1px solid;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4;"&gt;
  &lt;div style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;
    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; System;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; System.Text;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; System.Globalization;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; System.Xml;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; Microsoft.SharePoint;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; Microsoft.SharePoint.Administration;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#0000ff;"&gt;namespace&lt;/span&gt; Company.Moss.FeatureReceiver&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;{&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;    &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; CustomFeatureReceiver : SPFeatureReceiver&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;    {&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;        &lt;span style="color:#0000ff;"&gt;protected&lt;/span&gt; SPFeatureReceiverProperties _properties;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;        &lt;span style="color:#cc6633;"&gt;#region&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;base&lt;/span&gt; overrides&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;        &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; FeatureInstalled(SPFeatureReceiverProperties properties)&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;        {&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;            &lt;span style="color:#008000;"&gt;//throw new Exception(&amp;quot;The method or operation is not implemented.&amp;quot;);&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;        }&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;        &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; FeatureUninstalling(SPFeatureReceiverProperties properties)&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;        {&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;            &lt;span style="color:#008000;"&gt;//throw new Exception(&amp;quot;The method or operation is not implemented.&amp;quot;);&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;        }&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;        &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; FeatureActivated(SPFeatureReceiverProperties properties)&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;        {&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;            &lt;span style="color:#008000;"&gt;//This is where the WebConfigChanges file should be&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;            &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; fileLoc = properties.Definition.RootDirectory + &lt;span style="color:#006080;"&gt;&amp;quot;\\WebConfigChanges.xml&amp;quot;&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;            &lt;span style="color:#008000;"&gt;//Check to see if a WebConfigChanges.xml file exists. If yes, we have work to do&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;            &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (System.IO.File.Exists(fileLoc))&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;            {&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                &lt;span style="color:#008000;"&gt;//Grab the properties&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                _properties = properties;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                &lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;.ProcessChanges(fileLoc, &lt;span style="color:#0000ff;"&gt;false&lt;/span&gt;);&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;            }&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;        }&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;        &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; FeatureDeactivating(SPFeatureReceiverProperties properties)&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;        {&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;            &lt;span style="color:#008000;"&gt;//This is where the WebConfigChanges file should be&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;            &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; fileLoc = properties.Definition.RootDirectory + &lt;span style="color:#006080;"&gt;&amp;quot;\\WebConfigChanges.xml&amp;quot;&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;            &lt;span style="color:#008000;"&gt;//Check to see if a WebConfigChanges.xml file exists. If yes, we have work to do&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;            &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (System.IO.File.Exists(fileLoc))&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;            {&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                &lt;span style="color:#008000;"&gt;//Grab the properties&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                _properties = properties;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                &lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;.ProcessChanges(fileLoc, &lt;span style="color:#0000ff;"&gt;true&lt;/span&gt;);&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;            }&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;        }&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;        &lt;span style="color:#cc6633;"&gt;#endregion&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;        &lt;span style="color:#0000ff;"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; ProcessChanges(&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; FileLocation, &lt;span style="color:#0000ff;"&gt;bool&lt;/span&gt; removeModification)&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;        {&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;            &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; xPathLocation;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;            &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; elementName;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;            Dictionary&amp;lt;&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;&amp;gt; attributes = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Dictionary&amp;lt;&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;&amp;gt;();&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;            &lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; (XmlReader reader = XmlReader.Create(FileLocation))&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;            {&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                &lt;span style="color:#008000;"&gt;//Loop through all of the changes&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                &lt;span style="color:#0000ff;"&gt;while&lt;/span&gt;(reader.ReadToFollowing(&lt;span style="color:#006080;"&gt;&amp;quot;WebConfigChange&amp;quot;&lt;/span&gt;))&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                {&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                    &lt;span style="color:#008000;"&gt;//Clean out any attributes from past iterations&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                    attributes.Clear();&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                    xPathLocation = reader.GetAttribute(&lt;span style="color:#006080;"&gt;&amp;quot;XPathLocation&amp;quot;&lt;/span&gt;);&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                    elementName = reader.GetAttribute(&lt;span style="color:#006080;"&gt;&amp;quot;ElementName&amp;quot;&lt;/span&gt;);&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                    &lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                    &lt;span style="color:#008000;"&gt;//Make sure we have at least a path and element&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                    &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (xPathLocation == &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt; || elementName == &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                        &lt;span style="color:#0000ff;"&gt;throw&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Exception(&lt;span style="color:#006080;"&gt;&amp;quot;WebConfigChange missing required XPathLocation or ElementName attributes&amp;quot;&lt;/span&gt;);&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                    &lt;span style="color:#008000;"&gt;//Get the Attributes to apply&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                    &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (reader.ReadToDescendant(&lt;span style="color:#006080;"&gt;&amp;quot;Attribute&amp;quot;&lt;/span&gt;))&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                    {&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                        &lt;span style="color:#0000ff;"&gt;do&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                        {&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                            attributes.Add(reader.GetAttribute(&lt;span style="color:#006080;"&gt;&amp;quot;Name&amp;quot;&lt;/span&gt;), reader.GetAttribute(&lt;span style="color:#006080;"&gt;&amp;quot;Value&amp;quot;&lt;/span&gt;));&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                        } &lt;span style="color:#0000ff;"&gt;while&lt;/span&gt; (reader.ReadToNextSibling(&lt;span style="color:#006080;"&gt;&amp;quot;Attribute&amp;quot;&lt;/span&gt;));&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                    }&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                    &lt;span style="color:#008000;"&gt;//Do the update&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                    UpdateWebConfig(xPathLocation, elementName, attributes, removeModification);&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                } &lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;            }&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;        }&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;        &lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;        &lt;span style="color:#0000ff;"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; UpdateWebConfig(&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; XPathLocation, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; ElementName,  &lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;            Dictionary&amp;lt;&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;&amp;gt; Attributes, &lt;span style="color:#0000ff;"&gt;bool&lt;/span&gt; removeModification)&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;        {&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;            &lt;span style="color:#0000ff;"&gt;try&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;            {&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                SPWebApplication webApp = &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                &lt;span style="color:#008000;"&gt;//Get the web app&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                &lt;span style="color:#008000;"&gt;//First check if it was deployed to a Site Collection&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                SPSiteCollection siteCol = _properties.Feature.Parent &lt;span style="color:#0000ff;"&gt;as&lt;/span&gt; SPSiteCollection;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (siteCol == &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                {&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                    &lt;span style="color:#008000;"&gt;//Check if it was deployed to a site&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                    SPSite site = _properties.Feature.Parent &lt;span style="color:#0000ff;"&gt;as&lt;/span&gt; SPSite;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                    &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (site == &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                    {&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                        &lt;span style="color:#008000;"&gt;//Check if it was deployed to a Site&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                        SPWeb web = _properties.Feature.Parent &lt;span style="color:#0000ff;"&gt;as&lt;/span&gt; SPWeb;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                        &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (web != &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                            webApp = web.Site.WebApplication;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                    }&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                    &lt;span style="color:#0000ff;"&gt;else&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                        webApp = SPWebApplication.Lookup(&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Uri(site.Url));&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                }&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                &lt;span style="color:#0000ff;"&gt;else&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                    webApp = siteCol.WebApplication;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (webApp != &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                {&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                    SPWebConfigModification modification =&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                        &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; SPWebConfigModification(ElementName + CreateAttributeString(Attributes), XPathLocation);&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                        &lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                    modification.Owner = &lt;span style="color:#006080;"&gt;&amp;quot;Company.Moss.FeatureReceiver.CustomFeatureReceiver&amp;quot;&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                    modification.Sequence = 0;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                    modification.Type = SPWebConfigModification.SPWebConfigModificationType.EnsureChildNode;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                    modification.Value =&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                         &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Format(CultureInfo.InvariantCulture,&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                         CreateModificationValueString(ElementName, Attributes),&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                         CreateModificationValueArgs(Attributes));&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                    &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (removeModification)&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                        webApp.WebConfigModifications.Remove(modification);&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                    &lt;span style="color:#0000ff;"&gt;else&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                        webApp.WebConfigModifications.Add(modification);&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                    SPFarm.Local.Services.GetValue&amp;lt;SPWebService&amp;gt;().ApplyWebConfigModifications();&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                }&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                &lt;span style="color:#0000ff;"&gt;else&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                    &lt;span style="color:#0000ff;"&gt;throw&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; ApplicationException(&lt;span style="color:#006080;"&gt;&amp;quot;Could not locate a web application&amp;quot;&lt;/span&gt;);&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;            }&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;            &lt;span style="color:#0000ff;"&gt;catch&lt;/span&gt; (Exception ex)&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;            {&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                System.Diagnostics.EventLog el = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; System.Diagnostics.EventLog();&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                el.Source = &lt;span style="color:#006080;"&gt;&amp;quot;WebConfigFeature&amp;quot;&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                el.WriteEntry(ex.Message);&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;            }&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;        }&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;        &lt;span style="color:#008000;"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;        &lt;span style="color:#008000;"&gt;/// Accepts a dictionary object with all of the attributes for the web modification and&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;        &lt;span style="color:#008000;"&gt;/// creates a string representing the attribute values which can be used when creating&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;        &lt;span style="color:#008000;"&gt;/// the SPWebConfigModification object.&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;        &lt;span style="color:#008000;"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;        &lt;span style="color:#008000;"&gt;/// &amp;lt;param name=&amp;quot;Attributes&amp;quot;&amp;gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;        &lt;span style="color:#008000;"&gt;/// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;        &lt;span style="color:#0000ff;"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; CreateAttributeString(Dictionary&amp;lt;&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;&amp;gt; Attributes)&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;        {&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;            &lt;span style="color:#008000;"&gt;//Create a string that looks like this (no line breaks):&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;            &lt;span style="color:#008000;"&gt;//[@Assembly=\&amp;quot;Company.Moss.Activities, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9eed2245513232a4\&amp;quot;]&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;            &lt;span style="color:#008000;"&gt;//[@Namespace=\&amp;quot;Company.Moss.Activities\&amp;quot;]&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;            &lt;span style="color:#008000;"&gt;//[@TypeName=\&amp;quot;*\&amp;quot;][@Authorized=\&amp;quot;True\&amp;quot;]&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;            &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; result = &lt;span style="color:#006080;"&gt;&amp;quot;&amp;quot;&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;            &lt;span style="color:#008000;"&gt;//Check if there are attributes&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;            &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (Attributes.Count &amp;gt; 0)&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;            {&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                &lt;span style="color:#0000ff;"&gt;foreach&lt;/span&gt; (KeyValuePair&amp;lt;&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;&amp;gt; kvp &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; Attributes)&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                {&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                    result += &lt;span style="color:#006080;"&gt;&amp;quot;[@&amp;quot;&lt;/span&gt; + kvp.Key + &lt;span style="color:#006080;"&gt;&amp;quot;=\&amp;quot;&amp;quot;&lt;/span&gt; + kvp.Value + &lt;span style="color:#006080;"&gt;&amp;quot;\&amp;quot;]&amp;quot;&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                }&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;            }&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;            &lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;            &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; result;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;        }&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;        &lt;span style="color:#0000ff;"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; CreateModificationValueString(&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; ElementName, Dictionary&amp;lt;&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;&amp;gt; Attributes)&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;        {&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;            &lt;span style="color:#008000;"&gt;//Create a string that looks like this:&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;            &lt;span style="color:#008000;"&gt;//&amp;quot;&amp;lt;authorizedType Assembly=\&amp;quot;{0}\&amp;quot; Namespace=\&amp;quot;{1}\&amp;quot; TypeName=\&amp;quot;{2}\&amp;quot; Authorized=\&amp;quot;{3}\&amp;quot;/&amp;gt;&amp;quot;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;            &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; result = &lt;span style="color:#006080;"&gt;&amp;quot;&amp;lt;&amp;quot;&lt;/span&gt; + ElementName;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;            &lt;span style="color:#008000;"&gt;//Check if there are attributes (Kind of silly if there aren't!)&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;            &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (Attributes.Count &amp;gt; 0)&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;            {&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; i = 0;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                &lt;span style="color:#0000ff;"&gt;foreach&lt;/span&gt; (&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; key &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; Attributes.Keys)&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                {&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                    result += &lt;span style="color:#006080;"&gt;&amp;quot; &amp;quot;&lt;/span&gt; + key + &lt;span style="color:#006080;"&gt;&amp;quot;=\&amp;quot;{&amp;quot;&lt;/span&gt; + i.ToString() + &lt;span style="color:#006080;"&gt;&amp;quot;}\&amp;quot;&amp;quot;&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                    i++;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                }&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;            }&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;            result += &lt;span style="color:#006080;"&gt;&amp;quot; /&amp;gt;&amp;quot;&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;            &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; result;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;        }&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;        &lt;span style="color:#0000ff;"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;object&lt;/span&gt;[] CreateModificationValueArgs(Dictionary&amp;lt;&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;&amp;gt; Attributes)&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;        {&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;            &lt;span style="color:#008000;"&gt;//Create an object that looks like this:&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;            &lt;span style="color:#008000;"&gt;//&amp;quot;Company.Moss.Activities, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9eed2245513232a4&amp;quot;, &amp;quot;Company.Moss.Activities&amp;quot;, &amp;quot;*&amp;quot;, &amp;quot;True&amp;quot;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;            &lt;span style="color:#0000ff;"&gt;object&lt;/span&gt;[] result = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;object&lt;/span&gt;[Attributes.Count];&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;            &lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;            &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; i = 0;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;            &lt;span style="color:#0000ff;"&gt;foreach&lt;/span&gt;(&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;value&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; Attributes.Values)&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;            {&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                result[i] = &lt;span style="color:#0000ff;"&gt;value&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;                i++;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;            }&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;            &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; result;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;        }&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;    }&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;}&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;&lt;img src="http://randomdust.com/aggbug.aspx?PostID=1111" width="1" height="1"&gt;</content><author><name>ryanm1201</name><uri>http://randomdust.com/members/ryanm1201.aspx</uri></author><category term="SharePoint" scheme="http://randomdust.com/blogs/ryan/archive/tags/SharePoint/default.aspx" /></entry><entry><title>Error Viewing Audit Reports</title><link rel="alternate" type="text/html" href="http://randomdust.com/blogs/ryan/archive/2008/03/21/error-viewing-audit-reports.aspx" /><id>http://randomdust.com/blogs/ryan/archive/2008/03/21/error-viewing-audit-reports.aspx</id><published>2008-03-22T02:54:21Z</published><updated>2008-03-22T02:54:21Z</updated><content type="html">&lt;p&gt;SharePoint auditing came up this past week so I thought it would be good to pull up my VPC and review the options.&amp;#160; I went in to Site Settings and ensured the feature was Active, then clicked on the &amp;quot;Audit Log Reports&amp;quot; under Site Settings --&amp;gt; Site Collection Administration to view the reports.&lt;/p&gt;  &lt;p&gt;Unfortunately, I got an error.&amp;#160; &amp;quot;&lt;em&gt;The specified web does not contain a reporting metadata list&amp;quot;.&lt;/em&gt;&amp;#160; Fortunately, a quick search yields a solution posted on &lt;a href="http://blogs.technet.com/jasbro/archive/2007/07/16/inside-a-support-incident-sharepoint-site-templates-and-auditing.aspx" target="_blank"&gt;jasbro's technet blog&lt;/a&gt;.&amp;#160; He's walking you through a trouble ticket in that post, but the fix is in there.&amp;#160; Run the below command and you'll be all set:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier"&gt;stsadm -o activatefeature -name Reporting -url http://server/sitecollection/ -force&lt;/font&gt;&lt;/p&gt;&lt;img src="http://randomdust.com/aggbug.aspx?PostID=1110" width="1" height="1"&gt;</content><author><name>ryanm1201</name><uri>http://randomdust.com/members/ryanm1201.aspx</uri></author><category term="SharePoint" scheme="http://randomdust.com/blogs/ryan/archive/tags/SharePoint/default.aspx" /></entry><entry><title>Family Trip to Orlando and Caribbean</title><link rel="alternate" type="text/html" href="http://randomdust.com/blogs/ryan/archive/2008/02/10/family-trip-to-orlando-and-caribbean.aspx" /><id>http://randomdust.com/blogs/ryan/archive/2008/02/10/family-trip-to-orlando-and-caribbean.aspx</id><published>2008-02-11T01:44:00Z</published><updated>2008-02-11T01:44:00Z</updated><content type="html">&lt;p&gt;A couple weeks ago the family went to Orlando for a couple days and then took a cruise out of Canaveral down to the Caribbean.&amp;nbsp; While in Orlando we visited SeaWorld in about 45 degree weather, but it was still a good visit.&amp;nbsp; My girls hadn't been there before and they had a blast.&amp;nbsp; After that, we hopped on a ship sailing for Nassau where we visited Atlantis.&amp;nbsp; It was the first cruise for me and my girls, but Bridget was well experienced.&amp;nbsp; Her parents also joined us so we had a good group.&amp;nbsp; The cruise was a lot of fun but time demanding.&amp;nbsp; We had to be up at certain times, eat at certain times, etc.&amp;nbsp; It was well worth it though.&amp;nbsp; Especially when we got to Atlantis and spent some time with the dolphins.&lt;/p&gt;&lt;p&gt;&lt;a href="http://randomdust.com/photos/mcintyre_family_gallery/category1015.aspx"&gt;Here are the pictures from the trip.&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;And one here if you don't feel like viewing them all:&lt;/p&gt;&lt;p&gt;&lt;img src="http://randomdust.com/photos/mcintyre_family_gallery/images/1049/425x325.aspx" title="Family With Dolphin" alt="Family With Dolphin" height="325" width="425"&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://randomdust.com/aggbug.aspx?PostID=1103" width="1" height="1"&gt;</content><author><name>ryanm1201</name><uri>http://randomdust.com/members/ryanm1201.aspx</uri></author><category term="Personal" scheme="http://randomdust.com/blogs/ryan/archive/tags/Personal/default.aspx" /><category term="Photography" scheme="http://randomdust.com/blogs/ryan/archive/tags/Photography/default.aspx" /></entry><entry><title>The Library of Congress' Photos on Flickr</title><link rel="alternate" type="text/html" href="http://randomdust.com/blogs/ryan/archive/2008/02/05/the-library-of-congress-photos-on-flickr.aspx" /><id>http://randomdust.com/blogs/ryan/archive/2008/02/05/the-library-of-congress-photos-on-flickr.aspx</id><published>2008-02-06T03:23:59Z</published><updated>2008-02-06T03:23:59Z</updated><content type="html">&lt;p&gt;This isn't good for my marriage.&amp;#160; I already get in trouble for spending hours messing with photos I or other family members have taken.&amp;#160; Now &lt;a href="http://www.flickr.com/photos/library_of_congress/" target="_blank"&gt;The Library of Congress is publishing photos on Flickr&lt;/a&gt; for our viewing pleasure.&amp;#160; With no copyright restrictions, to boot!&amp;#160; It may take some time to get through them all, but there are some good ones.&amp;#160; With no restrictions I may even download some for print and framing.&lt;/p&gt;  &lt;p&gt;Some of my favorites after browsing for 10 minutes:&lt;/p&gt;  &lt;p&gt;&lt;img src="http://farm3.static.flickr.com/2022/2179931106_344c5984a7.jpg?v=0" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;img src="http://farm3.static.flickr.com/2400/2163472204_5c5c1a7bd8.jpg?v=0" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;img src="http://farm3.static.flickr.com/2386/2178419405_6e9c6643b6.jpg?v=0" /&gt;&lt;/p&gt;&lt;img src="http://randomdust.com/aggbug.aspx?PostID=999" width="1" height="1"&gt;</content><author><name>ryanm1201</name><uri>http://randomdust.com/members/ryanm1201.aspx</uri></author><category term="Personal" scheme="http://randomdust.com/blogs/ryan/archive/tags/Personal/default.aspx" /><category term="Photography" scheme="http://randomdust.com/blogs/ryan/archive/tags/Photography/default.aspx" /></entry><entry><title>FeedReader Contribution</title><link rel="alternate" type="text/html" href="http://randomdust.com/blogs/ryan/archive/2008/01/17/feedreader-contribution.aspx" /><id>http://randomdust.com/blogs/ryan/archive/2008/01/17/feedreader-contribution.aspx</id><published>2008-01-18T03:55:18Z</published><updated>2008-01-18T03:55:18Z</updated><content type="html">&lt;p&gt;I recently made some changes to Tim Heuer's &lt;a href="http://www.codeplex.com/Wiki/View.aspx?ProjectName=FeedReader" target="_blank"&gt;FeedReader&lt;/a&gt; to help fulfill some client requirements and made some time to contribute the changes to the CodePlex project for others to use.&amp;#160; We have been happily using it ever since.&amp;#160; Tim's done a great job providing a tool that fills a gap in SharePoint and I'm happy to help make it better.&lt;/p&gt;  &lt;p&gt;Tim, thanks for the &lt;a href="http://timheuer.com/blog/archive/2008/01/17/feedreader-sharpoint-web-part-gets-contributions-again.aspx" target="_blank"&gt;opportunity to contribute&lt;/a&gt;!&amp;#160; &lt;/p&gt;&lt;img src="http://randomdust.com/aggbug.aspx?PostID=998" width="1" height="1"&gt;</content><author><name>ryanm1201</name><uri>http://randomdust.com/members/ryanm1201.aspx</uri></author><category term="SharePoint" scheme="http://randomdust.com/blogs/ryan/archive/tags/SharePoint/default.aspx" /></entry><entry><title>SharePoint Deployment Guidelines</title><link rel="alternate" type="text/html" href="http://randomdust.com/blogs/ryan/archive/2008/01/17/sharepoint-deployment-guidelines.aspx" /><id>http://randomdust.com/blogs/ryan/archive/2008/01/17/sharepoint-deployment-guidelines.aspx</id><published>2008-01-18T03:34:16Z</published><updated>2008-01-18T03:34:16Z</updated><content type="html">&lt;p&gt;Apparently Microsoft and I are on the same schedule.&amp;#160; I've had an outstanding task to write some deployment guidelines for my current client and we've finally been able to give it a priority where I can focus on it.&amp;#160; I still have some finishing up to do, but along the same lines Microsoft just released a white paper titled &lt;strong&gt;Implementing Microsoft Office SharePoint Server 2007 and Windows SharePoint Services 3.0 Solutions&lt;/strong&gt; (&lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=65f21935-cbc0-4178-8c08-4c56f721c87d&amp;amp;displaylang=en&amp;amp;tm" target="_blank"&gt;find it here&lt;/a&gt;).&amp;#160; It doesn't go into as much detail as I do (or maybe a more correct statement would be it goes into &lt;em&gt;different&lt;/em&gt; detail), but it gives a good overview of how the different environments interact and some good info on solutions and content deployment.&amp;#160; &lt;/p&gt;  &lt;p&gt;Here's an excerpt from the Executive Summary:   &lt;br /&gt;&amp;quot;This document outlines a methodology for SharePoint team development, customization and content authoring that aims at accelerating implementation and mitigates production risks.&lt;/p&gt;  &lt;p&gt;To form the methodology, the document reviews implementation scenarios, tools and development environment.&amp;quot;&lt;/p&gt;  &lt;p&gt;Definitely worth the read.&lt;/p&gt;&lt;img src="http://randomdust.com/aggbug.aspx?PostID=997" width="1" height="1"&gt;</content><author><name>ryanm1201</name><uri>http://randomdust.com/members/ryanm1201.aspx</uri></author><category term="SharePoint" scheme="http://randomdust.com/blogs/ryan/archive/tags/SharePoint/default.aspx" /></entry><entry><title>Designer Workflow "Unknown Error"</title><link rel="alternate" type="text/html" href="http://randomdust.com/blogs/ryan/archive/2008/01/09/designer-workflow-unknown-error.aspx" /><id>http://randomdust.com/blogs/ryan/archive/2008/01/09/designer-workflow-unknown-error.aspx</id><published>2008-01-10T04:15:40Z</published><updated>2008-01-10T04:15:40Z</updated><content type="html">&lt;p&gt;We had to go to Microsoft for this solution so I can't take credit for it but I wanted to post the info here for others who may run into it.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;Issue:&lt;/u&gt;    &lt;br /&gt;We have a couple lists that have many columns (70 - 90, roughly) with various data types.&amp;#160; At least one of the columns has the option set to allow multiple selections, like on a Person/Group column.&amp;#160; There is a workflow attached to the list.&amp;#160; It doesn't matter what the workflow does, could be updating a column value, sending email, whatever.&lt;/p&gt;  &lt;p&gt;At some point the workflow fails to complete and throws an error.&amp;#160; Diving into the workflow tasks for the item&amp;#160; the only error shown is &amp;quot;Unknown Error&amp;quot;.&amp;#160; Very helpful.&amp;#160; This error results regardless of how the workflow starts, either manually or automatic.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;Research:&lt;/u&gt;    &lt;br /&gt;Before we opened a case with MS I did some work to try to duplicate it.&amp;#160; Creating a large list with many column types worked just fine, regardless of combination.&amp;#160; The only way I could re-create the issue was to use a list template created from a list that was already showing the symptoms.&lt;/p&gt;  &lt;p&gt;Once we brought in MS we narrowed the error down to workflow's created within SharePoint Designer.&amp;#160; That was a good step in the right direction.&amp;#160; &lt;/p&gt;  &lt;p&gt;My next MS contact was from the Designer team.&amp;#160; He was unable to duplicate the issue by creating a list from scratch as well, but could duplicate it using the list template I provided.&amp;#160; Below is his solution to get the list back to allowing workflow's without error.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;Solution:     &lt;br /&gt;&lt;/u&gt;This may be more of a work-around than a solution, but it gets the job done.&amp;#160; Basically, it involves updating the multi-select column value to itself within the workflow along with whatever else the workflow is doing.&amp;#160; If you have many multi-select columns it may take you a couple tries to find the culprit, or you can just do this to all of them and be sure you got it.&amp;#160; It doesn't hurt.&amp;#160; Here's the process assuming you have a People/Group column:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Open the workflow that is having issues and click the Variables button at the bottom.&lt;/li&gt;    &lt;li&gt;Click the Add button and give the variable a name and a type of string.&lt;/li&gt;    &lt;li&gt;Add the Set Workflow Variable action to the top of your Actions since we need to use that variable in the update action.&lt;/li&gt;    &lt;li&gt;Set the workflow variable to the current value of the list column by choosing Current Item as the Source and the list column as the Field&lt;/li&gt;    &lt;li&gt;Modify the current update list item action (or add one if you don't already have one) to include the values you want updated. The order doesn't seem to matter, so just click the add button.&lt;/li&gt;    &lt;ol&gt;     &lt;li&gt;For the Set this field drop down select the name of the column that has the People and Group type.&lt;/li&gt;      &lt;li&gt;For the To this value click the fx button and select Workflow Data.&lt;/li&gt;      &lt;li&gt;For the Field select the variable we created earlier and click Ok. Keep clicking ok and eventually click finish. At this point your existing list should work.&lt;/li&gt;   &lt;/ol&gt; &lt;/ol&gt;  &lt;p&gt;&lt;u&gt;Open Question:     &lt;br /&gt;&lt;/u&gt;How does the list get to this corrupt state in the first place?&amp;#160; It's not related to the number or type of columns.&amp;#160; If you have any ideas please contact me or leave a comment.&lt;/p&gt;&lt;img src="http://randomdust.com/aggbug.aspx?PostID=995" width="1" height="1"&gt;</content><author><name>ryanm1201</name><uri>http://randomdust.com/members/ryanm1201.aspx</uri></author><category term="SharePoint" scheme="http://randomdust.com/blogs/ryan/archive/tags/SharePoint/default.aspx" /></entry></feed>