<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>SharePoint and Other Rants</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/joekr/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/joekr/feed.xml</link>
    <description />
    <lastBuildDate>Tue, 16 Apr 2019 05:13:47 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>SharePoint 2013 IA - Content Taxonomy</title>
      <link>https://docs.microsoft.com/archive/blogs/joekr/sharepoint-2013-ia-content-taxonomy</link>
      <pubDate>Mon, 04 Nov 2013 19:39:00 GMT</pubDate>
      <dc:creator><![CDATA[jakrupin]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/joekr/2013/11/04/sharepoint-2013-ia-content-taxonomy/</guid>
      <description><![CDATA[This first in a multi-part series on SharePoint Information Architecture focuses on the content...]]></description>
      <content:encoded><![CDATA[<p>This first in a multi-part series on SharePoint Information Architecture focuses on the content taxonomy or IA around the logical placement of documents stored in SharePoint</p>
<p>&nbsp;</p>
<p>. <iframe src="https://skydrive.live.com/embed?cid=0CCB15D536F5ADF3&amp;resid=CCB15D536F5ADF3%2193465&amp;authkey=AA8EEd0r0qlsJyk" frameborder="0" scrolling="no" width="320" height="180"></iframe></p>
<p>&nbsp;</p>
<p>Enjoy!</p>]]></content:encoded>
    </item>
    <item>
      <title>Provision New User Properties in SSP</title>
      <link>https://docs.microsoft.com/archive/blogs/joekr/provision-new-user-properties-in-ssp</link>
      <pubDate>Sun, 06 Jun 2010 11:57:14 GMT</pubDate>
      <dc:creator><![CDATA[jakrupin]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/joekr/2010/06/06/provision-new-user-properties-in-ssp/</guid>
      <description><![CDATA[This is more of a reminder for me to go back to later, but hopefully, it may help someone else out...]]></description>
      <content:encoded><![CDATA[<p>This is more of a reminder for me to go back to later, but hopefully, it may help someone else out there.
</p><p>Since I am provisioning this as part of a feature receiver scoped at the web application level, you will see the "myWebApp" provisioned accordingly,
</p><p>But if you have any SPSite object, you can get the webapplication directly as a property from there.
</p><p>Essentially, all I want to do is create a new user property, I can access later through the profile store.
</p><div><table style="border-collapse:collapse; background: #d9d9d9" border="0"><colgroup><col style="width:638px"/></colgroup><tbody valign="top"><tr><td style="padding-left: 7px; padding-right: 7px"><p><span style="color:#2b91af; font-family:Tahoma; font-size:10pt">SPWebApplication<span style="color:black"> myWebApp = (<span style="color:#2b91af">SPWebApplication<span style="color:black">)properties.Feature.Parent;<span style="color:green">
											</span></span></span></span></span></p><p> 
 </p><p><span style="color:green; font-family:Tahoma; font-size:10pt">//Set up SSP
</span></p><p><span style="color:#2b91af; font-family:Tahoma; font-size:10pt">ServerContext<span style="color:black"> sc = <span style="color:#2b91af">ServerContext<span style="color:black">.GetContext(myWebApp);
</span></span></span></span></p><p>
 </p><p><span style="color:green; font-family:Tahoma; font-size:10pt">//initialize user profile config manager object
</span></p><p><span style="color:#2b91af; font-family:Tahoma; font-size:10pt">UserProfileConfigManager<span style="color:black"> upcm = <span style="color:blue">new<span style="color:black">
											<span style="color:#2b91af">UserProfileConfigManager<span style="color:black">(sc);
</span></span></span></span></span></span></p><p>
 </p><p><span style="color:green; font-family:Tahoma; font-size:10pt">//sample to create a new section
</span></p><p><span style="color:#2b91af; font-family:Tahoma; font-size:10pt">PropertyCollection<span style="color:black"> pcol = upcm.GetPropertiesWithSection();
</span></span></p><p><span style="color:#2b91af; font-family:Tahoma; font-size:10pt">Property<span style="color:black"> prop = pcol.Create(<span style="color:blue">false<span style="color:black">);
</span></span></span></span></p><p><span style="color:black; font-family:Tahoma; font-size:10pt">prop.Name = <span style="color:#a31515">"ServerRedirect"<span style="color:black">;
</span></span></span></p><p><span style="color:black; font-family:Tahoma; font-size:10pt">prop.DisplayName = <span style="color:#a31515">"Server Redirect"<span style="color:black">;
</span></span></span></p><p><span style="color:black; font-family:Tahoma; font-size:10pt">prop.Type = <span style="color:#a31515">"string"<span style="color:black">;
</span></span></span></p><p><span style="color:black; font-family:Tahoma; font-size:10pt">prop.Length = 255;
</span></p><p><span style="color:black; font-family:Tahoma; font-size:10pt">prop.IsUserEditable = <span style="color:blue">true<span style="color:black">;
</span></span></span></p><p><span style="color:black; font-family:Tahoma; font-size:10pt">prop.IsVisibleOnEditor = <span style="color:blue">true<span style="color:black">;
</span></span></span></p><p><span style="color:black; font-family:Tahoma; font-size:10pt">prop.IsVisibleOnViewer = <span style="color:blue">true<span style="color:black">;
</span></span></span></p><p><span style="color:black; font-family:Tahoma; font-size:10pt">prop.IsAlias = <span style="color:blue">false<span style="color:black">;
</span></span></span></p><p><span style="color:black; font-family:Tahoma; font-size:10pt">pcol.Add(prop);</span></p></td></tr></tbody></table></div><p>
 </p><p>One thing a colleague did make sure to remind me of, was MAKE SURE YOU have provisioned your SSP or this obviously will not work!</p>]]></content:encoded>
    </item>
    <item>
      <title>Create Document Retention MOSS 2007 – Part I</title>
      <link>https://docs.microsoft.com/archive/blogs/joekr/create-document-retention-moss-2007-part-i</link>
      <pubDate>Fri, 04 Jun 2010 14:50:36 GMT</pubDate>
      <dc:creator><![CDATA[jakrupin]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/joekr/2010/06/04/create-document-retention-moss-2007-part-i/</guid>
      <description><![CDATA[I know I haven't written for quite some time and I am apologetic for that, however, this post...]]></description>
      <content:encoded><![CDATA[<p><span style="font-size:10pt">I know I haven't written for quite some time and I am apologetic for that, however, this post hopefully will make up for it.
</span></p><p><span style="font-size:10pt">How many times have you said to yourself, I need a document retention policy inside of SharePoint 2007 regardless of what document libraries we create or documents we upload?  Furthermore, I want the ability to "pause" or put on some sort of "legal hold" on a document to push out the archiving and disposal of these documents.  Finally, I have quite a few content types and would like to potentially treat these with different retention policies and they may not go to any record center because we cannot ensure they are records.  I have had numerous customers who have asked for this and my recent answer is oh, wait until SharePoint 2010 which they frown and say oh.
</span></p><p><span style="font-size:10pt">In this post, I am going to provide to you a way to turn the oh, into Ah HA!
</span></p><p><span style="font-size:10pt">We are going to write a series of features that will provide all of the above functionality.
</span></p><p><span style="font-size:10pt"><strong>Step 1:
</strong></span></p><p><span style="font-size:10pt">In most solution packages you will have a fields feature and that will be simply provisioning the fields you need.  In this case, we are going to write the feature.xml file like:
</span></p><div><table style="border-collapse:collapse; background: #d9d9d9" border="0"><colgroup><col style="width:715px"/></colgroup><tbody valign="top"><tr><td style="padding-left: 7px; padding-right: 7px"><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;?<span style="color:#a31515">xml<span style="color:blue">
										<span style="color:red">version<span style="color:blue">=<span style="color:black">"<span style="color:blue">1.0<span style="color:black">"<span style="color:blue">
																<span style="color:red">encoding<span style="color:blue">=<span style="color:black">"<span style="color:blue">utf-8<span style="color:black">"<span style="color:blue"> ?&gt;
</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;<span style="color:#a31515">Feature<span style="color:blue">
										<span style="color:red">Id<span style="color:blue">=<span style="color:black">"<span style="color:blue">BF67889E-FBDF-40d5-A6A6-B6F9C9CE6658<span style="color:black">"
</span></span></span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">         Title<span style="color:blue">=<span style="color:black">"My<span style="color:blue">Fields<span style="color:black">"
</span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">         Description<span style="color:blue">=<span style="color:black">"<span style="color:blue">This feature provisions all fields to necessitate appropriate metadata<span style="color:black">"
</span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">         Version<span style="color:blue">=<span style="color:black">"<span style="color:blue">12.0.0.0<span style="color:black">"
</span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">         Scope<span style="color:blue">=<span style="color:black">"<span style="color:blue">Site<span style="color:black">"
</span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">        xmlns<span style="color:blue">=<span style="color:black">"<a href="http://schemas.microsoft.com/sharepoint/">http://schemas.microsoft.com/sharepoint/</a>"<span style="color:blue">&gt;
</span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">  &lt;<span style="color:#a31515">ElementManifests<span style="color:blue">&gt;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">    &lt;<span style="color:#a31515">ElementManifest<span style="color:blue">
										<span style="color:red">Location<span style="color:blue">=<span style="color:black">"<span style="color:blue">fields.xml<span style="color:black">"<span style="color:blue">/&gt;
</span></span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">  &lt;/<span style="color:#a31515">ElementManifests<span style="color:blue">&gt;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;/<span style="color:#a31515">Feature<span style="color:blue">&gt;</span></span></span></p></td></tr></tbody></table></div><p>
 </p><p><span style="font-size:10pt">And the fields.xml feature like:
</span></p><div><table style="border-collapse:collapse; background: #d9d9d9" border="0"><colgroup><col style="width:715px"/></colgroup><tbody valign="top"><tr><td style="padding-left: 7px; padding-right: 7px"><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;?<span style="color:#a31515">xml<span style="color:blue">
										<span style="color:red">version<span style="color:blue">=<span style="color:black">"<span style="color:blue">1.0<span style="color:black">"<span style="color:blue">
																<span style="color:red">encoding<span style="color:blue">=<span style="color:black">"<span style="color:blue">utf-8<span style="color:black">"<span style="color:blue"> ?&gt;
</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;<span style="color:#a31515">Elements<span style="color:blue">
										<span style="color:red">xmlns<span style="color:blue">=<span style="color:black">"<a href="http://schemas.microsoft.com/sharepoint/">http://schemas.microsoft.com/sharepoint/</a>"<span style="color:blue">&gt;
</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;<span style="color:#a31515">Field<span style="color:blue">
										<span style="color:red">ID<span style="color:blue">=<span style="color:black">"<span style="color:blue">{84027183-0549-4bfb-8601-7DDDB12EED12}<span style="color:black">"<span style="color:blue">
															</span></span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">
								<span style="color:red">Name<span style="color:blue">=<span style="color:black">"<span style="color:blue">LegalHold<span style="color:black">"<span style="color:blue">
													</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">
								<span style="color:red">SourceID<span style="color:blue">=<span style="color:black">"<a href="http://schemas.microsoft.com/sharepoint/v3">http://schemas.microsoft.com/sharepoint/v3</a>"<span style="color:blue">
											</span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">
								<span style="color:red">StaticName<span style="color:blue">=<span style="color:black">"<span style="color:blue">LegalHold<span style="color:black">"<span style="color:blue">
													</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">
								<span style="color:red">Group<span style="color:blue">=<span style="color:black">"<span style="color:blue">ABC<span style="color:black">"<span style="color:blue">
													</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">
								<span style="color:red">Type<span style="color:blue">=<span style="color:black">"<span style="color:blue">Boolean<span style="color:black">"<span style="color:blue">
													</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">
								<span style="color:red">Description<span style="color:blue">=<span style="color:black">"<span style="color:blue">Allows individual to place document on hold<span style="color:black">"<span style="color:blue">
													</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">
								<span style="color:red">DisplayName<span style="color:blue">=<span style="color:black">"<span style="color:blue">LegalHold<span style="color:black">"<span style="color:blue">&gt;
</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">  &lt;<span style="color:#a31515">Default<span style="color:blue">&gt;<span style="color:black">0<span style="color:blue">&lt;/<span style="color:#a31515">Default<span style="color:blue">&gt;
</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;/<span style="color:#a31515">Field<span style="color:blue">&gt;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;<span style="color:#a31515">Field<span style="color:blue">
										<span style="color:red">ID<span style="color:blue">=<span style="color:black">"<span style="color:blue">{DBA5FD1B-97A0-470f-89B8-EB98BC28061A}<span style="color:black">"<span style="color:blue">
															</span></span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">
								<span style="color:red">Name<span style="color:blue">=<span style="color:black">"<span style="color:blue">LegalStartDate<span style="color:black">"<span style="color:blue">
													</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">
								<span style="color:red">SourceID<span style="color:blue">=<span style="color:black">"<a href="http://schemas.microsoft.com/sharepoint/v3">http://schemas.microsoft.com/sharepoint/v3</a>"<span style="color:blue">
											</span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">
								<span style="color:red">StaticName<span style="color:blue">=<span style="color:black">"<span style="color:blue">LegalStartDate<span style="color:black">"<span style="color:blue">
													</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">
								<span style="color:red">Group<span style="color:blue">=<span style="color:black">"<span style="color:blue">ABC<span style="color:black">"<span style="color:blue">
													</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">
								<span style="color:red">Type<span style="color:blue">=<span style="color:black">"<span style="color:blue">DateTime<span style="color:black">"<span style="color:blue">
													</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">
								<span style="color:red">Hidden<span style="color:blue">=<span style="color:black">"<span style="color:blue">FALSE<span style="color:black">"<span style="color:blue">
													</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">
								<span style="color:red">ReadOnly<span style="color:blue">=<span style="color:black">"<span style="color:blue">TRUE<span style="color:black">"<span style="color:blue">
													</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">
								<span style="color:red">Description<span style="color:blue">=<span style="color:black">"<span style="color:blue">Tells record when the start of the last legal hold was<span style="color:black">"<span style="color:blue">
													</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">
								<span style="color:red">DisplayName<span style="color:blue">=<span style="color:black">"<span style="color:blue">Legal Start Date<span style="color:black">"<span style="color:blue"> /&gt;
</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;<span style="color:#a31515">Field<span style="color:blue">
										<span style="color:red">ID<span style="color:blue">=<span style="color:black">"<span style="color:blue">{14CE4BF3-F83A-410d-A454-A12FD20A60A9}<span style="color:black">"<span style="color:blue">
															</span></span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">
								<span style="color:red">Name<span style="color:blue">=<span style="color:black">"<span style="color:blue">LegalEndDate<span style="color:black">"<span style="color:blue">
													</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">
								<span style="color:red">SourceID<span style="color:blue">=<span style="color:black">"<a href="http://schemas.microsoft.com/sharepoint/v3">http://schemas.microsoft.com/sharepoint/v3</a>"<span style="color:blue">
											</span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">
								<span style="color:red">StaticName<span style="color:blue">=<span style="color:black">"<span style="color:blue">LegalEndDate<span style="color:black">"<span style="color:blue">
													</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">
								<span style="color:red">Group<span style="color:blue">=<span style="color:black">"<span style="color:blue">ABC<span style="color:black">"<span style="color:blue">
													</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">
								<span style="color:red">Type<span style="color:blue">=<span style="color:black">"<span style="color:blue">DateTime<span style="color:black">"<span style="color:blue">
													</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">
								<span style="color:red">Hidden<span style="color:blue">=<span style="color:black">"<span style="color:blue">FALSE<span style="color:black">"<span style="color:blue">
													</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">
								<span style="color:red">ReadOnly<span style="color:blue">=<span style="color:black">"<span style="color:blue">TRUE<span style="color:black">"<span style="color:blue">
													</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">
								<span style="color:red">Description<span style="color:blue">=<span style="color:black">"<span style="color:blue">Tells record when the end of the last legal hold was<span style="color:black">"<span style="color:blue">
													</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">
								<span style="color:red">DisplayName<span style="color:blue">=<span style="color:black">"<span style="color:blue">Legal End Date<span style="color:black">"<span style="color:blue"> /&gt;
</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;<span style="color:#a31515">Field<span style="color:blue">
										<span style="color:red">ID<span style="color:blue">=<span style="color:black">"<span style="color:blue">{DBA90AA4-B671-4c49-9ABF-C8C819DE0F13}<span style="color:black">"<span style="color:blue">
															</span></span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">
								<span style="color:red">Name<span style="color:blue">=<span style="color:black">"<span style="color:blue">ArchiveDate<span style="color:black">"<span style="color:blue">
													</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">
								<span style="color:red">SourceID<span style="color:blue">=<span style="color:black">"<a href="http://schemas.microsoft.com/sharepoint/v3">http://schemas.microsoft.com/sharepoint/v3</a>"<span style="color:blue">
											</span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">
								<span style="color:red">StaticName<span style="color:blue">=<span style="color:black">"<span style="color:blue">ArchiveDate<span style="color:black">"<span style="color:blue">
													</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">
								<span style="color:red">Group<span style="color:blue">=<span style="color:black">"<span style="color:blue">ABC<span style="color:black">"<span style="color:blue">
													</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">
								<span style="color:red">Type<span style="color:blue">=<span style="color:black">"<span style="color:blue">DateTime<span style="color:black">"<span style="color:blue">
													</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">
								<span style="color:red">Hidden<span style="color:blue">=<span style="color:black">"<span style="color:blue">FALSE<span style="color:black">"<span style="color:blue">
													</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">
								<span style="color:red">ReadOnly<span style="color:blue">=<span style="color:black">"<span style="color:blue">TRUE<span style="color:black">"<span style="color:blue">
													</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">
								<span style="color:red">Description<span style="color:blue">=<span style="color:black">"<span style="color:blue">Tells retention when to archive record<span style="color:black">"<span style="color:blue">
													</span></span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       DisplayName<span style="color:blue">=<span style="color:black">"<span style="color:blue">Archive Date<span style="color:black">"<span style="color:blue"> /&gt;
</span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;<span style="color:#a31515">Field<span style="color:blue">
										<span style="color:red">ID<span style="color:blue">=<span style="color:black">"<span style="color:blue">{1D6D2CE5-ABCD-4368-829B-085D3FBE99FB}<span style="color:black">"<span style="color:blue">
															</span></span></span></span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       Name<span style="color:blue">=<span style="color:black">"<span style="color:blue">DisposeDate<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       SourceID<span style="color:blue">=<span style="color:black">"<a href="http://schemas.microsoft.com/sharepoint/v3">http://schemas.microsoft.com/sharepoint/v3</a>"<span style="color:blue">
										</span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       StaticName<span style="color:blue">=<span style="color:black">"<span style="color:blue">DisposeDate<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       Group<span style="color:blue">=<span style="color:black">"<span style="color:blue">ABC<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       Type<span style="color:blue">=<span style="color:black">"<span style="color:blue">DateTime<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       Hidden<span style="color:blue">=<span style="color:black">"<span style="color:blue">FALSE<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       ReadOnly<span style="color:blue">=<span style="color:black">"<span style="color:blue">TRUE<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       Description<span style="color:blue">=<span style="color:black">"<span style="color:blue">Tells retention when to delete the record<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       DisplayName<span style="color:blue">=<span style="color:black">"<span style="color:blue">Dispose Date<span style="color:black">"<span style="color:blue"> /&gt;
</span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;<span style="color:#a31515">Field<span style="color:blue">
										<span style="color:red">ID<span style="color:blue">=<span style="color:black">"<span style="color:blue">{1CDE08F2-DAF6-4449-B481-31095207A983}<span style="color:black">"<span style="color:blue">
															</span></span></span></span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       Name<span style="color:blue">=<span style="color:black">"<span style="color:blue">NewStartDate<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       SourceID<span style="color:blue">=<span style="color:black">"<a href="http://schemas.microsoft.com/sharepoint/v3">http://schemas.microsoft.com/sharepoint/v3</a>"<span style="color:blue">
										</span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       StaticName<span style="color:blue">=<span style="color:black">"<span style="color:blue">NewStartDate<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       Group<span style="color:blue">=<span style="color:black">"<span style="color:blue">ABC<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       Type<span style="color:blue">=<span style="color:black">"<span style="color:blue">DateTime<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       Hidden<span style="color:blue">=<span style="color:black">"<span style="color:blue">FALSE<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       ReadOnly<span style="color:blue">=<span style="color:black">"<span style="color:blue">TRUE<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       Description<span style="color:blue">=<span style="color:black">"<span style="color:blue">This field is used to keep track of new retention schedule based on Legal Holds<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       DisplayName<span style="color:blue">=<span style="color:black">"<span style="color:blue">New Start Date<span style="color:black">"<span style="color:blue"> /&gt;
</span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;<span style="color:#a31515">Field<span style="color:blue">
										<span style="color:red">ID<span style="color:blue">=<span style="color:black">"<span style="color:blue">{96AAF204-A5E0-4851-A6F4-B3235EBEA185}<span style="color:black">"<span style="color:blue">
															</span></span></span></span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       Name<span style="color:blue">=<span style="color:black">"<span style="color:blue">_Archival<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       SourceID<span style="color:blue">=<span style="color:black">"<a href="http://schemas.microsoft.com/sharepoint/v3">http://schemas.microsoft.com/sharepoint/v3</a>"<span style="color:blue">
										</span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       StaticName<span style="color:blue">=<span style="color:black">"<span style="color:blue">_Archival<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       Group<span style="color:blue">=<span style="color:black">"<span style="color:blue">ABC<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       Type<span style="color:blue">=<span style="color:black">"<span style="color:blue">Integer<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       Description<span style="color:blue">=<span style="color:black">"<span style="color:blue">(in years) how long before record get archived<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       DisplayName<span style="color:blue">=<span style="color:black">"<span style="color:blue">Archive Schedule<span style="color:black">"<span style="color:blue"> /&gt;
</span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;<span style="color:#a31515">Field<span style="color:blue">
										<span style="color:red">ID<span style="color:blue">=<span style="color:black">"<span style="color:blue">{67A14E20-617B-46d8-8598-433782CC9E4E}<span style="color:black">"<span style="color:blue">
															</span></span></span></span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       Name<span style="color:blue">=<span style="color:black">"<span style="color:blue">_Disposal<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       SourceID<span style="color:blue">=<span style="color:black">"<a href="http://schemas.microsoft.com/sharepoint/v3">http://schemas.microsoft.com/sharepoint/v3</a>"<span style="color:blue">
										</span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       StaticName<span style="color:blue">=<span style="color:black">"<span style="color:blue">_Disposal<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       Group<span style="color:blue">=<span style="color:black">"<span style="color:blue">ABC<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       Type<span style="color:blue">=<span style="color:black">"<span style="color:blue">Integer<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       Description<span style="color:blue">=<span style="color:black">"<span style="color:blue">(in years) how long before record get deleted<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       DisplayName<span style="color:blue">=<span style="color:black">"<span style="color:blue">Dispose Date<span style="color:black">"<span style="color:blue"> /&gt;
</span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;<span style="color:#a31515">Field<span style="color:blue">
										<span style="color:red">ID<span style="color:blue">=<span style="color:black">"<span style="color:blue">{2A8BB895-2D13-4300-BF67-487A82BA00AD}<span style="color:black">"<span style="color:blue">
															</span></span></span></span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       Name<span style="color:blue">=<span style="color:black">"<span style="color:blue">_Archived<span style="color:black">"<span style="color:blue">
													<span style="color:red">
													</span></span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       SourceID<span style="color:blue">=<span style="color:black">"<a href="http://schemas.microsoft.com/sharepoint/v3">http://schemas.microsoft.com/sharepoint/v3</a>"<span style="color:blue">
										</span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       StaticName<span style="color:blue">=<span style="color:black">"<span style="color:blue">_Archived<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       Group<span style="color:blue">=<span style="color:black">"<span style="color:blue">ABC<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       Type<span style="color:blue">=<span style="color:black">"<span style="color:blue">Boolean<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       Hidden<span style="color:blue">=<span style="color:black">"<span style="color:blue">FALSE<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       ReadOnly<span style="color:blue">=<span style="color:black">"<span style="color:blue">TRUE<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       Description<span style="color:blue">=<span style="color:black">"<span style="color:blue">Is record in archive status<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">       DisplayName<span style="color:blue">=<span style="color:black">"<span style="color:blue">Archived<span style="color:black">"<span style="color:blue">&gt;
</span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">  &lt;<span style="color:#a31515">Default<span style="color:blue">&gt;<span style="color:black">0<span style="color:blue">&lt;/<span style="color:#a31515">Default<span style="color:blue">&gt;
</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;/<span style="color:#a31515">Field<span style="color:blue">&gt;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;/<span style="color:#a31515">Elements<span style="color:blue">&gt;</span></span></span></p></td></tr></tbody></table></div><p>
 </p><p><span style="font-size:10pt"><strong>Step 2:
</strong></span></p><p><span style="font-size:10pt">The first feature is going to be scoped at a "Site" level and will extend the document library content type by adding the necessary fields needed to make this work.
</span></p><p><span style="font-size:10pt">I will call this feature LegalHold and I will simply point to a feature activation receiver.
</span></p><p><span style="font-size:10pt">The feature.xml file will look something like:
</span></p><div><table style="border-collapse:collapse; background: #d9d9d9" border="0"><colgroup><col style="width:715px"/></colgroup><tbody valign="top"><tr><td style="padding-left: 7px; padding-right: 7px"><p><span style="font-family:Courier New; font-size:7pt">&lt;?<span style="color:#a31515">xml</span>
								<span style="color:red">version</span>=<span style="color:black">"</span>1.0<span style="color:black">"</span>
								<span style="color:red">encoding</span>=<span style="color:black">"</span>utf-8<span style="color:black">" </span>?&gt;
</span></p><p><span style="font-family:Courier New; font-size:7pt">&lt;<span style="color:#a31515">Feature</span>
								<span style="color:red">Id</span>=<span style="color:black">"</span>38B5399F-4DAB-4938-8F92-B474A319F9B2<span style="color:black">"
</span></span></p><p><span style="font-family:Courier New; font-size:7pt"><span style="color:red">         Title</span>=<span style="color:black">"</span>Legal Holds<span style="color:black">"
</span></span></p><p><span style="font-family:Courier New; font-size:7pt"><span style="color:red">         Description</span>=<span style="color:black">"</span>This feature provides an extension to the document content type to allow for legal holds<span style="color:black">"
</span></span></p><p><span style="font-family:Courier New; font-size:7pt"><span style="color:red">         Version</span>=<span style="color:black">"</span>12.0.0.0<span style="color:black">"
</span></span></p><p><span style="font-family:Courier New; font-size:7pt"><span style="color:red">         Scope</span>=<span style="color:black">"</span>Site<span style="color:black">"
</span></span></p><p><span style="font-family:Courier New; font-size:7pt"><span style="color:red">         ReceiverAssembly</span>=<span style="color:black">"</span>MyNameSpace.Features, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f6e07d4bee530c01<span style="color:black">"
</span></span></p><p><span style="font-family:Courier New; font-size:7pt"><span style="color:red">         ReceiverClass</span>=<span style="color:black">"</span>MyNameSpace.Features.LegalHoldFeatureReceiver<span style="color:black">" <span style="color:red">xmlns</span>="<a href="http://schemas.microsoft.com/sharepoint/">http://schemas.microsoft.com/sharepoint/</a>" </span>&gt;<span style="color:black">
								</span></span></p><p><span style="font-family:Courier New; font-size:7pt">&lt;/<span style="color:#a31515">Feature<span style="color:black">
									</span>&gt;</span></span></p></td></tr></tbody></table></div><p>
 </p><p><span style="font-size:10pt">The receiver code will look something like this:
</span></p><div><table style="border-collapse:collapse; background: #d9d9d9" border="0"><colgroup><col style="width:715px"/></colgroup><tbody valign="top"><tr><td style="padding-left: 7px; padding-right: 7px"><p><span style="color:blue; font-family:Courier New; font-size:7pt">using<span style="color:black"> System;
</span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">using <span style="color:black">Microsoft.SharePoint; 
</span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">namespace<span style="color:black"> MyNameSpace.Features
</span></span></p><p><span style="color:black; font-family:Courier New; font-size:7pt">{
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">  class<span style="color:black">
									<span style="color:#2b91af">LegalHoldFeatureReceiver<span style="color:black"> : <span style="color:#2b91af">SPFeatureReceiver
</span></span></span></span></span></p><p><span style="color:black; font-family:Courier New; font-size:7pt">  {
</span></p><p> 
 </p><p><span style="color:blue; font-family:Courier New; font-size:7pt">    public<span style="color:black">
									<span style="color:blue">static<span style="color:black">
											<span style="color:blue">void<span style="color:black"> LinkFieldToContentType(<span style="color:#2b91af">SPWeb<span style="color:black"> web,<span style="color:blue">string<span style="color:black"> contentType, <span style="color:#2b91af">SPField<span style="color:black"> field)
</span></span></span></span></span></span></span></span></span></span></span></span></p><p><span style="color:black; font-family:Courier New; font-size:7pt">    {
</span></p><p><span style="color:#2b91af; font-family:Courier New; font-size:7pt">      SPContentType<span style="color:black"> ct = web.ContentTypes[contentType];
</span></span></p><p><span style="color:black; font-family:Courier New; font-size:7pt">      ct.FieldLinks.Add(<span style="color:blue">new<span style="color:black">
										<span style="color:#2b91af">SPFieldLink<span style="color:black">(field));
</span></span></span></span></span></p><p><span style="color:black; font-family:Courier New; font-size:7pt">      ct.Update();
</span></p><p><span style="color:black; font-family:Courier New; font-size:7pt">    }
</span></p><p> 
 </p><p><span style="color:blue; font-family:Courier New; font-size:7pt">    public<span style="color:black">
									<span style="color:blue">override<span style="color:black">
											<span style="color:blue">void<span style="color:black"> FeatureActivated(<span style="color:#2b91af">SPFeatureReceiverProperties<span style="color:black"> properties)
</span></span></span></span></span></span></span></span></p><p><span style="color:black; font-family:Courier New; font-size:7pt">    {
</span></p><p><span style="color:green; font-family:Courier New; font-size:7pt">      //Expand Document Content Type to add additional Fields and Disposition Workflow
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">      using<span style="color:black"> (<span style="color:#2b91af">SPSite<span style="color:black"> spsite = (<span style="color:#2b91af">SPSite<span style="color:black"> )properties.Feature.Parent)
</span></span></span></span></span></span></p><p><span style="color:black; font-family:Courier New; font-size:7pt">        {
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          using<span style="color:black"> (<span style="color:#2b91af">SPWeb<span style="color:black"> spweb = spsite.RootWeb)
</span></span></span></span></p><p><span style="color:black; font-family:Courier New; font-size:7pt">          {
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">            try
</span></p><p><span style="color:black; font-family:Courier New; font-size:7pt">            {
</span></p><p><span style="color:green; font-family:Courier New; font-size:7pt">              //Extend Document Content Type
</span></p><p> 
 </p><p><span style="color:black; font-family:Courier New; font-size:7pt">              LinkFieldToContentType(spweb, <span style="color:#a31515">"Document"<span style="color:black">, spweb.Fields[<span style="color:blue">new<span style="color:black">
												<span style="color:#2b91af">Guid<span style="color:black">(<span style="color:#a31515">"{84027183-0549-4bfb-8601-7DDDB12EED12}"<span style="color:black">)]);
</span></span></span></span></span></span></span></span></span></p><p> 
 </p><p><span style="color:black; font-family:Courier New; font-size:7pt">              LinkFieldToContentType(spweb, <span style="color:#a31515">"Document"<span style="color:black">, spweb.Fields[<span style="color:blue">new<span style="color:black">
												<span style="color:#2b91af">Guid<span style="color:black">(<span style="color:#a31515">"{DBA5FD1B-97A0-470f-89B8-EB98BC28061A}"<span style="color:black">)]);
</span></span></span></span></span></span></span></span></span></p><p> 
 </p><p><span style="color:black; font-family:Courier New; font-size:7pt">              LinkFieldToContentType(spweb, <span style="color:#a31515">"Document"<span style="color:black">, spweb.Fields[<span style="color:blue">new<span style="color:black">
												<span style="color:#2b91af">Guid<span style="color:black">(<span style="color:#a31515">"{14CE4BF3-F83A-410d-A454-A12FD20A60A9}"<span style="color:black">)]);
</span></span></span></span></span></span></span></span></span></p><p> 
 </p><p><span style="color:black; font-family:Courier New; font-size:7pt">              LinkFieldToContentType(spweb, <span style="color:#a31515">"Document"<span style="color:black">, spweb.Fields[<span style="color:blue">new<span style="color:black">
												<span style="color:#2b91af">Guid<span style="color:black">(<span style="color:#a31515">"{DBA90AA4-B671-4c49-9ABF-C8C819DE0F13}"<span style="color:black">)]);
</span></span></span></span></span></span></span></span></span></p><p> 
 </p><p><span style="color:black; font-family:Courier New; font-size:7pt">              LinkFieldToContentType(spweb, <span style="color:#a31515">"Document"<span style="color:black">, spweb.Fields[<span style="color:blue">new<span style="color:black">
												<span style="color:#2b91af">Guid<span style="color:black">(<span style="color:#a31515">"{1D6D2CE5-ABCD-4368-829B-085D3FBE99FB}"<span style="color:black">)]);
</span></span></span></span></span></span></span></span></span></p><p> 
 </p><p><span style="color:black; font-family:Courier New; font-size:7pt">              LinkFieldToContentType(spweb, <span style="color:#a31515">"Document"<span style="color:black">, spweb.Fields[<span style="color:blue">new<span style="color:black">
												<span style="color:#2b91af">Guid<span style="color:black">(<span style="color:#a31515">"{1CDE08F2-DAF6-4449-B481-31095207A983}"<span style="color:black">)]);
</span></span></span></span></span></span></span></span></span></p><p> 
 </p><p><span style="color:black; font-family:Courier New; font-size:7pt">              LinkFieldToContentType(spweb, <span style="color:#a31515">"Document"<span style="color:black">, spweb.Fields[<span style="color:blue">new<span style="color:black">
												<span style="color:#2b91af">Guid<span style="color:black">(<span style="color:#a31515">"{2A8BB895-2D13-4300-BF67-487A82BA00AD}"<span style="color:black">)]);
</span></span></span></span></span></span></span></span></span></p><p><span style="color:black; font-family:Courier New; font-size:7pt">            }
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">            catch<span style="color:black"> { }
</span></span></p><p><span style="color:black; font-family:Courier New; font-size:7pt">          }
</span></p><p><span style="color:black; font-family:Courier New; font-size:7pt">        }
</span></p><p><span style="color:black; font-family:Courier New; font-size:7pt">      }
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">      public<span style="color:black">
									<span style="color:blue">override<span style="color:black">
											<span style="color:blue">void<span style="color:black"> FeatureDeactivating(<span style="color:#2b91af">SPFeatureReceiverProperties<span style="color:black"> properties)
</span></span></span></span></span></span></span></span></p><p><span style="color:black; font-family:Courier New; font-size:7pt">      {
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">        throw<span style="color:black">
									<span style="color:blue">new<span style="color:black">
											<span style="color:#2b91af">NotImplementedException<span style="color:black"> ();
</span></span></span></span></span></span></p><p><span style="color:black; font-family:Courier New; font-size:7pt">      }
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">      public<span style="color:black">
									<span style="color:blue">override<span style="color:black">
											<span style="color:blue">void<span style="color:black"> FeatureInstalled(<span style="color:#2b91af">SPFeatureReceiverProperties<span style="color:black"> properties)
</span></span></span></span></span></span></span></span></p><p><span style="color:black; font-family:Courier New; font-size:7pt">      {
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">        throw<span style="color:black">
									<span style="color:blue">new<span style="color:black">
											<span style="color:#2b91af">NotImplementedException<span style="color:black"> ();
</span></span></span></span></span></span></p><p><span style="color:black; font-family:Courier New; font-size:7pt">      }
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">      public<span style="color:black">
									<span style="color:blue">override<span style="color:black">
											<span style="color:blue">void<span style="color:black"> FeatureUninstalling(<span style="color:#2b91af">SPFeatureReceiverProperties<span style="color:black"> properties)
</span></span></span></span></span></span></span></span></p><p><span style="color:black; font-family:Courier New; font-size:7pt">      {
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">        throw<span style="color:black">
									<span style="color:blue">new<span style="color:black">
											<span style="color:#2b91af">NotImplementedException<span style="color:black"> ();
</span></span></span></span></span></span></p><p><span style="color:black; font-family:Courier New; font-size:7pt">      }
</span></p><p><span style="color:black; font-family:Courier New; font-size:7pt">    }
</span></p><p><span style="color:black; font-family:Courier New; font-size:7pt">  }</span></p></td></tr><tr><td style="padding-left: 7px; padding-right: 7px"> </td></tr></tbody></table></div><p>
 </p><p><strong>Step 3:
</strong></p><p>We then are going to write the feature to "staple" the former feature to the farm globally.  You can choose to only staple site definitions but in most cases I have found that the customer wants this "everywhere".
</p><p>We are going to name this feature "MyKewlStaple"
</p><p>The feature.xml file will simply point to the elements file as such:
</p><div><table style="border-collapse:collapse; background: #d9d9d9" border="0"><colgroup><col style="width:715px"/></colgroup><tbody valign="top"><tr><td style="padding-left: 7px; padding-right: 7px"><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;?<span style="color:#a31515">xml<span style="color:blue">
										<span style="color:red">version<span style="color:blue">=<span style="color:black">"<span style="color:blue">1.0<span style="color:black">"<span style="color:blue">
																<span style="color:red">encoding<span style="color:blue">=<span style="color:black">"<span style="color:blue">utf-8<span style="color:black">"<span style="color:blue"> ?&gt;
</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;<span style="color:#a31515">Feature<span style="color:blue">
										<span style="color:red">Id<span style="color:blue">=<span style="color:black">"<span style="color:blue">ACC0BA0A-E0AF-4ee0-BECB-94B8C71E2B18<span style="color:black">"<span style="color:blue">
															</span></span></span></span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">         Title<span style="color:blue">=<span style="color:black">"<span style="color:blue">My Kewl Staple<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">         Description<span style="color:blue">=<span style="color:black">"<span style="color:blue">This feature staples all other features to appropriate site templates<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">         Version<span style="color:blue">=<span style="color:black">"<span style="color:blue">12.0.0.0<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">         Scope<span style="color:blue">=<span style="color:black">"<span style="color:blue">Farm<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">         xmlns<span style="color:blue">=<span style="color:black">"<a href="http://schemas.microsoft.com/sharepoint/">http://schemas.microsoft.com/sharepoint/</a>"<span style="color:blue">&gt;
</span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">  &lt;<span style="color:#a31515">ElementManifests<span style="color:blue">&gt;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">    &lt;<span style="color:#a31515">ElementManifest<span style="color:blue">
										<span style="color:red">Location<span style="color:blue">=<span style="color:black">"<span style="color:blue">elements.xml<span style="color:black">"<span style="color:blue">/&gt;
</span></span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">  &lt;/<span style="color:#a31515">ElementManifests<span style="color:blue">&gt;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;/<span style="color:#a31515">Feature<span style="color:blue">&gt;</span></span></span></p></td></tr></tbody></table></div><p>
 </p><p>The elements.xml file will do the staple like so:
</p><div><table style="border-collapse:collapse; background: #d9d9d9" border="0"><colgroup><col style="width:715px"/></colgroup><tbody valign="top"><tr><td style="padding-left: 7px; padding-right: 7px"><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;<span style="color:#a31515">Elements<span style="color:blue">
										<span style="color:red">xmlns<span style="color:blue">=<span style="color:black">"<a href="http://schemas.microsoft.com/sharepoint/">http://schemas.microsoft.com/sharepoint/</a>"<span style="color:blue">&gt;
</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">  &lt;!--<span style="color:green">Global Features<span style="color:blue">--&gt;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">  &lt;!--<span style="color:green">Legal Holds<span style="color:blue">--&gt;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">  &lt;<span style="color:#a31515">FeatureSiteTemplateAssociation<span style="color:blue">
										<span style="color:red">Id<span style="color:blue">=<span style="color:black">"<span style="color:blue">38B5399F-4DAB-4938-8F92-B474A319F9B2<span style="color:black">"<span style="color:blue">
																<span style="color:red">TemplateName<span style="color:blue">=<span style="color:black">"<span style="color:blue">GLOBAL<span style="color:black">"<span style="color:blue"> /&gt;
</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">  &lt;<span style="color:#a31515">FeatureSiteTemplateAssociation<span style="color:blue">
										<span style="color:red">Id<span style="color:blue">=<span style="color:black">"<span style="color:blue">A13B775C-FB57-4171-9907-D2B97A3F9B6F<span style="color:black">"<span style="color:blue">
																<span style="color:red">TemplateName<span style="color:blue">=<span style="color:black">"<span style="color:blue">GLOBAL<span style="color:black">"<span style="color:blue"> /&gt;
</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;/<span style="color:#a31515">Elements<span style="color:blue">&gt;</span></span></span></p></td></tr></tbody></table></div><p>
 </p><p>Step 4:
</p><p>Now we want to be able to give the users somewhere to provision a retention schedule list in which they can modify retention schedules by content type.  In my scenario I have an administration site under "sites/admin" and so we will be provisioning the list there.  Because I do everything through content types, I will also create the content type feature in this step.
</p><p>The feature.xml for the content type will be:
</p><div><table style="border-collapse:collapse; background: #d9d9d9" border="0"><colgroup><col style="width:715px"/></colgroup><tbody valign="top"><tr><td style="padding-left: 7px; padding-right: 7px"><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;?<span style="color:#a31515">xml<span style="color:blue">
										<span style="color:red">version<span style="color:blue">=<span style="color:black">"<span style="color:blue">1.0<span style="color:black">"<span style="color:blue">
																<span style="color:red">encoding<span style="color:blue">=<span style="color:black">"<span style="color:blue">utf-8<span style="color:black">"<span style="color:blue"> ?&gt;
</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;<span style="color:#a31515">Feature<span style="color:blue">
										<span style="color:red">Id<span style="color:blue">=<span style="color:black">"<span style="color:blue">F45B1769-EBF2-4bc9-A0DA-F89B6802DB95<span style="color:black">"<span style="color:blue">
															</span></span></span></span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">         Title<span style="color:blue">=<span style="color:black">"<span style="color:blue">ABC Content Types<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">         Description<span style="color:blue">=<span style="color:black">"<span style="color:blue">This feature provisions all Content Types to necessitate appropriate metadata<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">         Version<span style="color:blue">=<span style="color:black">"<span style="color:blue">12.0.0.0<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">         Scope<span style="color:blue">=<span style="color:black">"<span style="color:blue">Site<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">         xmlns<span style="color:blue">=<span style="color:black">"<a href="http://schemas.microsoft.com/sharepoint/">http://schemas.microsoft.com/sharepoint/</a>"<span style="color:blue">&gt;
</span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">  &lt;<span style="color:#a31515">ElementManifests<span style="color:blue">&gt;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">    &lt;<span style="color:#a31515">ElementManifest<span style="color:blue">
										<span style="color:red">Location<span style="color:blue">=<span style="color:black">"<span style="color:blue">ctypes.xml<span style="color:black">"<span style="color:blue">/&gt;
</span></span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">  &lt;/<span style="color:#a31515">ElementManifests<span style="color:blue">&gt;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;/<span style="color:#a31515">Feature<span style="color:blue">&gt;</span></span></span></p></td></tr></tbody></table></div><p>
 </p><p>The ctypes.xml which provisions the content type will be:
</p><div><table style="border-collapse:collapse; background: #d9d9d9" border="0"><colgroup><col style="width:715px"/></colgroup><tbody valign="top"><tr><td style="padding-left: 7px; padding-right: 7px"><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;<span style="color:#a31515">Elements<span style="color:blue">
										<span style="color:red">xmlns<span style="color:blue">=<span style="color:black">"<a href="http://schemas.microsoft.com/sharepoint/">http://schemas.microsoft.com/sharepoint/</a>"<span style="color:blue">&gt;
</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">  &lt;<span style="color:#a31515">ContentType<span style="color:blue">
										<span style="color:red">ID<span style="color:blue">=<span style="color:black">"<span style="color:blue">0x01A4<span style="color:black">"<span style="color:blue">
															</span></span></span></span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">               BaseType<span style="color:blue">=<span style="color:black">"<span style="color:blue">0x01<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">               Description<span style="color:blue">=<span style="color:black">"<span style="color:blue">This stores Retention Schedule by Content Type<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">               Group<span style="color:blue">=<span style="color:black">"<span style="color:blue">ABC<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">               Name<span style="color:blue">=<span style="color:black">"<span style="color:blue">RetentionList<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">               Version<span style="color:blue">=<span style="color:black">"<span style="color:blue">0<span style="color:black">"<span style="color:blue">&gt;
</span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">  &lt;<span style="color:#a31515">FieldRefs<span style="color:blue">&gt;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">    &lt;<span style="color:#a31515">FieldRef<span style="color:blue">
										<span style="color:red">ID<span style="color:blue">=<span style="color:black">"<span style="color:blue">{96AAF204-A5E0-4851-A6F4-B3235EBEA185}<span style="color:black">"<span style="color:blue">
																<span style="color:red">Name<span style="color:blue">=<span style="color:black">"<span style="color:blue">_Archival<span style="color:black">"<span style="color:blue">
																						<span style="color:red">DisplayName<span style="color:blue">=<span style="color:black">"<span style="color:blue">Archive Schedule<span style="color:black">"<span style="color:blue"> /&gt;
</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">    &lt;<span style="color:#a31515">FieldRef<span style="color:blue">
										<span style="color:red">ID<span style="color:blue">=<span style="color:black">"<span style="color:blue">{67A14E20-617B-46d8-8598-433782CC9E4E}<span style="color:black">"<span style="color:blue">
																<span style="color:red">Name<span style="color:blue">=<span style="color:black">"<span style="color:blue">_Disposal<span style="color:black">"<span style="color:blue">
																						<span style="color:red">DisplayName<span style="color:blue">=<span style="color:black">"<span style="color:blue">Dispose Schedule<span style="color:black">"<span style="color:blue"> /&gt;
</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">  &lt;/<span style="color:#a31515">FieldRefs<span style="color:blue">&gt;
</span></span></span></p></td></tr><tr><td style="padding-left: 7px; padding-right: 7px"> </td></tr></tbody></table></div><p>
 </p><p>The feature.xml for the retention list looks like:
</p><div><table style="border-collapse:collapse; background: #d9d9d9" border="0"><colgroup><col style="width:715px"/></colgroup><tbody valign="top"><tr><td style="padding-left: 7px; padding-right: 7px"><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;?<span style="color:#a31515">xml<span style="color:blue">
										<span style="color:red">version<span style="color:blue">=<span style="color:black">"<span style="color:blue">1.0<span style="color:black">"<span style="color:blue">
																<span style="color:red">encoding<span style="color:blue">=<span style="color:black">"<span style="color:blue">utf-8<span style="color:black">"<span style="color:blue"> ?&gt;
</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;<span style="color:#a31515">Feature<span style="color:blue">
										<span style="color:red">Id<span style="color:blue">=<span style="color:black">"<span style="color:blue">A4CC0C25-6697-42cf-9ED4-94ED548B9186<span style="color:black">"<span style="color:blue">
															</span></span></span></span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">         Title<span style="color:blue">=<span style="color:black">"<span style="color:blue">Retention List<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">         Description<span style="color:blue">=<span style="color:black">"<span style="color:blue">This feature provisions the Content Type Retention List<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">         Version<span style="color:blue">=<span style="color:black">"<span style="color:blue">12.0.0.0<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">         Scope<span style="color:blue">=<span style="color:black">"<span style="color:blue">Web<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">         xmlns<span style="color:blue">=<span style="color:black">"<a href="http://schemas.microsoft.com/sharepoint/">http://schemas.microsoft.com/sharepoint/</a>"<span style="color:blue">&gt;
</span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">  &lt;<span style="color:#a31515">ElementManifests<span style="color:blue">&gt;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">    &lt;<span style="color:#a31515">ElementManifest<span style="color:blue">
										<span style="color:red">Location<span style="color:blue">=<span style="color:black">"<span style="color:blue">Retention\ListTemplateElements.xml<span style="color:black">"<span style="color:blue">/&gt;
</span></span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">    &lt;<span style="color:#a31515">ElementManifest<span style="color:blue">
										<span style="color:red">Location<span style="color:blue">=<span style="color:black">"<span style="color:blue">Retention\ListInstanceElements.xml<span style="color:black">"<span style="color:blue">/&gt;
</span></span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">    &lt;<span style="color:#a31515">ElementFile<span style="color:blue">
										<span style="color:red">Location<span style="color:blue">=<span style="color:black">"<span style="color:blue">Retention\schema.xml<span style="color:black">"<span style="color:blue">/&gt;
</span></span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">  &lt;/<span style="color:#a31515">ElementManifests<span style="color:blue">&gt;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;/<span style="color:#a31515">Feature<span style="color:blue">&gt;</span></span></span></p></td></tr></tbody></table></div><p>
 </p><p>I provide the template for the retention list which looks like (ListTemplateElements):
</p><div><table style="border-collapse:collapse; background: #d9d9d9" border="0"><colgroup><col style="width:715px"/></colgroup><tbody valign="top"><tr><td style="padding-left: 7px; padding-right: 7px"><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;?<span style="color:#a31515">xml<span style="color:blue">
										<span style="color:red">version<span style="color:blue">=<span style="color:black">"<span style="color:blue">1.0<span style="color:black">"<span style="color:blue">
																<span style="color:red">encoding<span style="color:blue">=<span style="color:black">"<span style="color:blue">utf-8<span style="color:black">"<span style="color:blue"> ?&gt;
</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;<span style="color:#a31515">Elements<span style="color:blue">
										<span style="color:red">xmlns<span style="color:blue">=<span style="color:black">"<a href="http://schemas.microsoft.com/sharepoint/">http://schemas.microsoft.com/sharepoint/</a>"<span style="color:blue">&gt;
</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;<span style="color:#a31515">ListTemplate<span style="color:blue">
										<span style="color:red">Name<span style="color:blue">=<span style="color:black">"<span style="color:blue">Retention<span style="color:black">"<span style="color:blue">
															</span></span></span></span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">              DisplayName<span style="color:blue">=<span style="color:black">"<span style="color:blue">Retention<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">              Description<span style="color:blue">=<span style="color:black">"<span style="color:blue">This template provides the retention schedules by content type<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">              BaseType<span style="color:blue">=<span style="color:black">"<span style="color:blue">0<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">              Type<span style="color:blue"> =<span style="color:black">"<span style="color:blue">6003<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">              OnQuickLaunch<span style="color:blue">=<span style="color:black">"<span style="color:blue">TRUE<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">              SecurityBits<span style="color:blue">=<span style="color:black">"<span style="color:blue">11<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">              Sequence<span style="color:blue">=<span style="color:black">"<span style="color:blue">410<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">              Image<span style="color:blue">=<span style="color:black">"<span style="color:blue">/_layouts/images/itgen.gif<span style="color:black">"<span style="color:blue"> /&gt;
</span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;/<span style="color:#a31515">Elements<span style="color:blue">&gt;</span></span></span></p></td></tr></tbody></table></div><p>
 </p><p>I instantiate the list like (ListInstanceElements):
</p><div><table style="border-collapse:collapse; background: #d9d9d9" border="0"><colgroup><col style="width:715px"/></colgroup><tbody valign="top"><tr><td style="padding-left: 7px; padding-right: 7px"><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;?<span style="color:#a31515">xml<span style="color:blue">
										<span style="color:red">version<span style="color:blue">=<span style="color:black">"<span style="color:blue">1.0<span style="color:black">"<span style="color:blue">
																<span style="color:red">encoding<span style="color:blue">=<span style="color:black">"<span style="color:blue">utf-8<span style="color:black">"<span style="color:blue"> ?&gt;
</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;<span style="color:#a31515">Elements<span style="color:blue">
										<span style="color:red">xmlns<span style="color:blue">=<span style="color:black">"<a href="http://schemas.microsoft.com/sharepoint/">http://schemas.microsoft.com/sharepoint/</a>"<span style="color:blue">&gt;
</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">  &lt;<span style="color:#a31515">ListInstance<span style="color:blue">
										<span style="color:red">Id<span style="color:blue">=<span style="color:black">"<span style="color:blue">6537B4F6-13B7-4d48-BC90-D01483859A95<span style="color:black">"<span style="color:blue">
															</span></span></span></span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">                Title<span style="color:blue">=<span style="color:black">"<span style="color:blue">Retention Schedule<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">                Url<span style="color:blue">=<span style="color:black">"<span style="color:blue">Lists/Retention<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">                Description<span style="color:blue">=<span style="color:black">"<span style="color:blue">This list the retention schedule for ABC<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">                TemplateType<span style="color:blue">=<span style="color:black">"<span style="color:blue">6003<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">                OnQuickLaunch<span style="color:blue">=<span style="color:black">"<span style="color:blue">TRUE<span style="color:black">"<span style="color:blue">&gt;
</span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">    &lt;<span style="color:#a31515">Data<span style="color:blue">&gt;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">      &lt;<span style="color:#a31515">Rows<span style="color:blue">&gt;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">        &lt;<span style="color:#a31515">Row<span style="color:blue">&gt;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          &lt;<span style="color:#a31515">Field<span style="color:blue">
										<span style="color:red">Name<span style="color:blue">=<span style="color:black">"<span style="color:blue">Title<span style="color:black">"<span style="color:blue">&gt;<span style="color:black">Default<span style="color:blue">&lt;/<span style="color:#a31515">Field<span style="color:blue">&gt;
</span></span></span></span></span></span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          &lt;<span style="color:#a31515">Field<span style="color:blue">
										<span style="color:red">Name<span style="color:blue">=<span style="color:black">"<span style="color:blue">_Archival<span style="color:black">"<span style="color:blue">&gt;<span style="color:black">6<span style="color:blue">&lt;/<span style="color:#a31515">Field<span style="color:blue">&gt;
</span></span></span></span></span></span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          &lt;<span style="color:#a31515">Field<span style="color:blue">
										<span style="color:red">Name<span style="color:blue">=<span style="color:black">"<span style="color:blue">_Disposal<span style="color:black">"<span style="color:blue">&gt;<span style="color:black">1<span style="color:blue">&lt;/<span style="color:#a31515">Field<span style="color:blue">&gt;
</span></span></span></span></span></span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">        &lt;/<span style="color:#a31515">Row<span style="color:blue">&gt;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">      &lt;/<span style="color:#a31515">Rows<span style="color:blue">&gt;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">    &lt;/<span style="color:#a31515">Data<span style="color:blue">&gt;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">  &lt;/<span style="color:#a31515">ListInstance<span style="color:blue">&gt;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;/<span style="color:#a31515">Elements<span style="color:blue">&gt;</span></span></span></p></td></tr></tbody></table></div><p>
 </p><p>Finally, I will provide just the pieces of the schema.xml file that I have changed.  For a shortcut, I first copy the schema.xml file from 12\templates\features\customlist\custlist\schema.xml.
</p><p>I changed the following sections:
</p><p>First line:
</p><div><table style="border-collapse:collapse; background: #d9d9d9" border="0"><colgroup><col style="width:715px"/></colgroup><tbody valign="top"><tr><td style="padding-left: 7px; padding-right: 7px"><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;<span style="color:#a31515">List<span style="color:blue">
										<span style="color:red">xmlns:ows<span style="color:blue">=<span style="color:black">"<span style="color:blue">Microsoft SharePoint<span style="color:black">"<span style="color:blue">
																<span style="color:red">Title<span style="color:blue">=<span style="color:black">"<span style="color:blue">Retention Schedule<span style="color:black">"<span style="color:blue">
																						<span style="color:red">FolderCreation<span style="color:blue">=<span style="color:black">"<span style="color:blue">FALSE<span style="color:black">"<span style="color:blue">
																												<span style="color:red">Direction<span style="color:blue">=<span style="color:black">"<span style="color:blue">$Resources:Direction;<span style="color:black">"<span style="color:blue">
																																		<span style="color:red">Url<span style="color:blue">=<span style="color:black">"<span style="color:blue">Lists/Retention<span style="color:black">"<span style="color:blue">
																																								<span style="color:red">BaseType<span style="color:blue">=<span style="color:black">"<span style="color:blue">0<span style="color:black">"<span style="color:blue">&gt;
</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></p><p>
 </p><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;<span style="color:#a31515">MetaData<span style="color:blue">&gt;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">  &lt;<span style="color:#a31515">ContentTypes<span style="color:blue">&gt;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">    &lt;<span style="color:#a31515">ContentTypeRef<span style="color:blue">
										<span style="color:red">ID<span style="color:blue">=<span style="color:black">"<span style="color:blue">0x01A4<span style="color:black">"<span style="color:blue">&gt;
</span></span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">      &lt;<span style="color:#a31515">Folder<span style="color:blue">
										<span style="color:red">TargetName<span style="color:blue">=<span style="color:black">"<span style="color:blue">Item<span style="color:black">"<span style="color:blue"> /&gt;
</span></span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">    &lt;/<span style="color:#a31515">ContentTypeRef<span style="color:blue">&gt;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">    &lt;<span style="color:#a31515">ContentTypeRef<span style="color:blue">
										<span style="color:red">ID<span style="color:blue">=<span style="color:black">"<span style="color:blue">0x0120<span style="color:black">"<span style="color:blue"> /&gt;
</span></span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">    &lt;/<span style="color:#a31515">ContentTypes<span style="color:blue">&gt;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">    &lt;<span style="color:#a31515">Fields<span style="color:blue">&gt;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">      &lt;<span style="color:#a31515">Field<span style="color:blue">
										<span style="color:red">ID<span style="color:blue">=<span style="color:black">"<span style="color:blue">{96AAF204-A5E0-4851-A6F4-B3235EBEA185}<span style="color:black">"<span style="color:blue">
																<span style="color:red">Name<span style="color:blue">=<span style="color:black">"<span style="color:blue">_Archival<span style="color:black">"<span style="color:blue">
																						<span style="color:red">Type<span style="color:blue">=<span style="color:black">"<span style="color:blue">Integer<span style="color:black">"<span style="color:blue">
																												<span style="color:red">Description<span style="color:blue">=<span style="color:black">"<span style="color:blue">(in years) how long before record get archived<span style="color:black">"<span style="color:blue">
																																		<span style="color:red">DisplayName<span style="color:blue">=<span style="color:black">"<span style="color:blue">Archive Schedule<span style="color:black">"<span style="color:blue"> /&gt;
</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">      &lt;<span style="color:#a31515">Field<span style="color:blue">
										<span style="color:red">ID<span style="color:blue">=<span style="color:black">"<span style="color:blue">{67A14E20-617B-46d8-8598-433782CC9E4E}<span style="color:black">"<span style="color:blue">
																<span style="color:red">Name<span style="color:blue">=<span style="color:black">"<span style="color:blue">_Disposal<span style="color:black">"<span style="color:blue">
																						<span style="color:red">Type<span style="color:blue">=<span style="color:black">"<span style="color:blue">Integer<span style="color:black">"<span style="color:blue">
																												<span style="color:red">Description<span style="color:blue">=<span style="color:black">"<span style="color:blue">(in years) how long before record get deleted<span style="color:black">"<span style="color:blue">
																																		<span style="color:red">DisplayName<span style="color:blue">=<span style="color:black">"<span style="color:blue">Dispose Date<span style="color:black">"<span style="color:blue"> /&gt;
</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">    &lt;/<span style="color:#a31515">Fields<span style="color:blue">&gt;</span></span></span></p></td></tr></tbody></table></div><p>
 </p><p>ViewFields:
</p><div><table style="border-collapse:collapse; background: #d9d9d9" border="0"><colgroup><col style="width:715px"/></colgroup><tbody valign="top"><tr><td style="padding-left: 7px; padding-right: 7px"><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;<span style="color:#a31515">ViewFields<span style="color:blue">&gt; 
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">  &lt;<span style="color:#a31515">FieldRef<span style="color:blue">
										<span style="color:red">Name<span style="color:blue">=<span style="color:black">"<span style="color:blue">Attachments<span style="color:black">" /<span style="color:blue">&gt;
</span></span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">  &lt;<span style="color:#a31515">FieldRef<span style="color:blue">
										<span style="color:red">Name<span style="color:blue">=<span style="color:black">"<span style="color:blue">LinkTitle<span style="color:black">"<span style="color:blue"> /&gt;
</span></span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">  &lt;<span style="color:#a31515">FieldRef<span style="color:blue">
										<span style="color:red">Name<span style="color:blue">=<span style="color:black">"<span style="color:blue">_Archival<span style="color:black">"<span style="color:blue"> /&gt;
</span></span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">  &lt;<span style="color:#a31515">FieldRef<span style="color:blue">
										<span style="color:red">Name<span style="color:blue">=<span style="color:black">"<span style="color:blue">_Disposal<span style="color:black">"<span style="color:blue"> /&gt;
</span></span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;/<span style="color:#a31515">ViewFields<span style="color:blue">&gt;</span></span></span></p></td></tr></tbody></table></div><p>
 </p><p>Step :
</p><p>Now that we have a place that the users can modify retention schedules, we have provisioned the fields, added them to content types, and extended the document content type we are ready for the "final" step which will be creating the event receivers that are attached to every list template id of 101 which will be all document libraries created in the farm.
</p><p>The feature.xml files will look like:
</p><div><table style="border-collapse:collapse; background: #d9d9d9" border="0"><colgroup><col style="width:715px"/></colgroup><tbody valign="top"><tr><td style="padding-left: 7px; padding-right: 7px"><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;?<span style="color:#a31515">xml<span style="color:blue">
										<span style="color:red">version<span style="color:blue">=<span style="color:black">"<span style="color:blue">1.0<span style="color:black">"<span style="color:blue">
																<span style="color:red">encoding<span style="color:blue">=<span style="color:black">"<span style="color:blue">utf-8<span style="color:black">"<span style="color:blue"> ?&gt;
</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;<span style="color:#a31515">Feature<span style="color:blue">
										<span style="color:red">Id<span style="color:blue">=<span style="color:black">"<span style="color:blue">A13B775C-FB57-4171-9907-D2B97A3F9B6F<span style="color:black">"<span style="color:blue">
															</span></span></span></span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">         Title<span style="color:blue">=<span style="color:black">"<span style="color:blue">Legal Holds<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">         Description<span style="color:blue">=<span style="color:black">"<span style="color:blue">This feature provides document item event receiver for legal holds<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">         Version<span style="color:blue">=<span style="color:black">"<span style="color:blue">12.0.0.0<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">         Scope<span style="color:blue">=<span style="color:black">"<span style="color:blue">Web<span style="color:black">"<span style="color:blue">
												</span></span></span></span></span></span></p><p><span style="color:red; font-family:Courier New; font-size:7pt">         xmlns<span style="color:blue">=<span style="color:black">"<a href="http://schemas.microsoft.com/sharepoint/">http://schemas.microsoft.com/sharepoint/</a>"<span style="color:blue">&gt;
</span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">  &lt;<span style="color:#a31515">ElementManifests<span style="color:blue">&gt;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">    &lt;<span style="color:#a31515">ElementManifest<span style="color:blue">
										<span style="color:red">Location<span style="color:blue">=<span style="color:black">"<span style="color:blue">elements.xml<span style="color:black">"<span style="color:blue">/&gt;
</span></span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">  &lt;/<span style="color:#a31515">ElementManifests<span style="color:blue">&gt;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;/<span style="color:#a31515">Feature<span style="color:blue">&gt;</span></span></span></p></td></tr></tbody></table></div><p>The interesting thing about the above is that it will go ahead and attach the receivers to all document library templates.
</p><p>The elements file for attaching the code would look like:
</p><div><table style="border-collapse:collapse; background: #d9d9d9" border="0"><colgroup><col style="width:715px"/></colgroup><tbody valign="top"><tr><td style="padding-left: 7px; padding-right: 7px"><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;?<span style="color:#a31515">xml<span style="color:blue">
										<span style="color:red">version<span style="color:blue">=<span style="color:black">"<span style="color:blue">1.0<span style="color:black">"<span style="color:blue">
																<span style="color:red">encoding<span style="color:blue">=<span style="color:black">"<span style="color:blue">utf-8<span style="color:black">"<span style="color:blue"> ?&gt;
</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;<span style="color:#a31515">Elements<span style="color:blue">
										<span style="color:red">xmlns<span style="color:blue">=<span style="color:black">"<a href="http://schemas.microsoft.com/sharepoint/">http://schemas.microsoft.com/sharepoint/</a>"<span style="color:blue">&gt;
</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">  &lt;<span style="color:#a31515">Receivers<span style="color:blue">
										<span style="color:red">ListTemplateId<span style="color:blue">=<span style="color:black">"<span style="color:blue">101<span style="color:black">"<span style="color:blue">&gt;
</span></span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">    &lt;<span style="color:#a31515">Receiver<span style="color:blue">&gt;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">      &lt;<span style="color:#a31515">Name<span style="color:blue">&gt;<span style="color:black">Document Adding Event<span style="color:blue">&lt;/<span style="color:#a31515">Name<span style="color:blue">&gt;
</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">      &lt;<span style="color:#a31515">Type<span style="color:blue">&gt;<span style="color:black">ItemAdded<span style="color:blue">&lt;/<span style="color:#a31515">Type<span style="color:blue">&gt;
</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">      &lt;<span style="color:#a31515">SequenceNumber<span style="color:blue">&gt;<span style="color:black">25000<span style="color:blue">&lt;/<span style="color:#a31515">SequenceNumber<span style="color:blue">&gt;
</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">      &lt;<span style="color:#a31515">Assembly<span style="color:blue">&gt;<span style="color:black">MyNameSpace.Features, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f6e07d4bee530c01<span style="color:blue">&lt;/<span style="color:#a31515">Assembly<span style="color:blue">&gt;
</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">      &lt;<span style="color:#a31515">Class<span style="color:blue">&gt;<span style="color:black">MyNameSpace.Features.LegalHoldItemEventReceiver<span style="color:blue">&lt;/<span style="color:#a31515">Class<span style="color:blue">&gt;
</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">      &lt;<span style="color:#a31515">Data<span style="color:blue">&gt;&lt;/<span style="color:#a31515">Data<span style="color:blue">&gt;
</span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">      &lt;<span style="color:#a31515">Filter<span style="color:blue">&gt;&lt;/<span style="color:#a31515">Filter<span style="color:blue">&gt;
</span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">    &lt;/<span style="color:#a31515">Receiver<span style="color:blue">&gt;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">  &lt;/<span style="color:#a31515">Receivers<span style="color:blue">&gt;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">  &lt;<span style="color:#a31515">Receivers<span style="color:blue">
										<span style="color:red">ListTemplateId<span style="color:blue">=<span style="color:black">"<span style="color:blue">101<span style="color:black">"<span style="color:blue">&gt;
</span></span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">    &lt;<span style="color:#a31515">Receiver<span style="color:blue">&gt;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">      &lt;<span style="color:#a31515">Name<span style="color:blue">&gt;<span style="color:black">Document Updated Event<span style="color:blue">&lt;/<span style="color:#a31515">Name<span style="color:blue">&gt;
</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">      &lt;<span style="color:#a31515">Type<span style="color:blue">&gt;<span style="color:black">ItemUpdated<span style="color:blue">&lt;/<span style="color:#a31515">Type<span style="color:blue">&gt;
</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">      &lt;<span style="color:#a31515">SequenceNumber<span style="color:blue">&gt;<span style="color:black">25001<span style="color:blue">&lt;/<span style="color:#a31515">SequenceNumber<span style="color:blue">&gt;
</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">      &lt;<span style="color:#a31515">Assembly<span style="color:blue">&gt;<span style="color:black">MyNameSpace.Features, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f6e07d4bee530c01<span style="color:blue">&lt;/<span style="color:#a31515">Assembly<span style="color:blue">&gt;
</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">      &lt;<span style="color:#a31515">Class<span style="color:blue">&gt;<span style="color:black">MyNameSpace.Features.LegalHoldItemEventReceiver<span style="color:blue">&lt;/<span style="color:#a31515">Class<span style="color:blue">&gt;
</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">      &lt;<span style="color:#a31515">Data<span style="color:blue">&gt;&lt;/<span style="color:#a31515">Data<span style="color:blue">&gt;
</span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">      &lt;<span style="color:#a31515">Filter<span style="color:blue">&gt;&lt;/<span style="color:#a31515">Filter<span style="color:blue">&gt;
</span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">    &lt;/<span style="color:#a31515">Receiver<span style="color:blue">&gt;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">  &lt;/<span style="color:#a31515">Receivers<span style="color:blue">&gt;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">&lt;/<span style="color:#a31515">Elements<span style="color:blue">&gt;</span></span></span></p></td></tr></tbody></table></div><p>
 </p><p>The code for the receiver would look like:
</p><div><table style="border-collapse:collapse; background: #d9d9d9" border="0"><colgroup><col style="width:1038px"/></colgroup><tbody valign="top"><tr><td style="padding-left: 7px; padding-right: 7px"><p><span style="color:blue; font-family:Courier New; font-size:7pt">using<span style="color:black"> System;<span style="color:blue">
									</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">using<span style="color:black"> Microsoft.SharePoint;<span style="color:blue">
									</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">namespace<span style="color:black"> MyNameSpace.Features<span style="color:blue">
									</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">{
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">  class <span style="color:#2b91af">LegalHoldItemEventReceiver<span style="color:blue"> : <span style="color:#2b91af">SPItemEventReceiver
</span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">  {
</span></p><p><span style="color:green; font-family:Courier New; font-size:7pt">    //Sets
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">    public override void ItemAdded(<span style="color:#2b91af">SPItemEventProperties<span style="color:blue"> properties)
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">    {
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">      base.ItemAdded(properties);
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">      using (<span style="color:#2b91af">SPWeb<span style="color:blue"> spweb = properties.OpenWeb())
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">      {
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">        if (spweb.Fields.ContainsField(<span style="color:#a31515">"NewStartDate"<span style="color:blue">))
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">        {
</span></p><p><span style="color:green; font-family:Courier New; font-size:7pt">          //Set the base counter for archive
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          properties.ListItem[<span style="color:#a31515">"NewStartDate"<span style="color:blue">] = <span style="color:#2b91af">DateTime<span style="color:blue">.Today;
</span></span></span></span></span></p><p>
 </p><p><span style="color:green; font-family:Courier New; font-size:7pt">          //Get list of content types and set retention schedule
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          string AdminUrl = spweb.Url.Replace(spweb.ServerRelativeUrl,string.Empty) + <span style="color:#a31515">@"/sites/admin"<span style="color:blue">;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          string contentType = properties.ListItem.ContentType.Name;
</span></p><p>
 </p><p><span style="color:green; font-family:Courier New; font-size:7pt">          //Set Default Values if no default set
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          int archiveSchedule = 6;
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          int disposeSchedule = 1;
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          using (<span style="color:#2b91af">SPSite<span style="color:blue"> adminSite = new <span style="color:#2b91af">SPSite<span style="color:blue">(AdminUrl))
</span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          {
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">            using (<span style="color:#2b91af">SPWeb<span style="color:blue"> adminWeb = adminSite.OpenWeb())
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">            {
</span></p><p><span style="color:#2b91af; font-family:Courier New; font-size:7pt">              SPList<span style="color:blue"> lstRetention = adminWeb.Lists[<span style="color:#a31515">"Retention Schedule"<span style="color:blue">];
</span></span></span></span></p><p><span style="color:green; font-family:Courier New; font-size:7pt">              //Run CAML for Content Type
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">              string strQuery = <span style="color:#a31515">@"&lt;Where&gt;&lt;Eq&gt;&lt;FieldRef Name='Title' /&gt;&lt;Value Type='Text'&gt;"<span style="color:blue"> + contentType + <span style="color:#a31515">@"&lt;/Value&gt;&lt;/Eq&gt;&lt;/Where&gt;"<span style="color:blue">;
</span></span></span></span></span></p><p><span style="color:#2b91af; font-family:Courier New; font-size:7pt">              SPQuery<span style="color:blue"> ctQuery = new <span style="color:#2b91af">SPQuery<span style="color:blue">();
</span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">              ctQuery.ViewFields = <span style="color:#a31515">"&lt;FieldRef Name='Title'/&gt;&lt;FieldRef Name='_Archival'/&gt;&lt;FieldRef Name='_Disposal'/&gt;"<span style="color:blue">;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">              ctQuery.Query = strQuery;
</span></p><p><span style="color:#2b91af; font-family:Courier New; font-size:7pt">              SPListItemCollection<span style="color:blue"> splic = lstRetention.GetItems(ctQuery);
</span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">              if (splic.Count &gt; 0)
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">              {
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">                archiveSchedule = (int)splic[0][new <span style="color:#2b91af">Guid<span style="color:blue">(<span style="color:#a31515">"{96AAF204-A5E0-4851-A6F4-B3235EBEA185}"<span style="color:blue">)];
</span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">                disposeSchedule = (int)splic[0][new <span style="color:#2b91af">Guid<span style="color:blue">(<span style="color:#a31515">"{67A14E20-617B-46d8-8598-433782CC9E4E}"<span style="color:blue">)];
</span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">              }
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">              else
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">              {
</span></p><p><span style="color:green; font-family:Courier New; font-size:7pt">                //if no results Run CAML for Default
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">                strQuery = <span style="color:#a31515">@"&lt;Where&gt;&lt;Eq&gt;&lt;FieldRef Name='Title' /&gt;&lt;Value Type='Text'&gt;Default&lt;/Value&gt;&lt;/Eq&gt;&lt;/Where&gt;"<span style="color:blue">;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">                ctQuery = new <span style="color:#2b91af">SPQuery<span style="color:blue">();
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">                ctQuery.ViewFields = <span style="color:#a31515">"&lt;FieldRef Name='Title'/&gt;&lt;FieldRef Name='_Archival'/&gt;&lt;FieldRef Name='_Disposal'/&gt;"<span style="color:blue">;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">                ctQuery.Query = strQuery;
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">                splic = lstRetention.GetItems(ctQuery);
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">                if (splic.Count &gt; 0)
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">                {
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">                  archiveSchedule = (int)splic[0][new <span style="color:#2b91af">Guid<span style="color:blue">(<span style="color:#a31515">"{96AAF204-A5E0-4851-A6F4-B3235EBEA185}"<span style="color:blue">)];
</span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">                  disposeSchedule = (int)splic[0][new <span style="color:#2b91af">Guid<span style="color:blue">(<span style="color:#a31515">"{67A14E20-617B-46d8-8598-433782CC9E4E}"<span style="color:blue">)];
</span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">                }
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">              }
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">            }
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          }
</span></p><p>
 </p><p><span style="color:green; font-family:Courier New; font-size:7pt">          //Set Archive and Dispose Dates for record
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          properties.ListItem[<span style="color:#a31515">"ArchiveDate"<span style="color:blue">] = <span style="color:#2b91af">DateTime<span style="color:blue">.Today.AddYears(archiveSchedule);
</span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          properties.ListItem[<span style="color:#a31515">"DisposeDate"<span style="color:blue">] = <span style="color:#2b91af">DateTime<span style="color:blue">.Today.AddYears(archiveSchedule + disposeSchedule);
</span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          this.DisableEventFiring();
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          try
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          {
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">            properties.ListItem.Update();
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          }
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          catch { }
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          finally
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          {
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">            this.EnableEventFiring();
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          }
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">        }
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">      }
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">    }
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">    public override void ItemUpdated(<span style="color:#2b91af">SPItemEventProperties<span style="color:blue"> properties)
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">    {
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">      base.ItemUpdated(properties);
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">      using (<span style="color:#2b91af">SPWeb<span style="color:blue"> spweb = properties.OpenWeb())
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">      {
</span></p><p><span style="color:green; font-family:Courier New; font-size:7pt">        //Only run the code if the Legal Hold box has been modified
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">        if (spweb.Fields.ContainsField(<span style="color:#a31515">"LegalHold"<span style="color:blue">))
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">        {
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          bool BeforeLegalHold = true;
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          bool AfterLegalHold = true;
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          if (properties.BeforeProperties[<span style="color:#a31515">"LegalHold"<span style="color:blue">] == null || properties.BeforeProperties[<span style="color:#a31515">"LegalHold"<span style="color:blue">].ToString() == <span style="color:#a31515">"false"<span style="color:blue">)
</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          {
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">            BeforeLegalHold = false;
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          }
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          if (properties.AfterProperties[<span style="color:#a31515">"LegalHold"<span style="color:blue">] == null || properties.AfterProperties[<span style="color:#a31515">"LegalHold"<span style="color:blue">].ToString() == <span style="color:#a31515">"false"<span style="color:blue">)
</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          {
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">            AfterLegalHold = false;
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          }
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          if (BeforeLegalHold != AfterLegalHold)
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          {
</span></p><p><span style="color:green; font-family:Courier New; font-size:7pt">            //Get list of content types and set retention schedule
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">            string AdminUrl = spweb.Url.Replace(spweb.ServerRelativeUrl, string.Empty) + <span style="color:#a31515">@"/sites/admin"<span style="color:blue">;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">            string contentType = properties.ListItem.ContentType.Name;
</span></p><p><span style="color:green; font-family:Courier New; font-size:7pt">            //Set Default Values if no default set
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">            int archiveSchedule = 6;
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">            int disposeSchedule = 1;
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">            using (<span style="color:#2b91af">SPSite<span style="color:blue"> adminSite = new <span style="color:#2b91af">SPSite<span style="color:blue">(AdminUrl))
</span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">            {
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">              using (<span style="color:#2b91af">SPWeb<span style="color:blue"> adminWeb = adminSite.OpenWeb())
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">              {
</span></p><p><span style="color:#2b91af; font-family:Courier New; font-size:7pt">                SPList<span style="color:blue"> lstRetention = adminWeb.Lists[<span style="color:#a31515">"Retention Schedule"<span style="color:blue">];
</span></span></span></span></p><p><span style="color:green; font-family:Courier New; font-size:7pt">                //Run CAML for Content Type
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">                string strQuery = <span style="color:#a31515">@"&lt;Where&gt;&lt;Eq&gt;&lt;FieldRef Name='Title' /&gt;&lt;Value Type='Text'&gt;"<span style="color:blue"> + contentType +  <span style="color:#a31515">@"&lt;/Value&gt;&lt;/Eq&gt;&lt;/Where&gt;"<span style="color:blue">;
</span></span></span></span></span></p><p><span style="color:#2b91af; font-family:Courier New; font-size:7pt">                SPQuery<span style="color:blue"> ctQuery = new <span style="color:#2b91af">SPQuery<span style="color:blue">();
</span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">                ctQuery.ViewFields = <span style="color:#a31515">"&lt;FieldRef Name='Title'/&gt;&lt;FieldRef Name='_Archival'/&gt;&lt;FieldRef Name='_Disposal'/&gt;"<span style="color:blue">;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">                ctQuery.Query = strQuery;
</span></p><p><span style="color:#2b91af; font-family:Courier New; font-size:7pt">                SPListItemCollection<span style="color:blue"> splic = lstRetention.GetItems(ctQuery);
</span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">                if (splic.Count &gt; 0)
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">                {
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">                  archiveSchedule = (int)splic[0][new <span style="color:#2b91af">Guid<span style="color:blue">(<span style="color:#a31515">"{96AAF204-A5E0-4851-A6F4-B3235EBEA185}"<span style="color:blue">)];
</span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">                  disposeSchedule = (int)splic[0][new <span style="color:#2b91af">Guid<span style="color:blue">(<span style="color:#a31515">"{67A14E20-617B-46d8-8598-433782CC9E4E}"<span style="color:blue">)];
</span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">                }
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">                else
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">                {
</span></p><p><span style="color:green; font-family:Courier New; font-size:7pt">                  //if no results Run CAML for Default
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">                strQuery = <span style="color:#a31515">@"&lt;Where&gt;&lt;Eq&gt;&lt;FieldRef Name='Title' /&gt;&lt;Value Type='Text'&gt;Default&lt;/Value&gt;&lt;/Eq&gt;&lt;/Where&gt;"<span style="color:blue">;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">                ctQuery = new <span style="color:#2b91af">SPQuery<span style="color:blue">();
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">                ctQuery.ViewFields = <span style="color:#a31515">"&lt;FieldRef Name='Title'/&gt;&lt;FieldRef Name='_Archival'/&gt;&lt;FieldRef Name='_Disposal'/&gt;"<span style="color:blue">;
</span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">                ctQuery.Query = strQuery;
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">                splic = lstRetention.GetItems(ctQuery);
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">                if (splic.Count &gt; 0)
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">                {
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">                  archiveSchedule = (int)splic[0][new <span style="color:#2b91af">Guid<span style="color:blue">(<span style="color:#a31515">"{96AAF204-A5E0-4851-A6F4-B3235EBEA185}"<span style="color:blue">)];
</span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">                  disposeSchedule = (int)splic[0][new <span style="color:#2b91af">Guid<span style="color:blue">(<span style="color:#a31515">"{67A14E20-617B-46d8-8598-433782CC9E4E}"<span style="color:blue">)];
</span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">                }
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">              }
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">            }
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          }
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          if (AfterLegalHold)
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          {
</span></p><p><span style="color:green; font-family:Courier New; font-size:7pt">            //Empty Archive, Dispose and Last Legal End Dates
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">            properties.ListItem[new <span style="color:#2b91af">Guid<span style="color:blue">(<span style="color:#a31515">"{DBA90AA4-B671-4c49-9ABF-C8C819DE0F13}"<span style="color:blue">)] = null;
</span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">            properties.ListItem[new <span style="color:#2b91af">Guid<span style="color:blue">(<span style="color:#a31515">"{1D6D2CE5-ABCD-4368-829B-085D3FBE99FB}"<span style="color:blue">)] = null;
</span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">            properties.ListItem[new <span style="color:#2b91af">Guid<span style="color:blue">(<span style="color:#a31515">"{14CE4BF3-F83A-410d-A454-A12FD20A60A9}"<span style="color:blue">)] = null;
</span></span></span></span></span></p><p><span style="color:green; font-family:Courier New; font-size:7pt">            //Set Last Legal Start Date
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">            properties.ListItem[new <span style="color:#2b91af">Guid<span style="color:blue">(<span style="color:#a31515">"{DBA5FD1B-97A0-470f-89B8-EB98BC28061A}"<span style="color:blue">)] = <span style="color:#2b91af">DateTime<span style="color:blue">.Today;
</span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          }
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          else
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          {
</span></p><p><span style="color:green; font-family:Courier New; font-size:7pt">            //Set Last Legal End Dates, Base Counter
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">            properties.ListItem[new <span style="color:#2b91af">Guid<span style="color:blue">(<span style="color:#a31515">"{14CE4BF3-F83A-410d-A454-A12FD20A60A9}"<span style="color:blue">)] = <span style="color:#2b91af">DateTime<span style="color:blue">.Today;
</span></span></span></span></span></span></span></p><p><span style="color:green; font-family:Courier New; font-size:7pt">            //Get Difference between start and end legal hold dates
</span></p><p><span style="color:#2b91af; font-family:Courier New; font-size:7pt">            TimeSpan<span style="color:blue"> datediff = <span style="color:#2b91af">DateTime<span style="color:blue">.Today.Subtract((<span style="color:#2b91af">DateTime<span style="color:blue">)properties.ListItem[new <span style="color:#2b91af">Guid<span style="color:blue">(<span style="color:#a31515">"{DBA5FD1B-97A0-470f-89B8-EB98BC28061A}"<span style="color:blue">)]);
</span></span></span></span></span></span></span></span></span></span></p><p><span style="color:green; font-family:Courier New; font-size:7pt">            //Get current base counter date
</span></p><p><span style="color:#2b91af; font-family:Courier New; font-size:7pt">            DateTime<span style="color:blue"> dtCurrentBaseCounterDate = (<span style="color:#2b91af">DateTime<span style="color:blue">)properties.ListItem[new <span style="color:#2b91af">Guid<span style="color:blue">(<span style="color:#a31515">"{1CDE08F2-DAF6-4449-B481- 31095207A983}"<span style="color:blue">)];
</span></span></span></span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">            properties.ListItem[new <span style="color:#2b91af">Guid<span style="color:blue">(<span style="color:#a31515">"{1CDE08F2-DAF6-4449-B481-31095207A983}"<span style="color:blue">)] = dtCurrentBaseCounterDate.AddDays(datediff.Days);
</span></span></span></span></span></p><p><span style="color:green; font-family:Courier New; font-size:7pt">            //Set Archive, Dispose Dates based on retention schedules
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">            properties.ListItem[new <span style="color:#2b91af">Guid<span style="color:blue">(<span style="color:#a31515">"{DBA90AA4-B671-4c49-9ABF-C8C819DE0F13}"<span style="color:blue">)] = dtCurrentBaseCounterDate.AddDays(datediff.Days).AddYears(archiveSchedule);
</span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">            properties.ListItem[new <span style="color:#2b91af">Guid<span style="color:blue">(<span style="color:#a31515">"{1D6D2CE5-ABCD-4368-829B-085D3FBE99FB}"<span style="color:blue">)] = dtCurrentBaseCounterDate.AddDays(datediff.Days).AddYears(archiveSchedule + disposeSchedule);
</span></span></span></span></span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          }
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          this.DisableEventFiring();
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          try
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          {
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">            properties.ListItem.Update();
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          }
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          catch { }
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          finally
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          {
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">            this.EnableEventFiring();
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">          }
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">        }
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">      }
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">    }
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">  }
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt"> }
</span></p><p><span style="color:blue; font-family:Courier New; font-size:7pt">}</span> </p></td></tr></tbody></table></div><p>
 </p><p>After all this, you now have an automatically calculated Archive and Dispose date that the users can control via content type as well as the ability to pause based on legal holds!
</p><p>In the next post on this series, I will provide the mechanism to automatically provision the scope that will tell what documents need to be archived and deleted as well as provide the timer job that does so!
</p><p>Hope this helps
</p>]]></content:encoded>
    </item>
    <item>
      <title>2007 Out of the Box Site Template Video Series</title>
      <link>https://docs.microsoft.com/archive/blogs/joekr/2007-out-of-the-box-site-template-video-series</link>
      <pubDate>Fri, 09 Apr 2010 10:08:00 GMT</pubDate>
      <dc:creator><![CDATA[jakrupin]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/joekr/2010/04/09/2007-out-of-the-box-site-template-video-series/</guid>
      <description><![CDATA[Nikhil Shringarpurey (CTO of ProSource)&nbsp; has a wonderful set of one minute videos that...]]></description>
      <content:encoded><![CDATA[<P>Nikhil Shringarpurey (CTO of ProSource)&nbsp; has a wonderful set of one minute videos that demonstrate the functions of each of the common out of the box template, complete with audio and video walkthroughs.</P>
<P>&nbsp;This is extremely useful if you are just looking for a quick tutorial of what each one has and does for the business.</P>
<P>&nbsp;I highly recommend reviewing these for audiences who are new to SharePoint 2007.</P>
<P>&nbsp;These videos are located at:&nbsp; <FONT size=1><A href="http://www.themossmen.com/profiles/nikhil/Media">http://www.themossmen.com/profiles/nikhil/Media</A></P></FONT>]]></content:encoded>
    </item>
    <item>
      <title>Discussion Thread Reply Problem</title>
      <link>https://docs.microsoft.com/archive/blogs/joekr/discussion-thread-reply-problem</link>
      <pubDate>Mon, 04 May 2009 12:48:00 GMT</pubDate>
      <dc:creator><![CDATA[jakrupin]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/joekr/2009/05/04/discussion-thread-reply-problem/</guid>
      <description><![CDATA[Today we are going to address the practical problem of notifications in a discussion thread. The...]]></description>
      <content:encoded><![CDATA[<P>Today we are going to address the practical problem of notifications in a discussion thread. The case study is that I would like the owner of a discussion topic to receive email notifications whenever someone replies to their particular thread. I also do not want to write code (elimination of SPAlert through list item even receiver). We can't do an alert because the whole list is managed by several people and replies must be dynamic. </P>
<P>In comes workflow through SPD (SharePoint Designer) to save the day. </P>
<P>First, create a workflow in SPD: </P>
<P><A href="http://s195.photobucket.com/albums/z302/jakrupin/BlogPictures/?action=view&amp;current=WF01-NewWorkflowSPD.jpg" mce_href="http://s195.photobucket.com/albums/z302/jakrupin/BlogPictures/?action=view&amp;current=WF01-NewWorkflowSPD.jpg"><IMG alt="" src="http://i195.photobucket.com/albums/z302/jakrupin/BlogPictures/WF01-NewWorkflowSPD.jpg" border=0 mce_src="http://i195.photobucket.com/albums/z302/jakrupin/BlogPictures/WF01-NewWorkflowSPD.jpg"></A> </P>
<P>You must then define your new workflow and set the parameters. </P>
<UL>
<LI>Give this workflow a name you can remember </LI>
<LI>Make absolutely sure that the discussion board you are trying to modify is chosen as this will determine the fields available later in the workflow </LI>
<LI>Only choose "Automatically start this workflow when a new item is created" as we don't want manual intervention and changes may not be warranted. </LI>
<LI>When Complete, chose next </LI></UL>
<P><A href="http://s195.photobucket.com/albums/z302/jakrupin/BlogPictures/?action=view&amp;current=WF02-WorkflowNameParameters.jpg" mce_href="http://s195.photobucket.com/albums/z302/jakrupin/BlogPictures/?action=view&amp;current=WF02-WorkflowNameParameters.jpg"><IMG alt="" src="http://i195.photobucket.com/albums/z302/jakrupin/BlogPictures/WF02-WorkflowNameParameters.jpg" border=0 mce_src="http://i195.photobucket.com/albums/z302/jakrupin/BlogPictures/WF02-WorkflowNameParameters.jpg"></A> </P>
<P>We will then set the conditions parameter up. This will trigger this workflow if it meets the conditions you supply. In this case, we are simply going to tell the workflow to fire if this is not a root post. In other words, all replies will trigger this workflow and the initial creation of the thread will not. Also notice that we are giving this particular step a name. </P>
<P><A href="http://s195.photobucket.com/albums/z302/jakrupin/BlogPictures/?action=view&amp;current=WF03-CompareDS.jpg" mce_href="http://s195.photobucket.com/albums/z302/jakrupin/BlogPictures/?action=view&amp;current=WF03-CompareDS.jpg"><IMG alt="" src="http://i195.photobucket.com/albums/z302/jakrupin/BlogPictures/WF03-CompareDS.jpg" border=0 mce_src="http://i195.photobucket.com/albums/z302/jakrupin/BlogPictures/WF03-CompareDS.jpg"></A> </P>
<P><A href="http://s195.photobucket.com/albums/z302/jakrupin/BlogPictures/?action=view&amp;current=WF04-Condition1.jpg" mce_href="http://s195.photobucket.com/albums/z302/jakrupin/BlogPictures/?action=view&amp;current=WF04-Condition1.jpg"><IMG alt="" src="http://i195.photobucket.com/albums/z302/jakrupin/BlogPictures/WF04-Condition1.jpg" border=0 mce_src="http://i195.photobucket.com/albums/z302/jakrupin/BlogPictures/WF04-Condition1.jpg"></A> </P>
<P>When completed conditions, your screen should look like the below as "0" means false in this case: </P>
<P><A href="http://s195.photobucket.com/albums/z302/jakrupin/BlogPictures/?action=view&amp;current=WF05-Condition2.jpg" mce_href="http://s195.photobucket.com/albums/z302/jakrupin/BlogPictures/?action=view&amp;current=WF05-Condition2.jpg"><IMG alt="" src="http://i195.photobucket.com/albums/z302/jakrupin/BlogPictures/WF05-Condition2.jpg" border=0 mce_src="http://i195.photobucket.com/albums/z302/jakrupin/BlogPictures/WF05-Condition2.jpg"></A> </P>
<P>Now we are going to focus on "Actions". This determines what the workflow is actually going to do. In this case, we want to email the discussion thread owner and so we are going to choose "Send an Email". </P>
<P><A href="http://s195.photobucket.com/albums/z302/jakrupin/BlogPictures/?action=view&amp;current=WF06-Action1.jpg" mce_href="http://s195.photobucket.com/albums/z302/jakrupin/BlogPictures/?action=view&amp;current=WF06-Action1.jpg"><IMG alt="" src="http://i195.photobucket.com/albums/z302/jakrupin/BlogPictures/WF06-Action1.jpg" border=0 mce_src="http://i195.photobucket.com/albums/z302/jakrupin/BlogPictures/WF06-Action1.jpg"></A> </P>
<P>In the "To" field we can have a "workflow lookup" which will run a workflow within a workflow. Essentially what we want to do is determine the owner of the thread based on the current item's data. So if John Doe sends a reply to Jane Doe, we don't want to email Jane Doe. </P>
<P><A href="http://s195.photobucket.com/albums/z302/jakrupin/BlogPictures/?action=view&amp;current=WF07-EmailTo1.jpg" mce_href="http://s195.photobucket.com/albums/z302/jakrupin/BlogPictures/?action=view&amp;current=WF07-EmailTo1.jpg"><IMG alt="" src="http://i195.photobucket.com/albums/z302/jakrupin/BlogPictures/WF07-EmailTo1.jpg" border=0 mce_src="http://i195.photobucket.com/albums/z302/jakrupin/BlogPictures/WF07-EmailTo1.jpg"></A> </P>
<P>So if you look at the filled out properties you can see that we are going to send it to the "created by" field of the top level thread. We are mapping the current item to the Discussion thread by the current Item's Parent Folder ID to the ID of the thread. This will pull back the created by owner and here is the magic. </P>
<P><A href="http://s195.photobucket.com/albums/z302/jakrupin/BlogPictures/?action=view&amp;current=WF09-EmailTo3.jpg" mce_href="http://s195.photobucket.com/albums/z302/jakrupin/BlogPictures/?action=view&amp;current=WF09-EmailTo3.jpg"><IMG alt="" src="http://i195.photobucket.com/albums/z302/jakrupin/BlogPictures/WF09-EmailTo3.jpg" border=0 mce_src="http://i195.photobucket.com/albums/z302/jakrupin/BlogPictures/WF09-EmailTo3.jpg"></A> </P>
<P><A href="http://s195.photobucket.com/albums/z302/jakrupin/BlogPictures/?action=view&amp;current=WF10-Action2.jpg" mce_href="http://s195.photobucket.com/albums/z302/jakrupin/BlogPictures/?action=view&amp;current=WF10-Action2.jpg"><IMG alt="" src="http://i195.photobucket.com/albums/z302/jakrupin/BlogPictures/WF10-Action2.jpg" border=0 mce_src="http://i195.photobucket.com/albums/z302/jakrupin/BlogPictures/WF10-Action2.jpg"></A> </P>
<P>Finally we can choose Finish and we are complete with the workflow after testing of course. </P>
<P><A href="http://s195.photobucket.com/albums/z302/jakrupin/BlogPictures/?action=view&amp;current=WF11-Final.jpg" mce_href="http://s195.photobucket.com/albums/z302/jakrupin/BlogPictures/?action=view&amp;current=WF11-Final.jpg"><IMG alt="" src="http://i195.photobucket.com/albums/z302/jakrupin/BlogPictures/WF11-Final.jpg" border=0 mce_src="http://i195.photobucket.com/albums/z302/jakrupin/BlogPictures/WF11-Final.jpg"></A> </P>
<P>I hope this thread has been helpful to you and cheers!</P>]]></content:encoded>
    </item>
    <item>
      <title>Social Networking:  A Transformation of Communication</title>
      <link>https://docs.microsoft.com/archive/blogs/joekr/social-networking-a-transformation-of-communication</link>
      <pubDate>Thu, 30 Apr 2009 10:56:45 GMT</pubDate>
      <dc:creator><![CDATA[jakrupin]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/joekr/2009/04/30/social-networking-a-transformation-of-communication/</guid>
      <description><![CDATA[Introduction and Overview
		In 2003, after the technology bubble exploded or rather imploded a...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family:Verdana; font-size:10pt"><strong>Introduction and Overview</strong></span><span style="font-family:Times New Roman; font-size:12pt">
		</span></p><p><span style="font-family:Times New Roman; font-size:12pt">In 2003, after the technology bubble exploded or rather imploded a small website was launched with the simple intent of allowing people to communicate with each other by searching on people's interests, background, skills, and desires.  People from within like communities, high schools and prior working environments could now start their very own virtual web site with absolutely no programming skill.  A simple interface for end users plus a more advanced API mechanism for developers who did code allowed a plethora of opportunities.  You could change your background images, talk to people and put a virtual you or avatar out for the entire world to see.  MySpace quickly became one of the world's largest websites, a household name and still today is one of the three largest social networking sites.      
</span></p><p><span style="font-family:Times New Roman; font-size:12pt">The concept of social networking was then kicked off.   Social networking can be defined as "...the grouping of individuals into specific groups, like small rural communities or a neighborhood subdivision.." (</span><span style="color:black; font-family:Times"><em>What Is Social Networking? - What is Social Networking?</em>)</span><span style="font-family:Times New Roman; font-size:12pt">.  Soon after and using MySpace's massive success, LinkedIn launched a "professional portal" or networking site.  LinkedIn quickly recognized that what worked for personal networking should be able to be leveraged in the professional space.  The LinkedIn portal allowed for a public professional resume, recommendations and research into portfolios of work an individual has accumulated over their professional career.  This resource has been invaluable for recruiters in finding talent.  Facebook is the next evolution of social networking sites and is targeted more toward adults who have little time for such "time killers".  Facebook does not allow much customization, however, there are many "Facebook Apps" that interface with the end user and allow multiple people to play games together, to instant message one another and create photo albums amongst other things.  Orkut is a strong competitor of Facebook, however, it seems that its popularity was targeted mainly to Brazil for some reason perhaps because the owning company (Google), failed to market appropriately within other regions.  As of just a few days before the writing of this paper the New York Times reported "Google <a href="http://googleblog.blogspot.com/2009/04/search-for-me-on-google.html">began</a> a campaign to get people to create these profiles, using its biggest gun: the Google search engine. If you want to control what people see when they search for your name, create a profile and click the box to have it included in Google search results." (Hansel 21 Apr. 2009).
</span></p><p><span style="font-family:Times New Roman; font-size:12pt">Finally, we come to Twitter of course.  Although Twitter by definition only falls loosely into the category of social networking, it is such a phenomenon, that I feel it needs to be addressed.  With most social networking sites, there is a "wall" or status field in which a user updates some sort of text and users who monitor or are "friends" with them can see the collection of updates.  This poses a problem if a user updates too often and it is considered rude or against social networking etiquette to post or change status more than around three times a day.  Twitter is quite different as it is essentially a "stream" of updates that occur by an individual.  As a matter of etiquette, it is not out of line to post a status such as "brushing my teeth and loving my new toothpaste" or "driving to the store to pick up a gallon of milk".  To a non-user of such software, it seems overly intrusive and very difficult to maintain.  This is proved extremely efficient as Twitter can operate off the principle of SMS messaging or in laymen's terms, text messaging.  As the generation of young men and women are growing up, text messaging has come to dominate the tweens and teens and it is hard to imagine a world in where you cannot text message your bff (best friend forever).  Twitter allows you to text your status to it and it will interpret the stream and render for people who "follow" your stream.  As many teens text every day streams of activities multiple times anyway, to x number of friends, this now allows an individual to follow all friends in a very efficient way.  During vacations, this becomes even more interesting as people tend to want to know new and exotic places people are going to and visiting.  
</span></p><p><span style="font-family:Times New Roman; font-size:12pt">This works not only for friend to friend communication but let us now examine updates from political sources, your favorite car company, ESPN or CNN.  Would it not be nice to have automatic updates for your favorite topics if you so choose to follow these companies.  What about deals or coupons.  In the context of this paper we will delve deeper into this topic later.
</span></p><p><span style="font-family:Verdana; font-size:10pt"><strong>Benefits
</strong></span></p><p><span style="font-family:Times New Roman; font-size:12pt">As you can clearly see, the benefits of social networking as a science and technology allow groups of individuals to communicate on a different level with one another.  
</span></p><ul style="margin-left: 72pt"><li><span style="font-family:Times New Roman; font-size:12pt"><em>People Finding</em>:  A large benefit of most social networking sites is the ability to find individuals based on a variety of parameters that are further specialized dependent on the social networking site.  Many of these sites go so far as to recommend individuals to communicate with based on your existing network and personal parameters.  For instance, if you are from Dallas, Texas and you work for Microsoft, the site may suggest another individual also in Dallas who works for Microsoft as the likelihood that you know this person exponentially increases.
</span></li><li><span style="font-family:Times New Roman; font-size:12pt"><em>Continuing Communication</em>: A main feature of most social networking sites allow for the continuing communication by way of feeds, games or applications that facilitate the communication between networked communities.  The benefits of this are that instead of picking up the phone and calling twenty five people, you can update your status once and you can convey what you are doing to your entire network.  One of the most challenging tasks of friendship or even acquaintances is the communication and this venue allows an efficient means of that communication.
</span></li><li><span style="font-family:Times New Roman; font-size:12pt"><em>Matchmaking</em>:  Given the right context one can actually argue match-making sites such as e-Harmony could be considered social networking in a rudimentary way.   The benefits of these sites obviously allow the hope of social networking in a more intimate fashion.  The paradigm here is slightly different, as these sites actually work in reverse from other social networking sites.  In most sites, you probably already know the individual you are searching for in some fashion either personally or by way of some other outlet like word of mouth or media outlet.  In a matchmaking site however, you are being matched based on compatibility or other search criteria.  Once a match is made and the site is no longer needed, virtual communication would not occur through this same site.  This sort of site would not target audience retention but instead market to a specific profile property.  I personally believe that eventually these sites will be deprecated in lieu of other social networking sites that already offer this along with the other networking features.
</span></li><li><span style="font-family:Times New Roman; font-size:12pt"><em>Technological Skills Advancement</em>:  The Washington Times recently posted an article related to the benefits of social networking as it relates to children growing up in the digital age.  Lisa Tripp, co-author of a new book dealing with social networking called "Hanging Out, Messing Around, Geeking Out: Living and Learning New Media" states "Certain technical skills in the coming years are not going to be just about consuming media," she says. "It is also going to be about producing media. It is not just about writing a blog, but also how to leave comments that say something. Learning to communicate like this is contributing to the general circulation of culture" (Goff 28 Jan. 2009).
</span></li><li><div><span style="font-family:Times New Roman; font-size:12pt"><em>Monetization</em>:  A business could not be a business without of course generating revenue and thus a benefit for the social networking sites themselves would have to be the revenue generating potential.  In May of 2008 the USA Today posted an article stating that where a large group of users are, money of course will follow "Murphy and other Facebook executives are well aware of that concern. "Advertisers follow people," says Sheryl Sandberg, a former Google executive who recently was named Facebook's chief operating officer. "We have 70 million active members. Once you have engaged users, the revenue will follow in that order." (Swartz 11 May 2008).
</span></div><p>
 </p></li></ul><p><span style="font-family:Times New Roman; font-size:12pt"><strong>Dangers
</strong></span></p><p><span style="font-family:Times New Roman; font-size:12pt">Although the benefits of social networking are clearly stated and certainly relevant in today's society, one must be aware of the dangers of such technology as there are quite a few.
</span></p><ul style="margin-left: 72pt"><li><span style="font-family:Times New Roman; font-size:12pt"><em>Personal information</em>:  One of the primary dangers of social networking sites is the amount of private information that can be exposed.  Information such as home address and home telephone number if not marked private can be seen by all and this may not be what you want.  It is important therefore, to research what profile information you or your children complete and expose to the world at large.  Identity theft is one of the most rapidly growing crimes around the world and social sites as discussed in this paper along with carelessness further exacerbates the already mounting issue.
</span></li><li><span style="font-family:Times New Roman; font-size:12pt"><em>Public Domain</em>:  To elaborate on the point above, many individuals treat their Facebook site as their private bedrooms when in fact they should treat it as their front yard (Golic and Greenberg 2009).  Essentially what the commentators were trying to say is that be careful what is exposed to the general public because while your most personal friends may enjoy the content, your next potential employer may not.  Employers often times are asking for MySite, Facebook and Linked-In addresses of potential employees and many times are not pleased by what "interesting" content appears.
</span></li><li><span style="font-family:Times New Roman; font-size:12pt"><em>Predators</em>:  When asked about dangers of such sites of MySpace, Facebook or others like these, the media focuses primarily on the potential predators preying on children pretending they are individuals they are not.  As avatars and virtual personalities are a benefit to the social networking community, they are also a very real and present danger.  Movies, daytime television and news stations have all focused on this issue and it is of paramount importance that parents monitor or friend their children on these sites to make sure that communications are appropriate.  In 2006, the CBS evening news stated "<a href="http://www.missingkids.com" target="new">The Center for Missing and Exploited Children</a> reported more than 2,600 incidents last year of adults using the Internet to entice children. With numbers like that, you'd think all parents would be hovering over their kids, wanting to know what they're doing online. But authorities say many parents are clueless about their kids' MySpace profiles." (Kreiser 6 Feb. 2006).   It is also important to teach the children that these types of things do occur and to be on the lookout just as they would in meeting a stranger on the street.
</span></li><li><span style="font-family:Times New Roman; font-size:12pt">Hackers:  It stands to reason that where internet users go, hackers are there waiting with open arms (or malicious intent as it were). It is well known that the largest sites are usually the most attacked by hackers such as Microsoft.com as the exposure and resume potential for hackers lends credibility in the community.  The Washington Post posted an article in 2008 which states simply " Social networking sites such as Facebook, MySpace and LinkedIn are fast emerging as some of the most fertile grounds for malicious software, identity thieves and online mischief-makers" (Krebs 9 Aug. 2008).  As with any unknown or unexpected email attachment, one must be cautious of content on the web.  Do not ever download and install anything you are unsure about.  Research is of upmost importance when dealing with new software as seemingly benign software such as happy face emoticons often times can be the most malicious to your computer.
</span></li></ul><p><span style="font-family:Verdana; font-size:10pt"><strong>    
</strong></span></p><p><span style="font-family:Verdana; font-size:10pt"><strong>Possible Futures
</strong></span></p><p><span style="font-family:Times New Roman; font-size:12pt">So the obvious question is now what is next?  I propose that we will start to see at social networking play a major role in the following categories:
</span></p><ul style="margin-left: 72pt"><li><span style="font-family:Times New Roman; font-size:12pt"><em>Targeted Marketing campaigns</em>:  As a benefit of social networking, this paper allowed that where internet users go, so shall the online advertising.  Imagine now that based on your profile, the advertisers can now target specifically to your needs concise and specific merchandise to your very demographic.  Not only are you an internet user, you are a male between ages x and y, live in this region, work in this area and more.  The advertising potential is virtually limitless.
</span></li><li><span style="font-family:Times New Roman; font-size:12pt"><em>Business Use</em>:  Already business are starting to see the benefits of social networking within the walls of the corporation.  Consider that you would like to speak to the foremost expert in xyz system at your company.  You could simply do a skills search in the people finder and communicate with this person.  Let us take this one step farther and begin to "crawl" through email and other digital communication like instant messaging.  Let us imagine that we could identify people intrinsically as experts in  a particular system based on proximity of communications.  Essentially if you could say that you correspond with person "A" who is an expert in technology "B" and because you communicate on a regular basis on that topic, by default, you must have some level of knowledge in the subject matter.  Now jumping off the cliff in assumptions, what if this now qualifies you as an intermediary so essentially even if you do not know the answer to a question in the space, you know someone who does.  This kind of knowledge and skills networking will be the wave of the future in businesses in my opinion.
</span></li><li><span style="font-family:Times New Roman; font-size:12pt"><em>Consumer Product Integration</em>:  People are becoming enamoured with "gadgets".  Besides the television, their cell phones, their "Touch" and cool "gizmos" in their cars, what if we can dynamically Tweet locations based on vehicle or cell GPS.  The DVR could Tweet status on television shows and perhaps control feeds of Tweets from friends or status updates on Facebook streaming directly to your television set without the need for your cell phone.
</span></li><li><span style="font-family:Times New Roman; font-size:12pt"><em>Political Campaigns</em>:  Already on the evening news you can see individuals blogs and Twitter accounts to be able to follow them.  You can follow President Obama and the day to day tasks.  I see that this will begin to be a political sounding board in the future added with the other medium such as television, radio and old fashion signs on the side of the road.
</span></li></ul><p>
 </p><p><span style="font-family:Verdana; font-size:10pt"><strong>Conclusions</strong></span><span style="font-family:Times New Roman; font-size:12pt">
		</span></p><p><span style="font-family:Times New Roman; font-size:12pt">While social networking is blazing a new trail in technology and revolutionizing modern day communications, individuals must be aware of the dangers and take action to protect both themselves and their children from such dangers.  As with most new things, arming oneself with knowledge of what is available and what can be done is the most important step in avoiding potential pitfalls.  Communication ironically is the cornerstone to a pleasant and enjoyable social networking experience.
</span></p><p>
 </p><p>
 </p><p>
 </p><p>
 </p><p style="text-align: center"><span style="font-family:Times New Roman; font-size:12pt">References
</span></p><p style="margin-left: 36pt"><span style="font-size:12pt">Goff, Karen G. "Social networking benefits validated." <span style="text-decoration:underline">Washington Times</span> 28 Jan. 2009. 23 Apr. 2009 &lt;http://www.washingtontimes.com/news/2009/jan/28/social-networking-benefits-validated/&gt;. 
</span></p><p style="margin-left: 36pt"><span style="font-size:12pt">Golic, Mike, and Mike Greenberg. <span style="text-decoration:underline">Mike &amp; Mike in the Morning</span>. ESPN Radio. 2009. 
</span></p><p style="margin-left: 36pt"><span style="font-size:12pt">Hansel, Saul. "Google's Black-Box Social Network." <span style="text-decoration:underline">New York Times</span> 21 Apr. 2009. 23 Apr. 2009 &lt;http://bits.blogs.nytimes.com/2009/04/21/googles-black-box-social-network/&gt;. 
</span></p><p style="margin-left: 36pt"><span style="font-size:12pt">Krebs, Brian. "Hackers' Latest Target: Social Networking Sites." <span style="text-decoration:underline">Washington Post</span> 9 Aug. 2008. 23 Apr. 2009 &lt;http://www.washingtonpost.com/wp-dyn/content/article/2008/08/08/AR2008080803671.html&gt;. 
</span></p><p style="margin-left: 36pt"><span style="font-size:12pt">Kreiser, John. "CBS Evening News with Katie Couric." <span style="text-decoration:underline">MySpace: Your Kids' Danger?</span> CBS. New York, New York. 6 Feb. 2006. <span style="text-decoration:underline">CBS Evening News with Katie Couric</span>. 6 Feb. 2006. CBS. 27 Apr. 2009 &lt;http://www.cbsnews.com/stories/2006/02/06/eveningnews/main1286130.shtml&gt;. 
</span></p><p style="margin-left: 36pt"><span style="font-size:12pt">Swartz, Jon. "Social-networking sites work to turn users into profits." <span style="text-decoration:underline">USA Today</span> 11 May 2008. 23 Apr. 2009 &lt;http://www.usatoday.com/tech/techinvestor/industry/2008-05-11-social-networking_N.htm&gt;. 
</span></p><p><span style="font-size:12pt"><span style="text-decoration:underline">What Is Social Networking? - What is Social Networking?</span> 23 Apr. 2009 &lt;http://www.whatissocialnetworking.com/&gt;.</span></p>]]></content:encoded>
    </item>
    <item>
      <title>A look at MOSS 2007 Performance Part I – Performance Counters</title>
      <link>https://docs.microsoft.com/archive/blogs/joekr/a-look-at-moss-2007-performance-part-i-performance-counters</link>
      <pubDate>Sat, 04 Oct 2008 18:19:03 GMT</pubDate>
      <dc:creator><![CDATA[jakrupin]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/joekr/2008/10/04/a-look-at-moss-2007-performance-part-i-performance-counters/</guid>
      <description><![CDATA[Introduction 
This series is intended to be a multi-part look at MOSS performance. There are many...]]></description>
      <content:encoded><![CDATA[<p><span style="color:#17365d; font-size:15pt"><strong>Introduction 
</strong></span></p><p>This series is intended to be a multi-part look at MOSS performance. There are many articles out there related to the performance analysis of MOSS but I wanted to attempt to compile some of that information and add some personal insight to the pool. 
</p><p>The scenario this is to address is to attempt the first steps in analyzing the question of "Why is my MOSS performing in a less ideal way that I would like?". We are also going to take a look at some ways in which we can proactively monitor the system with no additional tools to purchase. 
</p><p>Part one of this series will focus on Performance Counters. 
</p><p><span style="color:#17365d; font-size:15pt"><strong>Performance Counters 
</strong></span></p><p><strong>Assumption:</strong> Windows Server 2003 or higher is being utilized as the host operating system 
</p><p><span style="color:#17365d; font-size:13pt"><strong>General Counters 
</strong></span></p><p>The following table will outline the performance counters for the base operating system that should be monitored along with thresholds and what the tolerance factor may mean if we are outside of those thresholds. 
</p><p><span style="color:#17365d"><strong>CPU 
</strong></span></p><div><table style="border-collapse:collapse" border="0"><colgroup><col style="width:188px"/><col style="width:94px"/><col style="width:150px"/><col style="width:206px"/></colgroup><tbody valign="top"><tr style="height: 20px"><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid #9bbb59 1.0pt; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black"><strong>Counter</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid #9bbb59 1.0pt; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black"><strong>Threshold</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid #9bbb59 1.0pt; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black"><strong>General Recommendation</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid #9bbb59 1.0pt; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black"><strong>Description</strong></span></p></td></tr><tr style="height: 20px; background: #e6eed5"><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-right:  none"><p><span style="color:black; font-family:Verdana; font-size:8pt"><strong>Processor\% Processor Time\_Total</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-right:  none"><p><span style="color:black">&gt;80%-85% over 3 intervals</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-right:  none"><p><span style="color:black">Add CPUs if utilization is consistently High</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-right:  none"><p><span style="color:#76923c; font-size:8pt">The total percentage of processor usage for a server.</span></p></td></tr><tr style="height: 20px"><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px"><p><span style="color:black; font-family:Verdana; font-size:8pt"><strong>System\Processor Queue Length\(N/A)</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px"><p><span style="color:black">&gt;#CPU's + 1</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px"><p><span style="color:black">Add Faster CPU's</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px"><p><span style="color:#76923c; font-size:8pt">Exceeding the threshold indicates that the processors are not fast enough to process requests as they occur and that you are running out of processor power.</span></p></td></tr><tr style="height: 20px; background: #e6eed5"><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black; font-family:Verdana; font-size:8pt"><strong>Processor\Interrupts\Sec</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black">&gt;1000</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black">May indicate Hardware Issue</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p>  </p></td></tr></tbody></table></div><p> 
 </p><p><span style="color:#17365d"><strong>Memory 
</strong></span></p><div><table style="border-collapse:collapse" border="0"><colgroup><col style="width:189px"/><col style="width:83px"/><col style="width:168px"/><col style="width:198px"/></colgroup><tbody valign="top"><tr style="height: 20px"><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid #9bbb59 1.0pt; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black"><strong>Counter</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid #9bbb59 1.0pt; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black"><strong>Threshold</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid #9bbb59 1.0pt; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black"><strong>General Recommendation</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid #9bbb59 1.0pt; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black"><strong>Description</strong></span></p></td></tr><tr style="height: 20px; background: #e6eed5"><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-right:  none"><p><span style="color:black; font-family:Verdana; font-size:8pt"><strong>Memory\Pages/sec\(N\A)</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-right:  none"><p><span style="color:black">&gt;200</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-right:  none"><p><span style="color:black">Increase RAM</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-right:  none"><p>  </p></td></tr><tr style="height: 20px"><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px"><p><span style="color:black; font-family:Verdana; font-size:8pt"><strong>Memory\Pages Faults/sec\(N\A)</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px"><p><span style="color:black">&gt; (Drives x 4096)</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px"><p><span style="color:black">Increase RAM</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px"><p><span style="color:#76923c; font-size:8pt">A high rate of page faults indicates a lack of physical memory.</span></p></td></tr><tr style="height: 20px; background: #e6eed5"><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-right:  none"><p><span style="color:black; font-family:Verdana; font-size:8pt"><strong>Memory\Available Mbytes\(N\A)</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-right:  none"><p><span style="color:black">&lt;10% Available</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-right:  none"><p><span style="color:black">Increase RAM</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-right:  none"><p><span style="color:#76923c; font-size:8pt">The amount of physical memory in MBs, immediately available for allocation to a process or for system use on the server.</span></p></td></tr><tr style="height: 20px"><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px"><p><span style="color:black; font-family:Verdana; font-size:8pt"><strong>Memory\Pool Nonpaged Bytes\(N\A)</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px"><p><span style="color:black">&lt;10%</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px"><p><span style="color:black">Increase RAM</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px"><p>  </p></td></tr><tr style="height: 20px; background: #e6eed5"><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black; font-family:Verdana; font-size:8pt"><strong>PagingFile\%Usage</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black">&gt;70%</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black">Faster Disks/Better Controller/Add Disks/Increase RAM</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:#76923c; font-size:8pt">Review this value in conjunction with memory—available megabytes and page faults per second—to understand paging activity on the server.</span></p></td></tr></tbody></table></div><p> 
 </p><p><span style="color:#17365d"><strong>Disk 
</strong></span></p><div><table style="border-collapse:collapse" border="0"><colgroup><col style="width:192px"/><col style="width:75px"/><col style="width:157px"/><col style="width:215px"/></colgroup><tbody valign="top"><tr style="height: 20px"><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid #9bbb59 1.0pt; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black"><strong>Counter</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid #9bbb59 1.0pt; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black"><strong>Threshold</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid #9bbb59 1.0pt; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black"><strong>General Recommendation</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid #9bbb59 1.0pt; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black"><strong>Description</strong></span></p></td></tr><tr style="height: 20px; background: #e6eed5"><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-right:  none"><p><span style="color:black; font-family:Verdana; font-size:8pt"><strong>PhysicalDisk\% Disk Time\DriveLetter</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-right:  none"><p><span style="color:black">&gt;80%</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-right:  none"><p><span style="color:black">Controller or RAM</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-right:  none"><p>  </p></td></tr><tr style="height: 20px"><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px"><p><span style="color:black; font-family:Verdana; font-size:8pt"><strong>PhysicalDisk\Current Disk Queue Length\DriveLetter</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px"><p><span style="color:black">&gt;2</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px"><p><span style="color:black">Faster Disks/Better Controller/Add Disks</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px"><p>  </p></td></tr><tr style="height: 20px; background: #e6eed5"><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black; font-family:Verdana; font-size:8pt"><strong>LogicalDisk\%Idle Time\DriveLetter</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black">&gt;20%</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black">Faster Disks/Better Controller/Add Disks</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:#76923c; font-size:8pt">Reports the percentage of time during the sample interval that the disk was idle. If this value is very low, the logical disk is very busy.</span></p></td></tr></tbody></table></div><p> 
 </p><p><span style="color:#17365d"><strong>Network 
</strong></span></p><div><table style="border-collapse:collapse" border="0"><colgroup><col style="width:252px"/><col style="width:100px"/><col style="width:140px"/><col style="width:146px"/></colgroup><tbody valign="top"><tr style="height: 20px"><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid #9bbb59 1.0pt; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black"><strong>Counter</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid #9bbb59 1.0pt; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black"><strong>Threshold</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid #9bbb59 1.0pt; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black"><strong>General Recommendation</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid #9bbb59 1.0pt; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black"><strong>Description</strong></span></p></td></tr><tr style="height: 20px; background: #e6eed5"><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black"><strong>Network interface\BytesTotalPer2ndInterface</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black">&gt;50% Avail Network Speed </span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black">Add Faster NICs/Check Switch</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:#76923c; font-size:8pt">The rate at which bytes are sent and received over each network adapter.</span></p></td></tr></tbody></table></div><p> 
 </p><p><span style="color:#17365d"><strong>ASP.NET 
</strong></span></p><div><table style="border-collapse:collapse" border="0"><colgroup><col style="width:160px"/><col style="width:75px"/><col style="width:242px"/><col style="width:161px"/></colgroup><tbody valign="top"><tr style="height: 20px"><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid #9bbb59 1.0pt; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black"><strong>Counter</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid #9bbb59 1.0pt; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black"><strong>Threshold</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid #9bbb59 1.0pt; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black"><strong>General Recommendation</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid #9bbb59 1.0pt; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black"><strong>Description</strong></span></p></td></tr><tr style="height: 120px; background: #e6eed5"><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black"><strong>ASP.NET\Requests per second_total</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p>  </p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black">This is a great monitor for capacity as we will look at in a different part of this series</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:#76923c; font-size:8pt">The rate at which bytes are sent and received over each network adapter.</span></p></td></tr></tbody></table></div><p> 
 </p><p><span style="color:#17365d"><strong>MOSS WFE 
</strong></span></p><div><table style="border-collapse:collapse" border="0"><colgroup><col style="width:70px"/><col style="width:190px"/><col style="width:213px"/><col style="width:165px"/></colgroup><tbody valign="top"><tr style="background: white"><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid #9bbb59 1.0pt; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black"><strong>Object</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid #9bbb59 1.0pt; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black"><strong>Counter</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid #9bbb59 1.0pt; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black"><strong>Threshold</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid #9bbb59 1.0pt; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black"><strong>Description</strong></span></p></td></tr><tr style="background: #e6eed5"><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:#632423"><strong>Web service*</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:#632423">Get requests per second_total or individual portal or per Windows SharePoint Portal Services site</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:#632423">Through ongoing monitoring, trends begin to emerge that equate get requests per second with CPU consumption.</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:#76923c; font-size:8pt">Generally speaking, this is the rate at which clients are requesting information from the front-end Web servers.</span></p></td></tr></tbody></table></div><p> 
 </p><p><span style="color:#17365d"><strong>MOSS Query Server 
</strong></span></p><div><table style="border-collapse:collapse" border="0"><colgroup><col style="width:71px"/><col style="width:173px"/><col style="width:192px"/><col style="width:201px"/></colgroup><tbody valign="top"><tr><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid #9bbb59 1.0pt; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black"><strong>Object</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid #9bbb59 1.0pt; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black"><strong>Counter</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid #9bbb59 1.0pt; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black"><strong>Threshold</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid #9bbb59 1.0pt; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black"><strong>Description</strong></span></p></td></tr><tr style="background: #e6eed5"><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-right:  none"><p><span style="color:#632423"><strong>Search</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-right:  none"><p><span style="color:#632423">Query rate</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-right:  none"><p><span style="color:#632423">200 per second</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-right:  none"><p><span style="color:#76923c; font-size:8pt">The number of queries posted to the server per second. Keep in mind this counter should be watched on the dedicated search servers.</span></p></td></tr><tr><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px"><p><span style="color:#632423"><strong>Search</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px"><p><span style="color:#632423">Succeeded queries</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px"><p><span style="color:#632423">This counter should be used mostly for troubleshooting search problems.</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px"><p><span style="color:#76923c; font-size:8pt">The number of queries that produce successful searches; monitor this counter along with the failed queries counter when troubleshooting search problems.</span></p></td></tr><tr style="background: #e6eed5"><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-right:  none"><p><span style="color:#632423"><strong>Search catalogs</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-right:  none"><p><span style="color:#632423">Number of documents</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-right:  none"><p><span style="color:#632423">Microsoft has tested up to 5,000,000 documents.</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-right:  none"><p><span style="color:#76923c; font-size:8pt">This counter identifies the total number of documents in the catalog.</span></p></td></tr><tr><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px"><p><span style="color:#632423"><strong>Search catalogs</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px"><p><span style="color:#632423">Queries rate_(index names or all instances)</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px"><p><span style="color:#632423">Indicates which indexes are most searched by users.</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px"><p><span style="color:#76923c; font-size:8pt">The number of queries posted to indexes per second; in conjunction with other performance data, this counter can help determine if your index configuration can be optimized.</span></p></td></tr><tr style="background: #e6eed5"><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:#632423"><strong>Web service*</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:#632423">Get requests per second_total or individual portal or Windows SharePoint Portal Services site.</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:#632423">With ongoing monitoring, trends emerge that equate requests per second with CPU consumption.</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:#76923c; font-size:8pt">Generally speaking, this is the rate that clients are requesting information from the front-end Web servers.</span></p></td></tr></tbody></table></div><p> 
 </p><p><span style="color:#17365d"><strong>MOSS Index Server 
</strong></span></p><div><table style="border-collapse:collapse" border="0"><colgroup><col style="width:124px"/><col style="width:125px"/><col style="width:229px"/><col style="width:160px"/></colgroup><tbody valign="top"><tr><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid #9bbb59 1.0pt; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black"><strong>Object</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid #9bbb59 1.0pt; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black"><strong>Counter</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid #9bbb59 1.0pt; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black"><strong>Threshold</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid #9bbb59 1.0pt; border-left:  none; border-bottom:  solid #9bbb59 1.0pt; border-right:  none"><p><span style="color:black"><strong>Description</strong></span></p></td></tr><tr style="background: #e6eed5"><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-right:  none"><p><span style="color:#632423"><strong>Search indexer catalogs</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-right:  none"><p><span style="color:#632423">Number of documents</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-right:  none"><p><span style="color:#632423">Microsoft has tested up to 5,000,000 documents.</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-left:  none; border-right:  none"><p><span style="color:#76923c; font-size:8pt">The number of documents in the catalog</span></p></td></tr><tr><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-bottom:  solid #9bbb59 1.0pt"><p><span style="color:#632423"><strong>Search indexer catalogs</strong></span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-bottom:  solid #9bbb59 1.0pt"><p><span style="color:#632423">Index size MB</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-bottom:  solid #9bbb59 1.0pt"><p><span style="color:#632423">256,000 (256 GB)</span></p></td><td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-bottom:  solid #9bbb59 1.0pt"><p><span style="color:#76923c; font-size:8pt">The current size of index data in megabytes</span></p></td></tr></tbody></table></div><p> 
 </p><p>I want to thank a colleague of mine, Kirk for providing much of this information that was MOSS specific 
</p><p><span style="color:#17365d; font-size:15pt"><strong>References: 
</strong></span></p><p>English, B. (2004). <em>Microsoft SharePoint Products and Technologies Resource Kit</em>. New York: Microsoft P. </p>]]></content:encoded>
    </item>
    <item>
      <title>A look at MOSS 2007 Performance Part II – IIS Log Analysis</title>
      <link>https://docs.microsoft.com/archive/blogs/joekr/a-look-at-moss-2007-performance-part-ii-iis-log-analysis</link>
      <pubDate>Sat, 04 Oct 2008 15:19:00 GMT</pubDate>
      <dc:creator><![CDATA[jakrupin]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/joekr/2008/10/04/a-look-at-moss-2007-performance-part-ii-iis-log-analysis/</guid>
      <description><![CDATA[Introduction 
In part one of this performance series we focused on performance counters and...]]></description>
      <content:encoded><![CDATA[<P><SPAN style="COLOR: #17365d; FONT-SIZE: 15pt"><STRONG>Introduction </STRONG></SPAN></P>
<P>In part one of this performance series we focused on performance counters and thresholds around those counters in an effort to monitor the performance of your MOSS platform. In this section, I plan to walk through some helpful items in analyzing your IIS Logs. </P>
<P>This is by no means an exhaustive review of parsing the logs; however, I do want to go through some review on IIS log parsing as well as some samples. For an in depth review, please see the references section of this article. </P>
<P>The first thing that any good software company will do when a diagnostic ticket comes in is ask for the company's ULS and IIS logs. What do they do with those logs behind the proverbial curtain? The first thing that will need to happen, is to parse through the logs to seek the answers that you want. </P>
<P>What are we looking for? How do we do this parsing? </P>
<P><SPAN style="COLOR: #17365d; FONT-SIZE: 15pt"><STRONG>Log Parser </STRONG></SPAN></P>
<P>Log Parser 2.2 is a free download from <A href="http://www.microsoft.com/downloads/details.aspx?FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07&amp;displaylang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07&amp;displaylang=en">http://www.microsoft.com/downloads/details.aspx?FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07&amp;displaylang=en</A> and is a command-line SQL-like tool that can be used to parse pretty much any file. It is very powerful and in my humble opinion, is extremely underutilized. </P>
<P>The data that you can extract is truly amazing and only your imagination will limit you here. </P>
<P>The Log Parser syntax is very similar to Transact SQL syntax. To call the query, you will add the following switches: </P>
<DIV>
<TABLE style="BORDER-COLLAPSE: collapse" border=0>
<COLGROUP>
<COL style="WIDTH: 35px">
<COL style="WIDTH: 603px"></COLGROUP>
<TBODY vAlign=top>
<TR>
<TD style="BORDER-BOTTOM: #8064a2 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 1px; PADDING-LEFT: 7px; PADDING-RIGHT: 7px; BORDER-TOP: #8064a2 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 1px" vAlign=center>
<P><SPAN style="COLOR: #5f497a"><STRONG>-i</STRONG></SPAN></P></TD>
<TD style="BORDER-BOTTOM: #8064a2 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 1px; PADDING-LEFT: 7px; PADDING-RIGHT: 7px; BORDER-TOP: #8064a2 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 1px" vAlign=center>
<P><SPAN style="COLOR: #5f497a">This is the input file type which can have values to read Event Logs, Performance Counters, IIS Logs and much more. The format for IIS Logs is "IISW3C"</SPAN></P></TD></TR>
<TR style="BACKGROUND: #dfd8e8">
<TD style="BORDER-LEFT: medium none; PADDING-BOTTOM: 1px; PADDING-LEFT: 7px; PADDING-RIGHT: 7px; BORDER-RIGHT: medium none; PADDING-TOP: 1px" vAlign=center>
<P><SPAN style="COLOR: #5f497a"><STRONG>-o</STRONG></SPAN></P></TD>
<TD style="BORDER-LEFT: medium none; PADDING-BOTTOM: 1px; PADDING-LEFT: 7px; PADDING-RIGHT: 7px; BORDER-RIGHT: medium none; PADDING-TOP: 1px" vAlign=center>
<P><SPAN style="COLOR: #5f497a">This is the output file type than can have values like NAT (Native or in console) and Chart which has quite a few more switches</SPAN></P></TD></TR>
<TR>
<TD style="BORDER-BOTTOM: #8064a2 1pt solid; PADDING-BOTTOM: 1px; PADDING-LEFT: 7px; PADDING-RIGHT: 7px; PADDING-TOP: 1px" vAlign=center>
<P><SPAN style="COLOR: #5f497a"><STRONG>-rtp</STRONG></SPAN></P></TD>
<TD style="BORDER-BOTTOM: #8064a2 1pt solid; PADDING-BOTTOM: 1px; PADDING-LEFT: 7px; PADDING-RIGHT: 7px; PADDING-TOP: 1px" vAlign=center>
<P><SPAN style="COLOR: #5f497a">This switch will outline how many records will be output. For all, you simply will use a value of -1</SPAN></P></TD></TR></TBODY></TABLE></DIV>
<P>&nbsp; &nbsp;</P>
<P>These are just some of the switches you can include and for a complete reference, please read the log parser book referenced in the reference section. </P>
<P>In your FROM clause, you can separate multiple sources so if you have multiple folders where IIS logs are stored you can easily do this with little effort. </P>
<P><SPAN style="COLOR: #17365d; FONT-SIZE: 15pt"><STRONG>Examples </STRONG></SPAN></P>
<P><SPAN style="COLOR: #17365d; FONT-SIZE: 13pt"><STRONG>Hourly Request Count </STRONG></SPAN></P>
<P>Say we want to get a baseline of requests broken down by hour to IIS, we can run a query similar to: </P>
<DIV>
<TABLE style="BORDER-COLLAPSE: collapse; BACKGROUND: #d9d9d9" border=0>
<COLGROUP>
<COL style="WIDTH: 638px"></COLGROUP>
<TBODY vAlign=top>
<TR>
<TD style="PADDING-BOTTOM: 1px; PADDING-LEFT: 7px; PADDING-RIGHT: 7px; PADDING-TOP: 1px" vAlign=center>
<P><SPAN style="FONT-FAMILY: Courier New; FONT-SIZE: 8pt">logparser -i:IISW3C -o:NAT -rtp:-1 "SELECT QUANTIZE(TO_TIMESTAMP(date, time), 3600) AS Date_Hour, COUNT(*) INTO RequestsPerHourReport.txt FROM C:\IIS\W3SVC49737048\*.* WHERE (EXTRACT_EXTENSION(TO_LOWERCASE(cs-uri-stem)) IN ('aspx'; 'html'; 'asp')) GROUP BY Date_Hour"</SPAN></P></TD></TR></TBODY></TABLE></DIV>
<P><STRONG>&nbsp; &nbsp;Note:&nbsp; Updated 11/3/09, per Mike Wise, we should modify this script to strip out 401 http responses to eliminate the anonymous requests in NTLM.</STRONG></P>
<P>This shows some of the things that you can do with the language. You can change this up by converting this to a chart like: </P>
<DIV>
<TABLE style="BORDER-COLLAPSE: collapse; BACKGROUND: #d9d9d9" border=0>
<COLGROUP>
<COL style="WIDTH: 638px"></COLGROUP>
<TBODY vAlign=top>
<TR>
<TD style="PADDING-BOTTOM: 1px; PADDING-LEFT: 7px; PADDING-RIGHT: 7px; PADDING-TOP: 1px" vAlign=center>
<P><SPAN style="FONT-FAMILY: Courier New; FONT-SIZE: 8pt">logparser -i:IISW3C -o:chart -chartTitle:"HTTP Requests Per Hour" -view -chartType:ColumnStacked3d "SELECT QUANTIZE(TO_TIMESTAMP(date, time), 3600) AS Hour, COUNT(*) INTO RequestsPerHourReport.gif FROM C:\IIS\W3SVC49737048\*.* WHERE (EXTRACT_EXTENSION(TO_LOWERCASE(cs-uri-stem)) IN ('aspx'; 'html'; 'asp')) GROUP BY Hour"</SPAN></P></TD></TR></TBODY></TABLE></DIV>
<P>&nbsp; &nbsp;</P>
<P>If you are not following section one of this series, you can get somewhat of a request per second (RPS) count dividing the values by 3600 again. </P>
<P><SPAN style="COLOR: #17365d; FONT-SIZE: 13pt"><STRONG>Status Code Breakdown </STRONG></SPAN></P>
<P>To breakdown a count and then do analysis on status codes for IIS you can run a query similar to the following: </P>
<DIV>
<TABLE style="BORDER-COLLAPSE: collapse; BACKGROUND: #d9d9d9" border=0>
<COLGROUP>
<COL style="WIDTH: 638px"></COLGROUP>
<TBODY vAlign=top>
<TR>
<TD style="PADDING-BOTTOM: 1px; PADDING-LEFT: 7px; PADDING-RIGHT: 7px; PADDING-TOP: 1px" vAlign=center>
<P><SPAN style="FONT-FAMILY: Courier New; FONT-SIZE: 8pt">logparser.exe -i:IISW3C -o:NAT -rtp:-1 "SELECT STRCAT(STRCAT(TO_STRING(sc-status),'.'),TO_STRING(sc-substatus)), COUNT(*) AS StatusCount INTO StatusCodeRatio.txt FROM C:\IIS\W3SVC49737048\*.* GROUP BY STRCAT(STRCAT(TO_STRING(sc-status),'.'),TO_STRING(sc-substatus))"</SPAN></P></TD></TR></TBODY></TABLE></DIV>
<P>&nbsp; &nbsp;</P>
<P><SPAN style="COLOR: #17365d; FONT-SIZE: 13pt"><STRONG>Bandwidth Analysis </STRONG></SPAN></P>
<P>There are many times that you may want to measure bandwidth on your IIS servers for load purposes. You can do this by running a query like: </P>
<DIV>
<TABLE style="BORDER-COLLAPSE: collapse; BACKGROUND: #d9d9d9" border=0>
<COLGROUP>
<COL style="WIDTH: 638px"></COLGROUP>
<TBODY vAlign=top>
<TR>
<TD style="PADDING-BOTTOM: 1px; PADDING-LEFT: 7px; PADDING-RIGHT: 7px; PADDING-TOP: 1px" vAlign=center>
<P><SPAN style="FONT-FAMILY: Courier New; FONT-SIZE: 8pt">logparser -i:IISW3C -o:NAT -rtp:-1 "SELECT QUANTIZE(TO_TIMESTAMP(date, time), 3600) AS Hour, DIV(Sum(cs-bytes),1024) AS Incoming(K), DIV(Sum(sc-bytes),1024) AS Outgoing(K) INTO HourlyBandwidthReport.txt FROM C:\IIS\W3SVC49737048_0918_0919\*.* GROUP BY Hour"</SPAN></P></TD></TR></TBODY></TABLE></DIV>
<P>&nbsp; &nbsp;</P>
<P>The possibilities continue on, but these are some of the more common that I personally use in initial diagnostics. </P>
<P><SPAN style="COLOR: #17365d; FONT-SIZE: 15pt"><STRONG>Extendibility </STRONG></SPAN></P>
<P>We can take the "SELECT" query out and create a "*.sql" file and call it that way. An example would be to create a file called "c:\myTest.sql" that contains the following text: </P>
<DIV>
<TABLE style="BORDER-COLLAPSE: collapse; BACKGROUND: #d9d9d9" border=0>
<COLGROUP>
<COL style="WIDTH: 155px"></COLGROUP>
<TBODY vAlign=top>
<TR>
<TD style="PADDING-BOTTOM: 1px; PADDING-LEFT: 7px; PADDING-RIGHT: 7px; PADDING-TOP: 1px" vAlign=center>
<P><SPAN style="FONT-FAMILY: Courier New; FONT-SIZE: 8pt">SELECT * FROM %source%</SPAN></P></TD></TR></TBODY></TABLE></DIV>
<P>&nbsp; &nbsp;</P>
<P>We then can call myTest.sql like: </P>
<DIV>
<TABLE style="BORDER-COLLAPSE: collapse" border=0>
<COLGROUP>
<COL style="WIDTH: 638px"></COLGROUP>
<TBODY vAlign=top>
<TR>
<TD style="PADDING-BOTTOM: 1px; PADDING-LEFT: 7px; PADDING-RIGHT: 7px; PADDING-TOP: 1px" vAlign=center>
<P style="BACKGROUND: #d9d9d9"><SPAN style="FONT-FAMILY: Courier New; FONT-SIZE: 8pt">Logparser.exe <SPAN style="COLOR: black">file:myTest.sql?source="c:\locationofIISLogs\*.* </SPAN>–i:IISW3C –o:NAT –rtp:-1 &gt; outputFile.txt</SPAN></P></TD></TR></TBODY></TABLE></DIV>
<P>&nbsp; &nbsp;</P>
<P>As you can see, with the addition of parameterization and files, now we can extend this out much further. </P>
<P><SPAN style="COLOR: #17365d; FONT-SIZE: 15pt"><STRONG>References </STRONG></SPAN></P>
<P>Burnett, M., &amp; Giuseppini, G. (2005). <EM>Microsoft Log Parser Toolkit</EM>. Syngress. </P>]]></content:encoded>
    </item>
    <item>
      <title>Enabling HTTP Compression in IIS</title>
      <link>https://docs.microsoft.com/archive/blogs/joekr/enabling-http-compression-in-iis</link>
      <pubDate>Thu, 04 Sep 2008 15:54:38 GMT</pubDate>
      <dc:creator><![CDATA[jakrupin]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/joekr/2008/09/04/enabling-http-compression-in-iis/</guid>
      <description><![CDATA[The following submission was done by Kuba Njie, another services employee that I have had the...]]></description>
      <content:encoded><![CDATA[<p>
 </p><p><span style="font-family:Arial; font-size:10pt">The following submission was done by Kuba Njie, another services employee that I have had the extreme pleasure of working with.  This was a great article and as such….
</span></p><p>
 </p><p><span style="font-family:Arial; font-size:10pt">You can enable HTTP compression server-wide or on a specific directory. HTTP compression improves bandwidth utilization and speeds up Web site performance. In addition, you can compress static or dynamic responses.
</span></p><p>
 </p><p><span style="font-family:Arial; font-size:10pt"><strong>Note</strong><br/>You must be a member of the Administrators group on the local computer to perform the following procedure or procedures. As a security best practice, log on to your server by using an account that is not in the Administrators group, and then use the <strong>runas</strong> command to run IIS Manager as an administrator. At a command prompt, type 
</span></p><p><span style="font-family:Arial; font-size:10pt"><strong>runas /user:<em>Administrative_AccountName</em>"mmc %systemroot%/system32/inetsrv/iis.msc".
</strong></span></p><p><a name="ERB"/>
 </p><p><span style="font-size:14pt"><strong>Procedures
</strong></span></p><p>To enable global HTTP compression by using IIS Manager
</p><p>
 </p><div><table style="border-collapse:collapse" border="0"><colgroup><col style="width:40px"/><col style="width:601px"/></colgroup><tbody valign="top"><tr><td style="padding-left: 17px; padding-right: 12px"><p style="text-align: right">1.</p></td><td><p>In <a href="http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/b0c14479-83e3-435d-a935-819fe396e7d2.mspx">IIS Manager</a>, double-click the local computer, right-click the <strong>Web Sites</strong> folder, and then click <strong>Properties</strong>.</p></td></tr><tr><td style="padding-left: 17px; padding-right: 12px"><p style="text-align: right">2.</p></td><td><p>Click the <strong>Service</strong> tab, and in the <strong>HTTP compression</strong> section, select the <strong>Compress application files</strong> check box to enable compression for dynamic files.</p></td></tr><tr><td style="padding-left: 17px; padding-right: 12px"><p style="text-align: right">3.</p></td><td><p>Select the <strong>Compress static files</strong> check box to enable compression for static files. </p></td></tr><tr><td style="padding-left: 17px; padding-right: 12px"><p style="text-align: right">4.</p></td><td><p>In the <strong>Temporary directory</strong> box, use the default location, or type the path to a local directory or click <strong>Browse</strong> to locate a directory. Once a static file is compressed, it is cached in this temporary directory until it expires, or the content changes. The directory must be on the local drive of an NTFS–formatted partition. The directory cannot be compressed or shared, and the access control lists (ACLs) for the directory must include Full Control access to the identity of the application pool or to the IIS_WPG group.</p></td></tr><tr><td style="padding-left: 17px; padding-right: 12px"><p style="text-align: right">5.</p></td><td><p>Under <strong>Maximum temporary directory size</strong>, click a folder size option. If you specify a maximum size under <strong>Limited to (in megabytes)</strong> (the default setting is 95 MB), then when the limit is reached, IIS automatically cleans up the temporary directory by applying the "least recently used" rule. </p></td></tr><tr><td style="padding-left: 17px; padding-right: 12px"><p style="text-align: right">6.</p></td><td><p>Click <strong>Apply</strong>, and then click <strong>OK</strong>.</p></td></tr></tbody></table></div><p>
 </p><p><strong>Note:
</strong></p><p><span style="font-family:Arial; font-size:10pt">You must be a member of the Administrators group on the local computer to run scripts and executables. As a security best practice, log on to your computer by using an account that is not in the Administrators group, and then use the <strong>runas</strong> command to run your script or executable as an administrator. At a command prompt, type 
</span></p><p><span style="font-family:Arial; font-size:10pt"><strong>runas /profile /user:</strong><em>MyComputer</em><strong>/</strong><em>Administrator</em><strong>cmd</strong>
		</span></p><p><span style="font-family:Arial; font-size:10pt">to open a command window with administrator rights and then type <strong>cscript.exe</strong><em>ScriptName</em> (include the script's full path and any parameters).
</span></p><p>
 </p><p>
 </p><p><span style="font-size:14pt"><strong>To enable global HTTP compression by using Adsutil.vbs
</strong></span></p><div><table style="border-collapse:collapse" border="0"><colgroup><col style="width:40px"/><col style="width:594px"/></colgroup><tbody valign="top"><tr><td style="padding-left: 17px; padding-right: 12px"><p style="text-align: right"><span style="font-family:Verdana; font-size:8pt">1.</span></p></td><td><p>Open a command prompt.</p></td></tr><tr><td style="padding-left: 17px; padding-right: 12px"><p style="text-align: right"><span style="font-family:Verdana; font-size:8pt">2.</span></p></td><td><p>To enable dynamic compression, type the following at the command prompt and then press ENTER: 
</p><p><strong>cscript adsutil.vbs set w3svc/filters/compression/parameters/HcDoDynamicCompression true </strong></p></td></tr><tr><td style="padding-left: 17px; padding-right: 12px"><p style="text-align: right"><span style="font-family:Verdana; font-size:8pt">3.</span></p></td><td><p>To enable static compression, type the following at the command prompt and then press ENTER: 
</p><p><strong>cscript adsutil.vbs set w3svc/filters/compression/parameters/HcDoStaticCompression true </strong></p></td></tr></tbody></table></div><p><span style="font-size:14pt"><strong>To enable HTTP Compression for Individual Sites and Site Elements
</strong></span></p><div><table style="border-collapse:collapse" border="0"><colgroup><col style="width:40px"/><col style="width:601px"/></colgroup><tbody valign="top"><tr><td style="padding-left: 17px; padding-right: 12px"><p style="text-align: right"><span style="font-family:Verdana; font-size:8pt">1.</span></p></td><td><p>Disable global static compression by executing the following command at a command prompt:
</p><p><strong>adsutil set w3svc/filters/compression/parameters/HcDoStaticCompression false</strong></p></td></tr><tr><td style="padding-left: 17px; padding-right: 12px"><p style="text-align: right"><span style="font-family:Verdana; font-size:8pt">2.</span></p></td><td><p>Enable static compression at this directory by executing the following command at a command prompt:
</p><p><strong>adsutil set w3svc/1/root/Home/StyleSheets/DoStaticCompression true</strong></p></td></tr></tbody></table></div><p>
 </p><p><span style="font-family:Arial; font-size:10pt">To disable static compression for only a single directory, first enable global static compression (if it is disabled) and then disable static compression at that directory. For example, to enable static compression for a directory at http://www.contoso.com/Home/StyleSheets, perform the following steps:
</span></p><div><table style="border-collapse:collapse" border="0"><colgroup><col style="width:40px"/><col style="width:601px"/></colgroup><tbody valign="top"><tr><td style="padding-left: 17px; padding-right: 12px"><p style="text-align: right">1.</p></td><td><p>Disable global static compression by executing the following command at a command prompt:
</p><p><strong>adsutil set w3svc/filters/compression/parameters/HcDoStaticCompression true</strong></p></td></tr><tr><td style="padding-left: 17px; padding-right: 12px"><p style="text-align: right">2.</p></td><td><p>Enable static compression at this directory by executing the following command at a command prompt:
</p><p><strong>adsutil set w3svc/1/root/Home/StyleSheets/DoStaticCompression false</strong></p></td></tr></tbody></table></div><p>
 </p><p><span style="font-size:14pt"><strong>Note
</strong></span></p><div><table style="border-collapse:collapse" border="0"><colgroup><col style="width:10px"/><col style="width:614px"/></colgroup><tbody valign="top"><tr><td><p><span style="color:#a6a6a6; font-size:14pt">•</span></p></td><td vAlign="middle" style="padding-left: 8px"><p><span style="font-family:Arial; font-size:10pt">For a detailed discussion of how HTTP compression works, how to test compression, and detailed compression configuration options, see <a href="http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/25d2170b-09c0-45fd-8da4-898cf9a7d568.mspx">Using HTTP Compression for Faster Downloads</a>.</span></p></td></tr><tr><td> </td><td vAlign="middle" style="padding-left: 8px"> </td></tr><tr><td><p><span style="color:#a6a6a6; font-size:14pt">•</span></p></td><td vAlign="middle" style="padding-left: 8px"><p><span style="font-family:Arial; font-size:10pt">For information on configuring the types of files IIS compresses server-wide, see <a href="http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/5bce429d-c4a7-4f9e-a619-5972497b932a.mspx">Customizing the File Types IIS Compresses</a>.</span></p></td></tr></tbody></table></div>]]></content:encoded>
    </item>
    <item>
      <title>Building a Login Page for your Authorization Provider</title>
      <link>https://docs.microsoft.com/archive/blogs/joekr/building-a-login-page-for-your-authorization-provider</link>
      <pubDate>Wed, 06 Aug 2008 15:31:10 GMT</pubDate>
      <dc:creator><![CDATA[jakrupin]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/joekr/2008/08/06/building-a-login-page-for-your-authorization-provider/</guid>
      <description><![CDATA[There are many times in where you may want to "bypass" log in for MOSS 2007 because an SSO provider...]]></description>
      <content:encoded><![CDATA[<p>There are many times in where you may want to "bypass" log in for MOSS 2007 because an SSO provider has already provided authentication.  In this case, you could have written your own membership and role providers like here and implemented those providers like here.
</p><p>Now you need to actually login but either do not like the out of the box login and want to provide your own, or as mentioned above, there is no need.
</p><p>The following is a sample of what you may do in the Page_Load event of the login page.  You of course will want to change the web configuration file to point to your MOSS implementation to the correct location.
</p><p><span style="font-family:Courier New"><span style="color:blue">public</span>
			<span style="color:blue">void</span> AuthenticateToMOSS()</span>
	</p><p><span style="font-family:Courier New">        {</span>
	</p><p><span style="font-family:Courier New">            <span style="color:#2b91af">HttpCookie</span> cookie = Request.Cookies[<span style="color:#a31515">"SMSESSION"</span>];</span>
	</p><p><span style="font-family:Courier New">            <span style="color:#2b91af">Utilities</span> mySQLCalls = <span style="color:blue">new</span>
			<span style="color:#2b91af">Utilities</span>();</span>
	</p><p> 
 </p><p><span style="font-family:Courier New">            <span style="color:blue">string</span> myUser = <span style="color:blue">string</span>.Empty;</span>
	</p><p><span style="font-family:Courier New">            <span style="color:blue">string</span> url = <span style="color:blue">string</span>.Empty;</span>
	</p><p> 
 </p><p><span style="font-family:Courier New">            <span style="color:blue">try</span></span>
	</p><p><span style="font-family:Courier New">            {</span>
	</p><p><span style="font-family:Courier New">                        <span style="color:green">// The user has been authenticated. </span></span>
	</p><p><span style="font-family:Courier New">                        <span style="color:green">// 1. Create the ticket.</span></span>
	</p><p> 
 </p><p><span style="font-family:Courier New">                        <span style="color:#2b91af">FormsAuthenticationTicket</span> ticket = <span style="color:blue">new</span>
			<span style="color:#2b91af">FormsAuthenticationTicket</span>(</span>
	</p><p> 
 </p><p><span style="font-family:Courier New">                         1, <span style="color:green">// version</span></span>
	</p><p><span style="font-family:Courier New">                         myUser,    <span style="color:green">// This will be whatever your username will be and stored in MOSS for authorization</span></span>
	</p><p><span style="font-family:Courier New">                         <span style="color:#2b91af">DateTime</span>.Now,    <span style="color:green">// issue time is now</span></span>
	</p><p><span style="font-family:Courier New">                         <span style="color:#2b91af">DateTime</span>.Now.AddDays(1), <span style="color:green">// expires tomorrow</span></span>
	</p><p><span style="font-family:Courier New">                         <span style="color:blue">true</span>,    <span style="color:green">// cookie is persistent</span></span>
	</p><p><span style="font-family:Courier New">                         <span style="color:#a31515">"member"</span>);   <span style="color:green">// role assignment is stored in the UserData</span></span>
	</p><p><span style="font-family:Courier New">                        <span style="color:#2b91af">HttpCookie</span> cookie1 = <span style="color:blue">new</span>
			<span style="color:#2b91af">HttpCookie</span>(<span style="color:#2b91af">FormsAuthentication</span>.FormsCookieName,</span>
	</p><p><span style="font-family:Courier New">                        <span style="color:#2b91af">FormsAuthentication</span>.Encrypt(ticket));</span>
	</p><p> 
 </p><p><span style="font-family:Courier New">                        <span style="color:blue">if</span> (Session[<span style="color:#a31515">"RedirectURL"</span>] == <span style="color:blue">null</span>)</span>
	</p><p><span style="font-family:Courier New">                        {</span>
	</p><p><span style="font-family:Courier New">                            <span style="color:green">//Here you can redirect somewhere in MOSS</span></span>
	</p><p><span style="font-family:Courier New">                            Session[<span style="color:#a31515">"RedirectURL"</span>] = <span style="color:#2b91af">FormsAuthentication</span>.GetRedirectUrl(myUser, <span style="color:blue">true</span>);</span>
	</p><p><span style="font-family:Courier New">                            Session[<span style="color:#a31515">"UID"</span>] = iUID;</span>
	</p><p><span style="font-family:Courier New">                        }</span>
	</p><p> 
 </p><p><span style="font-family:Courier New">                        <span style="color:green">//// 2.5  Create Timeouts for cookies involved</span></span>
	</p><p><span style="font-family:Courier New">                        <span style="color:blue">if</span> (cookie != <span style="color:blue">null</span>)</span>
	</p><p><span style="font-family:Courier New">                        {</span>
	</p><p><span style="font-family:Courier New">                            cookie.Expires = <span style="color:#2b91af">DateTime</span>.Now.AddDays(1);</span>
	</p><p><span style="font-family:Courier New">                            Response.Cookies.Add(cookie);</span>
	</p><p><span style="font-family:Courier New">                        }</span>
	</p><p><span style="font-family:Courier New">                        cookie1.Expires = <span style="color:#2b91af">DateTime</span>.Now.AddDays(1);</span>
	</p><p> 
 </p><p><span style="font-family:Courier New">                        <span style="color:green">//// 3. Attach the cookie to the outbound response.</span></span>
	</p><p><span style="font-family:Courier New">                        Response.Cookies.Add(cookie1);</span>
	</p><p> 
 </p><p><span style="font-family:Courier New">                        <span style="color:green">// 4. Do the redirect.</span></span>
	</p><p> 
 </p><p> 
 </p><p><span style="font-family:Courier New">                        <span style="color:blue">this</span>.Page.Response.Redirect(url, <span style="color:blue">false</span>);</span>
	</p><p><span style="font-family:Courier New">                    }</span>
	</p><p><span style="font-family:Courier New">            <span style="color:blue">catch</span> (System.Threading.<span style="color:#2b91af">ThreadAbortException</span>)</span>
	</p><p><span style="font-family:Courier New">            {</span>
	</p><p><span style="font-family:Courier New">                <span style="color:green">//Do nothing</span></span>
	</p><p><span style="font-family:Courier New">            }</span>
	</p><p><span style="font-family:Courier New">            <span style="color:blue">catch</span> (<span style="color:#2b91af">Exception</span> exc)</span>
	</p><p><span style="font-family:Courier New">            {</span>
	</p><p><span style="font-family:Courier New">                System.Diagnostics.<span style="color:#2b91af">Debug</span>.Print(exc.ToString());</span>
	</p><p><span style="font-family:Courier New">                Response.Clear();</span>
	</p><p><span style="font-family:Courier New">                Response.Write(exc.ToString());</span>
	</p><p><span style="font-family:Courier New">                Response.End();</span>
	</p><p><span style="font-family:Courier New">            }</span>
	</p><p><span style="font-family:Courier New">            <span style="color:blue">finally</span></span>
	</p><p><span style="font-family:Courier New">            {</span>
	</p><p><span style="font-family:Courier New">            }</span>
	</p><p><span style="font-family:Courier New">        }</span>
	</p><p> 
 </p><p>Please notice that I am persisting all cookies here for client integration.  I am also manually creating my ticket as MOSS seemed to have issues with the one-liner.
</p><p> This is sample and may need some modification.
</p>]]></content:encoded>
    </item>
  </channel>
</rss>