<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://randomdust.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Random Dust</title><link>http://randomdust.com/blogs/default.aspx</link><description>Thoughts (blogs), images (photos) and discussions (forums) Free-For-All</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.2)</generator><item><title>Blog Moved</title><link>http://randomdust.com/blogs/ryan/archive/2010/11/30/blog-moved.aspx</link><pubDate>Tue, 30 Nov 2010 19:38:42 GMT</pubDate><guid isPermaLink="false">20e6a355-dcf5-4c47-89ee-e927015ace86:1239</guid><dc:creator>ryanm1201</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Move along, there’s nothing to see here.&lt;/p&gt;  &lt;p&gt;I’ve given up on Community Server as my blog engine and have moved to WordPress.&amp;#160; The new blog is located here: &lt;a title="http://blog.randomdust.com" href="http://blog.randomdust.com"&gt;http://blog.randomdust.com&lt;/a&gt;.&amp;#160; I’ve moved over all current posts to the new site, so if you’ve wanted to comment on anything but weren’t able to on this blog, move on over to the new site and comment away.&lt;/p&gt;  &lt;p&gt;At some point I may add some redirects to the new location, but not today.&lt;/p&gt;&lt;img src="http://randomdust.com/aggbug.aspx?PostID=1239" width="1" height="1"&gt;</description><category domain="http://randomdust.com/blogs/ryan/archive/tags/.NET/default.aspx">.NET</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/Personal/default.aspx">Personal</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/Business/default.aspx">Business</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/Politics/default.aspx">Politics</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/BizTalk/default.aspx">BizTalk</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/Technical/default.aspx">Technical</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/Windows+Workflow/default.aspx">Windows Workflow</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/Mobile/default.aspx">Mobile</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/Photography/default.aspx">Photography</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/InfoPath/default.aspx">InfoPath</category></item><item><title>Read Multiple Values from Person or Group Field</title><link>http://randomdust.com/blogs/ryan/archive/2010/11/14/read-multiple-values-from-person-or-group-field.aspx</link><pubDate>Sun, 14 Nov 2010 21:56:31 GMT</pubDate><guid isPermaLink="false">20e6a355-dcf5-4c47-89ee-e927015ace86:1238</guid><dc:creator>ryanm1201</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;When upgrading from SharePoint 2007 to 2010, one of the areas you need to look at is any custom code that was written for the 2007 environment.&amp;#160; Depending on what that code is doing, the effort to upgrade it may be larger than initially thought.&amp;#160; I recently ran into such a situation, and discovered some oddities I hadn’t run into before regarding Person or Group fields and how the values from those fields are submitted from a datasheet view.&lt;/p&gt;  &lt;p&gt;First, the basics of the relevant code for the issue.&amp;#160; There is an event receiver that handles the ItemUpdating event and it needs to read the values a user enters into a People or Group column that allows multiple selections.&lt;/p&gt;  &lt;p&gt;The 2007 code used to read the new values entered was:&lt;/p&gt;  &lt;div style="border-bottom:silver 1px solid;text-align:left;border-left:silver 1px solid;padding-bottom:4px;line-height:12pt;background-color:#f4f4f4;margin:20px 0px 10px;padding-left:4px;width:97.5%;padding-right:4px;font-family:'Courier New', courier, monospace;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;border-top:silver 1px solid;cursor:text;border-right:silver 1px solid;padding-top:4px;" id="codeSnippetWrapper"&gt;   &lt;div style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;" id="codeSnippet"&gt;     &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;object&lt;/span&gt; peopleAfterProp = properties.AfterProperties[listItem.Fields[“FieldName”].InternalName];&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum2"&gt;   2:&lt;/span&gt; SPFieldUserValueCollection newUsers = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; SPFieldUserValueCollection(listItem.Web, peopleAfterProp.ToString());&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;This code read the new values entered by the user and created a new SPFieldUserValueCollection object containing an SPFieldUserValue for each person or group entered.&amp;#160; It worked fine in 2007 for both standard list views and datasheet view.&amp;#160; Didn’t work quite as well in 2010. :)&lt;/p&gt;

&lt;p&gt;In 2010 for standard list views, properties.AfterProperties for the field returns values such as &amp;quot;9;#BLACKDOG\\normaluser1;#2;#BLACKDOG\\ryan&amp;quot;, which is perfect and creates a valid SPFieldUserValueCollection.&amp;#160; In 2010 datasheet view, the same field and the same users returns a value of &amp;quot;9;#;#2;#&amp;quot;.&amp;#160; When the SPFIeldUserValueCollection is created using the code shown above, only a single SPFieldUserValue is created for the first user (ID = 9), and it’s invalid.&amp;#160; So basically, the datasheet view in 2010 for People or Group columns has what I would call a bug (MS might disagree) and only returns data containing the user IDs from AfterProperties.&amp;#160; It’s thus impossible to create a valid SPFieldUserValueCollection object.&lt;/p&gt;

&lt;p&gt;There’s the problem, now how to fix it.&amp;#160; Since datasheet only returns the IDs, and the string format (using the “;#” delimiter) is the same as when submitted from a list view, we can key off the IDs.&amp;#160; If we can extract the IDs of the users, we can then quite easily go on to create SPUser objects, which is really where we need to get.&amp;#160; The goal is to find some code that we can use to create user objects regardless of which view the user is submitting data through.&lt;/p&gt;

&lt;p&gt;My thought was to get a Dictionary object populated with key value pairs when a standard list view is used, and the same Dictionary object populated with just keys when datasheet view is used.&amp;#160; To parse out the values, I started by using some &lt;a href="http://sharepointandstuff.blogspot.com/2009/07/parsing-sharepoint-delimited-multiple.html" target="_blank"&gt;code posted by Tony DalPezzo&lt;/a&gt;, specifically his GetDelimitedLookupValuesDictionary method.&amp;#160; After some work with the regular expression (which is not my strong suit, by the way!), I ended up with the method:&lt;/p&gt;

&lt;div style="border-bottom:silver 1px solid;text-align:left;border-left:silver 1px solid;padding-bottom:4px;line-height:12pt;background-color:#f4f4f4;margin:20px 0px 10px;padding-left:4px;width:97.5%;padding-right:4px;font-family:'Courier New', courier, monospace;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;border-top:silver 1px solid;cursor:text;border-right:silver 1px solid;padding-top:4px;" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;static&lt;/span&gt; Dictionary&amp;lt;&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt;, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;&amp;gt; GetDelimitedLookupValuesDictionary(&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; sFieldValue)&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum2"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum3"&gt;   3:&lt;/span&gt;     Dictionary&amp;lt;&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt;, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;&amp;gt; results = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Dictionary&amp;lt;&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt;, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;&amp;gt;();&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum4"&gt;   4:&lt;/span&gt;&amp;#160; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum5"&gt;   5:&lt;/span&gt;     System.Text.RegularExpressions.Regex regexMultiValueField = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; System.Text.RegularExpressions.Regex(&lt;span style="color:#006080;"&gt;@&amp;quot;(?&amp;lt;id&amp;gt;(-?\d+));#(?&amp;lt;value&amp;gt;(\w+\\+\w+)?)(;#|$)&amp;quot;&lt;/span&gt;, &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum6"&gt;   6:&lt;/span&gt;         System.Text.RegularExpressions.RegexOptions.Compiled);&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum7"&gt;   7:&lt;/span&gt;     System.Text.RegularExpressions.Match choice = regexMultiValueField.Match(sFieldValue);&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum8"&gt;   8:&lt;/span&gt;&amp;#160; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum9"&gt;   9:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;while&lt;/span&gt; (choice.Success)&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum10"&gt;  10:&lt;/span&gt;     {&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum11"&gt;  11:&lt;/span&gt;         results.Add(Convert.ToInt32(choice.Groups[&lt;span style="color:#006080;"&gt;&amp;quot;id&amp;quot;&lt;/span&gt;].Value), choice.Groups[&lt;span style="color:#006080;"&gt;&amp;quot;value&amp;quot;&lt;/span&gt;].Value);&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum12"&gt;  12:&lt;/span&gt;         choice = choice.NextMatch();&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum13"&gt;  13:&lt;/span&gt;     }&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum14"&gt;  14:&lt;/span&gt;&amp;#160; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum15"&gt;  15:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; results;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum16"&gt;  16:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Feel free to critique my regex, but it works.&amp;#160; Regardless of which view the user submits data through, I get a valid Dictionary object back.&amp;#160; Now we can create List&amp;lt;&amp;gt; objects containing our SPUsers by looking up each user in the Dictionary.&lt;/p&gt;

&lt;div style="border-bottom:silver 1px solid;text-align:left;border-left:silver 1px solid;padding-bottom:4px;line-height:12pt;background-color:#f4f4f4;margin:20px 0px 10px;padding-left:4px;width:97.5%;padding-right:4px;font-family:'Courier New', courier, monospace;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;border-top:silver 1px solid;cursor:text;border-right:silver 1px solid;padding-top:4px;" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum1"&gt;   1:&lt;/span&gt; Dictionary&amp;lt;&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt;, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;&amp;gt; peopleAfterDic = GetDelimitedLookupValuesDictionary(peopleAfterProp.ToString());&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum2"&gt;   2:&lt;/span&gt; List&amp;lt;&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt;&amp;gt; peopleIdsAfter = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; List&amp;lt;&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt;&amp;gt;();&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum3"&gt;   3:&lt;/span&gt; List&amp;lt;SPUser&amp;gt; peopleAfter = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; List&amp;lt;SPUser&amp;gt;();&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum4"&gt;   4:&lt;/span&gt;&amp;#160; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum5"&gt;   5:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;foreach&lt;/span&gt; (KeyValuePair&amp;lt;&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt;, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;&amp;gt; personAfter &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; peopleAfterDic)&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum6"&gt;   6:&lt;/span&gt; {&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum7"&gt;   7:&lt;/span&gt;     &lt;span style="color:#008000;"&gt;// Ensure the user exists in the site collection (only possible to select users that aren't through list view, not through datasheet view)&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum8"&gt;   8:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (personAfter.Key == -1)&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum9"&gt;   9:&lt;/span&gt;     {&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum10"&gt;  10:&lt;/span&gt;         SPUser tempUser = listItem.Web.EnsureUser(personAfter.Value);&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum11"&gt;  11:&lt;/span&gt;&amp;#160; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum12"&gt;  12:&lt;/span&gt;         peopleIdsAfter.Add(tempUser.ID);&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum13"&gt;  13:&lt;/span&gt;         peopleAfter.Add(tempUser);&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum14"&gt;  14:&lt;/span&gt;     }&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum15"&gt;  15:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;else&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum16"&gt;  16:&lt;/span&gt;     {&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum17"&gt;  17:&lt;/span&gt;         peopleIdsAfter.Add(personAfter.Key);&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum18"&gt;  18:&lt;/span&gt;         peopleAfter.Add(listItem.Web.SiteUsers.GetByID(personAfter.Key));&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum19"&gt;  19:&lt;/span&gt;     }&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum20"&gt;  20:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Problem solved.&lt;/p&gt;

&lt;p&gt;Hopefully this will be fixed in an update from Microsoft.&amp;#160; If / when it is, this code will still work, but going back to the expected SPFieldUserValueCollection method would probably be best.&lt;/p&gt;

&lt;p&gt;P.S. Notice the check in the code above for a Key value of –1.&amp;#160; That means the SPUser that the end user chose through the standard list view isn’t yet a user listed in the site collection.&amp;#160; So we need to call EnsureUser, which adds the user and returns the valid SPUser object.&amp;#160; This can’t happen with the datasheet view as the UI only allows selecting existing site collection users.&lt;/p&gt;&lt;img src="http://randomdust.com/aggbug.aspx?PostID=1238" width="1" height="1"&gt;</description><category domain="http://randomdust.com/blogs/ryan/archive/tags/Technical/default.aspx">Technical</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/SharePoint/default.aspx">SharePoint</category></item><item><title>Application Templates for SharePoint 2010??</title><link>http://randomdust.com/blogs/ryan/archive/2010/10/26/application-templates-for-sharepoint-2010.aspx</link><pubDate>Tue, 26 Oct 2010 20:43:53 GMT</pubDate><guid isPermaLink="false">20e6a355-dcf5-4c47-89ee-e927015ace86:1237</guid><dc:creator>ryanm1201</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;For those folks who skip to the end of the book to see how things finish, I’ll jump to the point.&amp;#160; Doesn’t look like Microsoft is releasing any of the Application Templates (i.e. Fabulous 40) for SharePoint 2010.&amp;#160; So says &lt;a href="http://blogs.technet.com/b/tothesharepoint/archive/2010/08/18/sharepoint-2010-products-upgrade-and-the-fabulous-40-application-templates.aspx" target="_blank"&gt;To the SharePoint blog&lt;/a&gt;, and mentioned on the home page for the existing &lt;a href="http://technet.microsoft.com/en-us/windowsserver/sharepoint/bb407286.aspx" target="_blank"&gt;2007 application templates&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;That’s the bad news.&amp;#160; Now, if you’re still with me after that lengthy paragraph, here’s the good news.&amp;#160; The community has been stepping up to fill the gap.&amp;#160; Specifically, a company called TechSol.&amp;#160; So, if you absolutely have to have one of the Fab 40 templates, perhaps it’s been updated for you.&amp;#160; See the links below for the great work they’ve done.&amp;#160; As always, please use caution and test before installing in a production environment. :)&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.techsolutions.net/Blog/tabid/65/EntryId/18/Fab-40-for-Sharepoint-Foundation.aspx" target="_blank"&gt;Fab 40 for SharePoint 2010 Foundation&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://techsolutions.net/Blog/tabid/65/EntryId/17/Fab-40-Templates-for-MOSS-2010.aspx" target="_blank"&gt;Fab 40 for SharePoint 2010 Server&lt;/a&gt;&lt;/p&gt;&lt;img src="http://randomdust.com/aggbug.aspx?PostID=1237" width="1" height="1"&gt;</description><category domain="http://randomdust.com/blogs/ryan/archive/tags/Technical/default.aspx">Technical</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/SharePoint/default.aspx">SharePoint</category></item><item><title>Could not establish trust relationship for the SSL/TLS secure channel</title><link>http://randomdust.com/blogs/ryan/archive/2010/10/15/could-not-establish-trust-relationship-for-the-ssl-tls-secure-channel.aspx</link><pubDate>Fri, 15 Oct 2010 19:16:00 GMT</pubDate><guid isPermaLink="false">20e6a355-dcf5-4c47-89ee-e927015ace86:1236</guid><dc:creator>ryanm1201</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;On a recent project, we had a requirement to use a SharePoint Designer workflow to call an external web service.&amp;nbsp; Instead of writing my own custom Activity, I did a search to see what was out there and found the &lt;a href="http://ilovesharepoint.codeplex.com/releases/view/20898" target="_blank"&gt;iLove SharePoint Designer Actions&lt;/a&gt;.&amp;nbsp; One of the actions he has in there is one that can call a SOAP 1.1 or 1.2 web service, which is exactly what I needed.&amp;nbsp; Although it was written for SharePoint 2007, I pulled it into SharePoint 2010 and tested it out and found it to work just fine.&lt;/p&gt;  &lt;p&gt;The end point for our test web service was an http address.&amp;nbsp; The end point for production was https.&amp;nbsp; As soon as we switched to the production end point, we began getting the error:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Arial"&gt;System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. &lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Arial"&gt;---&amp;gt; System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;That’s is the error we saw in the ULS logs.&amp;nbsp; The nice error we saw in the workflow history was something useless like “An exception occurred”.&lt;/p&gt;  &lt;p&gt;The error boils down to the code not trusting the secure certificate.&amp;nbsp; I tried a couple non-code solutions first, one modifying the web.config:&lt;/p&gt;  &lt;div style="border:1px solid silver;text-align:left;padding:4px;line-height:12pt;margin:20px 0px 10px;width:97.5%;font-family:'Courier New',courier,monospace;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;cursor:text;" id="codeSnippetWrapper"&gt;   &lt;div style="border-style:none;text-align:left;padding:0px;line-height:12pt;width:100%;font-family:'Courier New',courier,monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;" id="codeSnippet"&gt;     &lt;pre style="border-style:none;text-align:left;padding:0px;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:'Courier New',courier,monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;"&gt;&lt;span id="lnum1"&gt;   1:&lt;/span&gt; &lt;span&gt;&amp;lt;&lt;/span&gt;&lt;span&gt;servicePointManager&lt;/span&gt; &lt;span&gt;checkCertificateName&lt;/span&gt;&lt;span&gt;="false"&lt;/span&gt; &lt;span&gt;checkCertificateRevocationList&lt;/span&gt;&lt;span&gt;="false"&lt;/span&gt;&lt;span&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;And another importing the security certificate on the server.&amp;nbsp; Neither option worked for me, although some postings I found on the Internet suggested one or the other worked for some folks.&lt;/p&gt;

&lt;p&gt;So after exhausting the non-code solutions, I dove into the code of the iLove SharePoint Actions to add some code to tell it to ignore the certificate check.&amp;nbsp; Some searching pointed me to &lt;a href="http://www.codeproject.com/Forums/1649/Csharp.aspx?fid=1649&amp;amp;df=90&amp;amp;mpp=25&amp;amp;sort=Position&amp;amp;select=3126652&amp;amp;tid=3121885" target="_blank"&gt;here&lt;/a&gt; and &lt;a href="http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/98aa34b2-69b5-4b8a-8f77-2a3f08869e3b" target="_blank"&gt;here&lt;/a&gt;.&amp;nbsp; So I pulled down the iLove SharePoint source from codeplex, opened it up in VS2010 and upgraded it.&amp;nbsp; I had to change the Microsoft.SharePoint.dll references since I was using SharePoint 2010, and there were some build commands that needed to be updated as well.&amp;nbsp; Once those were done, I added the line:&lt;/p&gt;

&lt;div style="border:1px solid silver;text-align:left;padding:4px;line-height:12pt;margin:20px 0px 10px;width:97.5%;font-family:'Courier New',courier,monospace;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;cursor:text;" id="codeSnippetWrapper"&gt;
  &lt;div style="border-style:none;text-align:left;padding:0px;line-height:12pt;width:100%;font-family:'Courier New',courier,monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;" id="codeSnippet"&gt;
    &lt;pre style="border-style:none;text-align:left;padding:0px;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:'Courier New',courier,monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;"&gt;&lt;span id="lnum1"&gt;   1:&lt;/span&gt; ServicePointManager.ServerCertificateValidationCallback = (obj,certificate,chain,errors) =&amp;gt; &lt;span&gt;true&lt;/span&gt;;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Right before the call to the web service.&amp;nbsp; Once that was built and deployed, problem solved.&lt;/p&gt;

&lt;p&gt;Looking at it from a security perspective, probably not the best solution as it opens up the possibility to call services on sites with truly invalid certificates, but being in a closed environment it was acceptable.&lt;/p&gt;&lt;img src="http://randomdust.com/aggbug.aspx?PostID=1236" width="1" height="1"&gt;</description><category domain="http://randomdust.com/blogs/ryan/archive/tags/Technical/default.aspx">Technical</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/Windows+Workflow/default.aspx">Windows Workflow</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/SharePoint/default.aspx">SharePoint</category></item><item><title>Selling and Delivering SharePoint Governance</title><link>http://randomdust.com/blogs/ryan/archive/2010/09/21/selling-and-delivering-sharepoint-governance.aspx</link><pubDate>Tue, 21 Sep 2010 19:12:00 GMT</pubDate><guid isPermaLink="false">20e6a355-dcf5-4c47-89ee-e927015ace86:1235</guid><dc:creator>ryanm1201</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Look up the word “governance” in &lt;a href="http://en.wikipedia.org/wiki/Governance" target="_blank"&gt;wikipedia&lt;/a&gt; and 
you’ll find sentences such as “It relates to decisions that define 
&lt;i&gt;expectations&lt;/i&gt;, grant power, or verify performance. It consists 
either of a 
separate process or of a specific part of management or leadership 
processes. 
Sometimes people set up a government to administer these processes and 
systems.”&amp;nbsp; Ok, that’s not terribly vague.&amp;nbsp; Now, trying to put that into 
SharePoint terms the following come to mind:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Authentication &lt;/li&gt;&lt;li&gt;Authorization &lt;/li&gt;&lt;li&gt;Business Continuity &lt;/li&gt;&lt;li&gt;Customization Policy &lt;/li&gt;&lt;li&gt;Deployment Model &lt;/li&gt;&lt;li&gt;Governance Model and Policy &lt;/li&gt;&lt;li&gt;Governance Board or Committee &lt;/li&gt;&lt;li&gt;Testing &lt;/li&gt;&lt;li&gt;Training &lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;And on and on.&amp;nbsp; If you take some time browsing through the &lt;a href="http://technet.microsoft.com/en-us/office/sharepointserver/bb507202.aspx" target="_blank"&gt;SharePoint
 Governance site on TechNet&lt;/a&gt;, you’ll find a wide 
range of topics as well as multiple sample governance plans in the 
content and 
links therein.&amp;nbsp; Point being, the single word of “governance” quickly 
expands to 
cover a wide range of topics.&amp;nbsp; If we’re not too careful when selling or 
delivering governance, we can easily get caught up in trying to cover 
every 
angle and aspect and can end up creating a true Government bureaucracy 
that 
rivals Washington D.C.&amp;nbsp; Not a good thing for SharePoint to be 
successful.&lt;/p&gt;
&lt;p&gt;Because SharePoint Governance covers such a wide range of topics and 
companies have varying priorities and strengths/weaknesses, governance 
is 
defined differently for any given company.&amp;nbsp; There is no “one size fits 
all”.&amp;nbsp; 
This makes it quite difficult, if not impossible, to provide an accurate
 list of 
topics that must be defined in order for the governance check box to be 
marked 
as complete.&amp;nbsp; Another complexity is that if governance is done right, it
 
&lt;b&gt;never&lt;/b&gt; is complete.&amp;nbsp; It’s living and grows with the organization.&amp;nbsp;
 Whether 
you are in consulting or are a driving force for SharePoint within a 
company, 
this makes selling the concept of governance difficult.&amp;nbsp; Maybe to 
clarify a bit, 
it’s difficult to sell governance to leadership and have a clear 
definition of 
what will be delivered.&lt;/p&gt;
&lt;p&gt;To give an example, I recently completed a governance project (the 
inspiration for this post) where the definition of what was to be 
delivered was 
defined up front down to the governance topic level.&amp;nbsp; That was great for
 both 
estimating level of effort and defining expectations with management up 
front, 
but due to the variations mentioned above, that plan needed to be 
flexible.&amp;nbsp; It 
wasn’t.&amp;nbsp; It was near impossible for a PM to track actuals back to 
specific tasks 
listed in the governance definition because as the process of 
discovering the 
governance needs of the organization progressed, those tasks needed to 
change.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;How to be successful then?&amp;nbsp; First and foremost, get executive 
commitment.&amp;nbsp; 
This is one SharePoint topic where I think it must come from the top to 
be 
successful.&amp;nbsp; If the executives show support and dedication, and back up 
that 
statement with funds and a project to ensure its success, the entire 
company 
will see that commitment and organization and be driven to meet 
expectations.&amp;nbsp; 
Second, define scope by listing areas of focus instead of specific 
policies to 
include in the governance plan.&amp;nbsp; For example, operations, user training 
and 
experience, and the definition of the governance process are all items 
that must 
be touched on and the detailed definition of which comes through the 
process of 
defining governance.&amp;nbsp; List them in the scope, and deliver by holding 
stakeholder 
meetings and make recommendations based on the needs and capabilities of
 the 
organization.&lt;/p&gt;
&lt;p&gt;Finally, there is the discussion of time and cost.&amp;nbsp; As a rule of 
thumb, I’d 
recommend three to six weeks.&amp;nbsp; At least three to get to the point where 
governance has been defined enough to be able to kick off a governance 
process, 
and up to six to make that process more refined and solid to eliminate 
some of 
the vague areas that will exist if only a three week effort.&amp;nbsp; Following 
the 
initial effort is where the executive commitment really pays off as the 
process 
involves the right people at the right frequency to ensure the 
governance 
process and policies grow and change to meet the organizational needs.&lt;/p&gt;&lt;img src="http://randomdust.com/aggbug.aspx?PostID=1235" width="1" height="1"&gt;</description><category domain="http://randomdust.com/blogs/ryan/archive/tags/Business/default.aspx">Business</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/Technical/default.aspx">Technical</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/SharePoint/default.aspx">SharePoint</category></item><item><title>Beard-A-Thon</title><link>http://randomdust.com/blogs/ryan/archive/2010/04/15/beard-a-thon.aspx</link><pubDate>Thu, 15 Apr 2010 12:58:00 GMT</pubDate><guid isPermaLink="false">20e6a355-dcf5-4c47-89ee-e927015ace86:1229</guid><dc:creator>ryanm1201</dc:creator><slash:comments>1</slash:comments><description>&lt;P&gt;I'm reaching out to you (if anyone still reads this blog) looking for some support with a charity. For those of you that are hockey fans, you're familiar with the NHL tradition of the players growing beards as long as their team is in the playoffs. If you're not hockey fans, trust me, they do. There's a new charity (at least new to me) that is extending that to fans and at the same time working to raise money for charities. I decided to participate and see if I can become &lt;A href="http://www.youtube.com/watch?v=8Bc0WjTT0Ps"&gt;The Most Interesting Man in the World&lt;/A&gt;! &lt;/P&gt;
&lt;P&gt;The Colorado Avalanche charity benefiting from this program is KSE Charities, a charity that supports Colorado kids and families by providing health, education, literacy and fitness programs. A good cause, if you ask me (otherwise, I wouldn't be doing it!) Any donation you make will be tax deductible. &lt;/P&gt;
&lt;P&gt;If you're interested in donating, or just interested in following along in the path to a great beard, check out &lt;A href="http://www.beardathon.com/avalanche/rmcintyre/profile.aspx"&gt;http://www.beardathon.com/avalanche/rmcintyre/profile.aspx&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;Thanks for taking the time. &lt;/P&gt;
&lt;P&gt;Ryan&lt;/P&gt;&lt;img src="http://randomdust.com/aggbug.aspx?PostID=1229" width="1" height="1"&gt;</description></item><item><title>Document Version Properties</title><link>http://randomdust.com/blogs/ryan/archive/2009/06/24/document-version-properties.aspx</link><pubDate>Thu, 25 Jun 2009 00:09:00 GMT</pubDate><guid isPermaLink="false">20e6a355-dcf5-4c47-89ee-e927015ace86:1225</guid><dc:creator>ryanm1201</dc:creator><slash:comments>0</slash:comments><description>&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;</description><category domain="http://randomdust.com/blogs/ryan/archive/tags/.NET/default.aspx">.NET</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/Technical/default.aspx">Technical</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/SharePoint/default.aspx">SharePoint</category></item><item><title>Changing the App Pool Identity using STSADM</title><link>http://randomdust.com/blogs/ryan/archive/2008/10/13/changing-the-app-pool-identity-using-stsadm.aspx</link><pubDate>Mon, 13 Oct 2008 15:39:00 GMT</pubDate><guid isPermaLink="false">20e6a355-dcf5-4c47-89ee-e927015ace86:1216</guid><dc:creator>ryanm1201</dc:creator><slash:comments>0</slash:comments><description>&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;</description><category domain="http://randomdust.com/blogs/ryan/archive/tags/.NET/default.aspx">.NET</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/Technical/default.aspx">Technical</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/SharePoint/default.aspx">SharePoint</category></item><item><title>MCS Co-Worker Finally Blogging</title><link>http://randomdust.com/blogs/ryan/archive/2008/09/09/mcs-co-worker-finally-blogging.aspx</link><pubDate>Tue, 09 Sep 2008 18:20:00 GMT</pubDate><guid isPermaLink="false">20e6a355-dcf5-4c47-89ee-e927015ace86:1215</guid><dc:creator>ryanm1201</dc:creator><slash:comments>0</slash:comments><description>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;</description><category domain="http://randomdust.com/blogs/ryan/archive/tags/BizTalk/default.aspx">BizTalk</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/Technical/default.aspx">Technical</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/SharePoint/default.aspx">SharePoint</category></item><item><title>Web.Config FeatureReceiver Update</title><link>http://randomdust.com/blogs/ryan/archive/2008/07/21/web-config-featurereceiver-update.aspx</link><pubDate>Mon, 21 Jul 2008 14:09:14 GMT</pubDate><guid isPermaLink="false">20e6a355-dcf5-4c47-89ee-e927015ace86:1176</guid><dc:creator>ryanm1201</dc:creator><slash:comments>3</slash:comments><description>&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;</description><category domain="http://randomdust.com/blogs/ryan/archive/tags/.NET/default.aspx">.NET</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/Technical/default.aspx">Technical</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/SharePoint/default.aspx">SharePoint</category></item><item><title>InfoPath Master/Detail with SharePoint List Sources</title><link>http://randomdust.com/blogs/ryan/archive/2008/07/02/infopath-master-detail-with-sharepoint-list-sources.aspx</link><pubDate>Wed, 02 Jul 2008 18:19:38 GMT</pubDate><guid isPermaLink="false">20e6a355-dcf5-4c47-89ee-e927015ace86:1119</guid><dc:creator>ryanm1201</dc:creator><slash:comments>4</slash:comments><description>&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;</description><category domain="http://randomdust.com/blogs/ryan/archive/tags/.NET/default.aspx">.NET</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/Technical/default.aspx">Technical</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/InfoPath/default.aspx">InfoPath</category></item><item><title>Test Twitter Notifier from Live Writer</title><link>http://randomdust.com/blogs/ryan/archive/2008/06/30/test-twitter-notifier-from-live-writer.aspx</link><pubDate>Mon, 30 Jun 2008 18:50:21 GMT</pubDate><guid isPermaLink="false">20e6a355-dcf5-4c47-89ee-e927015ace86:1118</guid><dc:creator>ryanm1201</dc:creator><slash:comments>0</slash:comments><description>&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;</description><category domain="http://randomdust.com/blogs/ryan/archive/tags/.NET/default.aspx">.NET</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/Personal/default.aspx">Personal</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/Business/default.aspx">Business</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/Politics/default.aspx">Politics</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/BizTalk/default.aspx">BizTalk</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/Technical/default.aspx">Technical</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/Windows+Workflow/default.aspx">Windows Workflow</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/Mobile/default.aspx">Mobile</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/Photography/default.aspx">Photography</category></item><item><title>FeedReader Update</title><link>http://randomdust.com/blogs/ryan/archive/2008/06/30/feedreader-update.aspx</link><pubDate>Mon, 30 Jun 2008 14:21:00 GMT</pubDate><guid isPermaLink="false">20e6a355-dcf5-4c47-89ee-e927015ace86:1116</guid><dc:creator>ryanm1201</dc:creator><slash:comments>4</slash:comments><description>&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;</description><category domain="http://randomdust.com/blogs/ryan/archive/tags/SharePoint/default.aspx">SharePoint</category></item><item><title>Drill Here, Drill Now!</title><link>http://randomdust.com/blogs/ryan/archive/2008/06/16/drill-here-drill-now.aspx</link><pubDate>Mon, 16 Jun 2008 23:36:27 GMT</pubDate><guid isPermaLink="false">20e6a355-dcf5-4c47-89ee-e927015ace86:1115</guid><dc:creator>ryanm1201</dc:creator><slash:comments>0</slash:comments><description>&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;</description><category domain="http://randomdust.com/blogs/ryan/archive/tags/Politics/default.aspx">Politics</category></item><item><title>FeatureReceiver For Applying Custom Web.Config Changes</title><link>http://randomdust.com/blogs/ryan/archive/2008/03/22/featurereceiver-for-applying-custom-web-config-changes.aspx</link><pubDate>Sat, 22 Mar 2008 19:32:31 GMT</pubDate><guid isPermaLink="false">20e6a355-dcf5-4c47-89ee-e927015ace86:1111</guid><dc:creator>ryanm1201</dc:creator><slash:comments>7</slash:comments><description>&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;</description><category domain="http://randomdust.com/blogs/ryan/archive/tags/SharePoint/default.aspx">SharePoint</category></item><item><title>Error Viewing Audit Reports</title><link>http://randomdust.com/blogs/ryan/archive/2008/03/21/error-viewing-audit-reports.aspx</link><pubDate>Fri, 21 Mar 2008 23:54:21 GMT</pubDate><guid isPermaLink="false">20e6a355-dcf5-4c47-89ee-e927015ace86:1110</guid><dc:creator>ryanm1201</dc:creator><slash:comments>0</slash:comments><description>&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;</description><category domain="http://randomdust.com/blogs/ryan/archive/tags/SharePoint/default.aspx">SharePoint</category></item><item><title>Family Trip to Orlando and Caribbean</title><link>http://randomdust.com/blogs/ryan/archive/2008/02/10/family-trip-to-orlando-and-caribbean.aspx</link><pubDate>Sun, 10 Feb 2008 22:44:00 GMT</pubDate><guid isPermaLink="false">20e6a355-dcf5-4c47-89ee-e927015ace86:1103</guid><dc:creator>ryanm1201</dc:creator><slash:comments>0</slash:comments><description>&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;</description><category domain="http://randomdust.com/blogs/ryan/archive/tags/Personal/default.aspx">Personal</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/Photography/default.aspx">Photography</category></item><item><title>The Library of Congress' Photos on Flickr</title><link>http://randomdust.com/blogs/ryan/archive/2008/02/05/the-library-of-congress-photos-on-flickr.aspx</link><pubDate>Wed, 06 Feb 2008 00:23:59 GMT</pubDate><guid isPermaLink="false">20e6a355-dcf5-4c47-89ee-e927015ace86:999</guid><dc:creator>ryanm1201</dc:creator><slash:comments>0</slash:comments><description>&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;</description><category domain="http://randomdust.com/blogs/ryan/archive/tags/Personal/default.aspx">Personal</category><category domain="http://randomdust.com/blogs/ryan/archive/tags/Photography/default.aspx">Photography</category></item><item><title>FeedReader Contribution</title><link>http://randomdust.com/blogs/ryan/archive/2008/01/17/feedreader-contribution.aspx</link><pubDate>Fri, 18 Jan 2008 00:55:18 GMT</pubDate><guid isPermaLink="false">20e6a355-dcf5-4c47-89ee-e927015ace86:998</guid><dc:creator>ryanm1201</dc:creator><slash:comments>1</slash:comments><description>&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;</description><category domain="http://randomdust.com/blogs/ryan/archive/tags/SharePoint/default.aspx">SharePoint</category></item><item><title>SharePoint Deployment Guidelines</title><link>http://randomdust.com/blogs/ryan/archive/2008/01/17/sharepoint-deployment-guidelines.aspx</link><pubDate>Fri, 18 Jan 2008 00:34:16 GMT</pubDate><guid isPermaLink="false">20e6a355-dcf5-4c47-89ee-e927015ace86:997</guid><dc:creator>ryanm1201</dc:creator><slash:comments>0</slash:comments><description>&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;</description><category domain="http://randomdust.com/blogs/ryan/archive/tags/SharePoint/default.aspx">SharePoint</category></item><item><title>Designer Workflow "Unknown Error"</title><link>http://randomdust.com/blogs/ryan/archive/2008/01/09/designer-workflow-unknown-error.aspx</link><pubDate>Thu, 10 Jan 2008 01:15:40 GMT</pubDate><guid isPermaLink="false">20e6a355-dcf5-4c47-89ee-e927015ace86:995</guid><dc:creator>ryanm1201</dc:creator><slash:comments>1</slash:comments><description>&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;</description><category domain="http://randomdust.com/blogs/ryan/archive/tags/SharePoint/default.aspx">SharePoint</category></item><item><title>Workflow Issues After WSS SP1</title><link>http://randomdust.com/blogs/ryan/archive/2008/01/08/workflow-issues-after-wss-sp1.aspx</link><pubDate>Tue, 08 Jan 2008 20:05:24 GMT</pubDate><guid isPermaLink="false">20e6a355-dcf5-4c47-89ee-e927015ace86:991</guid><dc:creator>ryanm1201</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;As I mentioned in my &lt;a href="http://randomdust.com/blogs/ryan/archive/2007/12/14/issues-with-wss-sp1.aspx" target="_blank"&gt;previous post&lt;/a&gt; on my SP1 issues, my Designer workflows stopped working after the service pack.&amp;#160; Specifically, it would no longer start workflows automatically.&lt;/p&gt;  &lt;p&gt;I still don't have the answer (bad news first), but I got another piece to the puzzle today.&amp;#160; A couple co-workers contacted me after hearing I had issues and they pointed me to a related &lt;a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2564949&amp;amp;SiteID=1" target="_blank"&gt;MSDN Forum post&lt;/a&gt;.&amp;#160; As you'll see, there is a suggestion that the auto workflows work fine as long as you're not logged in using an admin account.&amp;#160; Which is what I was indeed doing (beat me up later for developing as an admin).&lt;/p&gt;  &lt;p&gt;So I signed in as another, non-admin, user and sure enough...the workflows worked!&amp;#160; Finally something you can't do as an admin but can as a normal user!!&amp;#160; Weird.&amp;#160; Anyway, it's another piece to the puzzle and gives me a temporary work around.&lt;/p&gt;&lt;img src="http://randomdust.com/aggbug.aspx?PostID=991" width="1" height="1"&gt;</description><category domain="http://randomdust.com/blogs/ryan/archive/tags/SharePoint/default.aspx">SharePoint</category></item><item><title>Issues with WSS SP1</title><link>http://randomdust.com/blogs/ryan/archive/2007/12/14/issues-with-wss-sp1.aspx</link><pubDate>Fri, 14 Dec 2007 17:31:00 GMT</pubDate><guid isPermaLink="false">20e6a355-dcf5-4c47-89ee-e927015ace86:989</guid><dc:creator>ryanm1201</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;a href="http://blog.richfinn.net/2007/12/13/WSS3MOSSServicePack1AppliedSuccessfully.aspx" target="_blank"&gt;Sorry Rich&lt;/a&gt;, things didn't go so well on this end.&amp;nbsp; The install of SP1 went smoothly, and I liked how clean it was so that was nice.&amp;nbsp; After checking a few things out, though, I noticed two issues.&lt;/p&gt;  &lt;p&gt;First, for some reason it decided to retract all of my custom solutions.&amp;nbsp; Oddly, it didn't touch any of the Microsoft templates from the "Fabulous 40", but it retracted everything else.&lt;/p&gt;  &lt;p&gt;Second, and more concerning, is it disabled the ability to have a list automatically start a workflow.&amp;nbsp; Both when a new item is entered and when an item is updated.&amp;nbsp; These are for workflows created with Designer.&amp;nbsp; They work just fine if they are manually started, but auto doesn't work anymore.&amp;nbsp; Nothing in the event log, nothing in SharePoint logs, and all services are up and running just fine.&amp;nbsp; I'm still trying to track that one down.&lt;/p&gt;&lt;p&gt;&lt;i&gt;Update:&amp;nbsp; &lt;a href="http://randomdust.com/blogs/ryan/archive/2008/01/08/workflow-issues-after-wss-sp1.aspx"&gt;http://randomdust.com/blogs/ryan/archive/2008/01/08/workflow-issues-after-wss-sp1.aspx&lt;/a&gt;&lt;/i&gt; &lt;br&gt;&lt;/p&gt;&lt;img src="http://randomdust.com/aggbug.aspx?PostID=989" width="1" height="1"&gt;</description><category domain="http://randomdust.com/blogs/ryan/archive/tags/SharePoint/default.aspx">SharePoint</category></item><item><title>"Upgrade" Office SharePoint Server 2007 Training</title><link>http://randomdust.com/blogs/ryan/archive/2007/12/12/upgrade-office-sharepoint-server-2007-training.aspx</link><pubDate>Wed, 12 Dec 2007 19:25:11 GMT</pubDate><guid isPermaLink="false">20e6a355-dcf5-4c47-89ee-e927015ace86:988</guid><dc:creator>ryanm1201</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;The &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=673dc932-626a-4e59-9dca-16d685600a51&amp;amp;displaylang=en" target="_blank"&gt;Office SharePoint Server 2007 Training&lt;/a&gt; was finally released recently.&amp;#xA0; We've been playing with the pre-release version in our MOSS environments for a couple months and were happy to see an update with more training content.&lt;/p&gt;  &lt;p&gt;Since we already had a pre-release version installed, getting the latest version was more like an upgrade process.&amp;#xA0; But there is no upgrade process, at least that I could see.&amp;#xA0; I tried running stsadm -o upgradesolution on the .wsp and executing the .exe to load the new content, but the new content didn't show up.&lt;/p&gt;  &lt;p&gt;I ended up having to completely remove the pre-release version and then do a clean install.&amp;#xA0; The only hiccup I had in removal was that I did have to perform an iisreset after running removesolution since it was not able to remove the SLK folder in the 12 hive.&amp;#xA0; After iisreset the folder was removed and I could continue with the steps as documented.&amp;#xA0; I should note this was only required in one environment.&amp;#xA0; The other did not require the iisreset.&lt;/p&gt;  &lt;p&gt;Good thing we didn't have any users storing training progress in there otherwise we probably would've lost that data.&lt;/p&gt;&lt;img src="http://randomdust.com/aggbug.aspx?PostID=988" width="1" height="1"&gt;</description><category domain="http://randomdust.com/blogs/ryan/archive/tags/SharePoint/default.aspx">SharePoint</category></item><item><title>Attach File to List Item Error After Customizing NewForm.aspx</title><link>http://randomdust.com/blogs/ryan/archive/2007/12/05/attach-file-to-list-item-error-after-customizing-newform-aspx.aspx</link><pubDate>Wed, 05 Dec 2007 21:38:00 GMT</pubDate><guid isPermaLink="false">20e6a355-dcf5-4c47-89ee-e927015ace86:987</guid><dc:creator>ryanm1201</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;b&gt;&lt;u&gt;Background&lt;/u&gt;&lt;/b&gt;:&amp;nbsp; &lt;/p&gt;  &lt;p&gt;There was a business requirement to customize a NewForm.aspx page for a list to remove some of the fields shown to a user when they enter a new item into a list.&amp;nbsp; To fulfill this requirement, SharePoint Designer was used to open the NewForm.aspx page and hide the existing ListFormWebPart and add a new DataFormWebPart that could be customized.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;u&gt;Issue&lt;/u&gt;&lt;/b&gt;:&amp;nbsp; &lt;/p&gt;  &lt;p&gt;After customizing the NewForm.aspx (or EditPage.aspx) page and browsing to the new page in a browser, the user receives a javascript error after clicking on &lt;b&gt;Attach File&lt;/b&gt;.&amp;nbsp; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://randomdust.com/blogs/ryan/AttachFiletoListItemErrorAfterCusto.aspx_F2DC/clip_image001.jpg"&gt;&lt;img src="http://randomdust.com/blogs/ryan/AttachFiletoListItemErrorAfterCusto.aspx_F2DC/clip_image001_thumb.jpg" style="border-width:0px;" alt="clip_image001" border="0" height="396" width="581"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The error is generated from form.js in the ShowPartAttachment method where it is trying to set focus on the control with an ID of fileupload0, but that control is hidden as it is part of the ListFormWebPart.&amp;nbsp; If the ListFormWebPart is completely removed from the customized page, then the user receives a more user friendly error generated from some error trapping code in the ShowPartAttachment method.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://randomdust.com/blogs/ryan/AttachFiletoListItemErrorAfterCusto.aspx_F2DC/clip_image002.jpg"&gt;&lt;img src="http://randomdust.com/blogs/ryan/AttachFiletoListItemErrorAfterCusto.aspx_F2DC/clip_image002_thumb.jpg" style="border-width:0px;" alt="clip_image002" border="0" height="274" width="584"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The issue is that although the DataFormWebPart provides the menu item and link to attach a file, it does not render the necessary client side code to support the file upload functionality.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;u&gt;Steps to Reproduce&lt;/u&gt;&lt;/b&gt;:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Create a list on a site and add a few custom columns &lt;/li&gt;    &lt;li&gt;Using SharePoint Designer, open the NewForm.aspx page associated with the newly created list &lt;/li&gt;    &lt;li&gt;Either hide or delete the existing ListFormWebPart, depending on the desired results (see screen shots above) &lt;/li&gt;    &lt;li&gt;Insert a new DataFormWebPart      &lt;ol&gt;       &lt;li&gt;Click &lt;b&gt;Insert &lt;/b&gt;&lt;b&gt;--&amp;gt; SharePoint Controls --&amp;gt;&lt;/b&gt;&lt;b&gt; Custom List Form&lt;/b&gt; &lt;/li&gt;        &lt;li&gt;Choose the list to use (same list created in step 1) &lt;/li&gt;        &lt;li&gt;Under &lt;b&gt;Type of Form to Create&lt;/b&gt;, select &lt;b&gt;New item form&lt;/b&gt; &lt;/li&gt;        &lt;li&gt;Check the box for &lt;b&gt;Show standard toolbar&lt;/b&gt;, if it’s not already checked &lt;/li&gt;        &lt;li&gt;Click &lt;b&gt;OK&lt;/b&gt; &lt;/li&gt;     &lt;/ol&gt;   &lt;/li&gt;    &lt;li&gt;Save NewForm.aspx &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Navigate to the page in a browser and click on &lt;b&gt;Attach File&lt;/b&gt; to observe the behavior described above.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;u&gt;Workaround&lt;/u&gt;&lt;/b&gt;:&lt;/p&gt;  &lt;p&gt;There are &lt;strike&gt;two&lt;/strike&gt; three options to work around this issue.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Within the customized form, hide the &lt;b&gt;Attach File&lt;/b&gt; functionality.&amp;nbsp; In the above case where the NewForm is modified, we would hide the &lt;b&gt;Attach File&lt;/b&gt;, but then add a message informing the user that in order to attach a file to the item they need to edit the item after it's saved (assuming EditForm.aspx was not also modified as described above.) &lt;/li&gt;    &lt;li&gt;I haven't done this completely, but you can spend some time diving into the HTML code of a non-customized NewForm.aspx page to discover the missing elements from the customized NewForm.aspx page.&amp;nbsp; Then add the necessary HTML and JavaScript code to the customized page to enable the functionality.&lt;/li&gt;&lt;li&gt;Another option was sent in to me via email by AutoSponge.&amp;nbsp; "I start the user off with NewForm as only an upload attachment page.
&amp;nbsp;Whether they upload or not, if they click ok, it creates a new item
and they are redirected to the custom edit page."&amp;nbsp; See the details &lt;a href="http://autosponge.spaces.live.com/blog/cns%21D7F85948C20F0293%21234.entry" target="_blank"&gt;here&lt;/a&gt;.&lt;br&gt;&lt;/li&gt; &lt;/ol&gt;&lt;img src="http://randomdust.com/aggbug.aspx?PostID=987" width="1" height="1"&gt;</description><category domain="http://randomdust.com/blogs/ryan/archive/tags/SharePoint/default.aspx">SharePoint</category></item></channel></rss>