<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Microsoft Premier Field Engineer - SharePoint</title><link>http://blogs.msdn.com/b/tejasr/</link><description>All posts are provided &amp;quot;AS IS&amp;quot; with no warranties, and confers no rights.</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>SharePoint 2013 Security – Resources</title><link>http://blogs.msdn.com/b/tejasr/archive/2012/12/12/sharepoint-2013-security-resources.aspx</link><pubDate>Wed, 12 Dec 2012 13:37:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10388769</guid><dc:creator>-Tejas</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/tejasr/rsscomments.aspx?WeblogPostID=10388769</wfw:commentRss><comments>http://blogs.msdn.com/b/tejasr/archive/2012/12/12/sharepoint-2013-security-resources.aspx#comments</comments><description>&lt;p&gt;This post is as per beta version, there could be some changes with RTM version.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms457529(office.15).aspx"&gt;Authentication, authorization, and security in SharePoint 2013&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;What's new in SharePoint 2013 for authentication, authorization, and security&lt;/p&gt;  &lt;p&gt;The following are some of the enhancements added to SharePoint 2013 Preview:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;User sign-in&lt;/li&gt;    &lt;li&gt;Services and app authentication&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/library/jj219758(office.15).aspx"&gt;What's new in authentication for SharePoint 2013 Preview&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;SharePoint 2013 Preview includes improvements in claims infrastructure and authentication features that enable new server-to-server and app authentication scenarios.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wictorwilen.se/sharepoint-2013-claims-is-the-new-black"&gt;SharePoint 2013: Claims is the new black&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In SharePoint 2010, we had to choose between two options when creating a Content Web Application - to use Classic mode Authentication or Claims-based Authentication. Now in SharePoint 2013, Claims-based authentication mode is the default authentication method. You cannot from the web interface create content web applications using Classic mode. Classic-mode authentication is deprecated and can be managed only by using Windows PowerShell. &lt;/p&gt;  &lt;p&gt;The app authentication and server-to-server authentication features of SharePoint 2013 Preview require claims-based authentication along with a lot of other features.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/library/ee794879(office.15).aspx"&gt;Plan authentication in SharePoint 2013 Preview&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Find resources about user authentication, server-to-server authentication, and app authentication to help you understand and plan for authentication in SharePoint 2013 Preview.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/library/hh305235(office.15).aspx"&gt;Configure SAML-based claims authentication with ADFS in SharePoint 2013 Preview&lt;/a&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;Describes the steps to configure Security Assertion Markup Language (SAML)-based claims authentication using Active Directory Federation Services (AD FS) 2.0.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/library/ee806890(office.15).aspx"&gt;Configure forms-based authentication for a claims-based web application in SharePoint 2013 Preview&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Describes the steps to configure forms-based authentication using a Lightweight Directory Access Protocol (LDAP) membership provider.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/library/jj219532(office.15).aspx"&gt;Configure server-to-server authentication in SharePoint 2013 Preview&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Provides steps to configure server-to-server (S2S) authentication with another server that uses the S2S protocol. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/library/ee662513(office.15).aspx"&gt;Initial deployment administrative and service accounts in SharePoint 2013&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Information about the administrative and service accounts that are required for an initial SharePoint 2013 deployment.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/library/gg602078(office.15).aspx"&gt;People Picker and claims providers overview (SharePoint 2013)&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Get an overview of People Picker and links to topics about how to plan for People Picker in SharePoint 2013.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://gallery.technet.microsoft.com/scriptcenter/Report-Where-and-How-fe52b725"&gt;Report Where and How SharePoint Users Have Been Granted Access&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This script produces a text file report of which items have been unique secured and which Active Directory users and groups have been granted access, based on the user domain specified. The report details whether the user or group has been granted rights directly, or if the user has been granted rights by membership to a SharePoint group though it&amp;#160; does not identify if a user has been granted rights based on their membership to an AD Group which in turn has been added to a SharePoint group.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/sharepoint/ee535443"&gt;How to: Deploy a claims provider in SharePoint 2013&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Learn how to deploy a SharePoint 2013 claims provider by using the features infrastructure&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10388769" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Services/">Services</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Resources/">Resources</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/enhancements/">enhancements</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/improvements/">improvements</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/infrastructure/">infrastructure</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/version/">version</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Authentication/">Authentication</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/User/">User</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Preview/">Preview</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/authorization/">authorization</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint/">SharePoint</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Configure/">Configure</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SAML/">SAML</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Information/">Information</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Report/">Report</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/topics/">topics</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Protocol/">Protocol</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/overview/">overview</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Describes/">Describes</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Federation/">Federation</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+2013/">SharePoint 2013</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Group/">Group</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Classic/">Classic</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Find/">Find</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Markup/">Markup</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Provides/">Provides</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Picker/">Picker</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Initial/">Initial</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/method/">method</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/options/">options</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/ADFS/">ADFS</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/server/">server</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/membership/">membership</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Language/">Language</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/directory/">directory</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/script/">script</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Content/">Content</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/provider/">provider</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/scenarios/">scenarios</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Assertion/">Assertion</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/PowerShell/">PowerShell</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Application/">Application</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Claims/">Claims</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Deploy/">Deploy</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Plan/">Plan</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/domain/">domain</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Windows/">Windows</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/providers/">providers</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/LDAP/">LDAP</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Active/">Active</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/deployment/">deployment</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/People/">People</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Learn/">Learn</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/mode/">mode</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/interface/">interface</category></item><item><title>SharePoint 2013 Upgrade – Resources</title><link>http://blogs.msdn.com/b/tejasr/archive/2012/10/01/sharepoint-2013-upgrade-resources.aspx</link><pubDate>Mon, 01 Oct 2012 11:38:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10388768</guid><dc:creator>-Tejas</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/tejasr/rsscomments.aspx?WeblogPostID=10388768</wfw:commentRss><comments>http://blogs.msdn.com/b/tejasr/archive/2012/10/01/sharepoint-2013-upgrade-resources.aspx#comments</comments><description>&lt;p&gt;This post is as per beta version, there could be some changes with RTM version.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/library/ee617150.aspx"&gt;What's new in SharePoint 2013 upgrade&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;SharePoint 2013 includes new upgrade features, such as upgrade for service applications, a site health checker, and upgrade for site.&lt;/p&gt;  &lt;p&gt;SharePoint 2013 does not support in-place upgrade for an existing environment. You must use the database-attach upgrade method to upgrade your databases to a new environment that is based on SharePoint 2013. Also, to provide more flexibility to farm administrators and site administrators, the upgrade process has changed to separate upgrade of the software and databases from upgrade of the sites.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://office.microsoft.com/en-us/help/sharepoint-foundation-2013-known-issues-HA102919008.aspx?CTT=5&amp;amp;origin=HA102919021"&gt;SharePoint Foundation 2013 known issues&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;A list of important facts along with known issues and solutions for SharePoint Foundation 2013.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://office.microsoft.com/en-us/help/sharepoint-server-2013-known-issues-HA102919021.aspx"&gt;SharePoint Server 2013 known issues&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Known issues and solutions for SharePoint Server 2013 and Microsoft SharePoint Designer 2013.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/b/alimaz/archive/2012/07/17/upgrading-from-sharepoint-2010-to-sharepoint-2013-step-by-step.aspx"&gt;Upgrading from SharePoint 2010 to SharePoint 2013 Step-by-Step&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/library/cc262967.aspx"&gt;Troubleshoot database upgrade issues in SharePoint 2013&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;List of common issues and describes general principles to help you identify and address upgrade issues. After you identify and address the issues, you can resume upgrade. Learn how to address problems that may occur after you upgrade a database to SharePoint 2013.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/library/jj219648.aspx"&gt;Troubleshoot site collection upgrade issues in SharePoint 2013&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;When you upgrade a site collection to SharePoint 2013, errors can occasionally occur. Learn how to address problems that may occur after you upgrade a site to SharePoint 2013.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/library/ff382641.aspx"&gt;Clean up an environment before an upgrade to SharePoint 2013&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Before you start to upgrade from SharePoint 2010 Products to SharePoint 2013, make sure that your environment is functioning in a healthy state and clean up any content that you do not have to upgrade. Also take the time to remove or rearrange content. Make sure that your environment is in a healthy state, and delete unnecessary items before you upgrade to SharePoint 2013.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sharepoint.microsoft.com/Blogs/fromthefield/Lists/Posts/Post.aspx?ID=155"&gt;SharePoint 2013 (Technical Preview) MySite Upgrade and Profile Photos&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/library/jj839719.aspx"&gt;Upgrade service applications to SharePoint 2013&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Upgrade the service applications (Business Connectivity Services, Managed Metadata, Secure Store, User Profiles, Search) to SharePoint 2013. When you upgrade from SharePoint 2010 Products to SharePoint 2013, you must use a database attach upgrade, which means that you upgrade only the content for your environment and not the configuration settings. After you have configured the SharePoint 2013 environment, and copied the content and service application databases, you can upgrade the service applications to SharePoint 2013.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10388768" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Search/">Search</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/MySite/">MySite</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Services/">Services</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/List/">List</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Resources/">Resources</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/version/">version</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/User/">User</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Preview/">Preview</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint/">SharePoint</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+2013/">SharePoint 2013</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/method/">method</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/server/">server</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Learn/">Learn</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Step/">Step</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Profiles/">Profiles</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Foundation/">Foundation</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Upgrade/">Upgrade</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Products/">Products</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/configuration/">configuration</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/health/">health</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/administrators/">administrators</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Profile/">Profile</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/settings/">settings</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Clean/">Clean</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/solutions/">solutions</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/collection/">collection</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Known/">Known</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/errors/">errors</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Troubleshoot/">Troubleshoot</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Technical/">Technical</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/database/">database</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Metadata/">Metadata</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Photos/">Photos</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Make/">Make</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Secure/">Secure</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/databases/">databases</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Microsoft/">Microsoft</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/items/">items</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Designer/">Designer</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/environment/">environment</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/checker/">checker</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Also/">Also</category></item><item><title>SharePoint 2013 - General Reference</title><link>http://blogs.msdn.com/b/tejasr/archive/2012/09/01/sharepoint-2013-general-reference.aspx</link><pubDate>Sat, 01 Sep 2012 12:15:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10388767</guid><dc:creator>-Tejas</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/tejasr/rsscomments.aspx?WeblogPostID=10388767</wfw:commentRss><comments>http://blogs.msdn.com/b/tejasr/archive/2012/09/01/sharepoint-2013-general-reference.aspx#comments</comments><description>&lt;ul&gt;&lt;/ul&gt;  &lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/library/ff758647(office.15).aspx"&gt;Capacity management and sizing overview for SharePoint Server 2013&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This article provides an overview of how to effectively plan and manage the capacity of SharePoint Server 2013 environments. This article also describes how to maintain a good understanding of the capacity needs and capabilities of your deployment, by analysis of performance and volume data. It also reviews the major application impacts that affect capacity, including content characteristics and usage.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/library/cc261700(office.15).aspx"&gt;Capacity management and sizing for SharePoint Server 2013&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Learn about the concepts and planning considerations for managing the capacity of a SharePoint Server 2013 environment and helps you to make the decisions regarding the appropriate capacity for your SharePoint Server 2013 environment.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/library/cc262787(office.15).aspx"&gt;Software boundaries and limits for SharePoint 2013&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This article describes software boundaries and limits of SharePoint Server 2013 along with the tested performance and capacity limits of SharePoint Server 2013 and how limits relate to acceptable performance.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/b/erica/archive/2012/10/31/sharepoint-and-database-statistics-why-are-they-out-of-date-and-what-to-do-about-it.aspx"&gt;SharePoint and Database Statistics: Why are they out-of-date and what to do about it&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Interesting insight about the database maintenance job which runs every night. However, there are chances that the update statistics operation will be skipped without any indications in the ULS logs. The article sums up the findings and the recommendation to ensure that database statistics are updated at least daily.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/b/wbaer/archive/2012/11/12/introduction-to-shredded-storage-in-sharepoint-2013.aspx"&gt;Introduction to Shredded Storage in SharePoint 2013&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Shredded storage is a new data platform improvement in SharePoint 2013 related to the management of large binary objects (I.e. BLOBS such as Microsoft PowerPoint Presentations, Microsoft Word Documents, etc.). At its most basic, Shredded Storage is designed to ensure the write cost of updating a document is proportional to the size of the change, and not of the file itself.&lt;/p&gt;  &lt;p&gt;Shredded Storage is both improves I/O and reduces compute utilization when making incremental changes to document or storing documents in SharePoint 2013. Shredded Storage builds upon the Cobalt (I.e. File Synchronization via SOAP of HTTP) protocol introduced in SharePoint 2010.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/library/ee428298.aspx"&gt;Digital asset library planning in SharePoint Server 2013&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;SharePoint Server 2013 provides an asset library which is special kind of document library. It lets you store and manage digital assets — such as images, audio, video, and other reusable content fragments from many applications— that is shared with other site users. Content types that are designed specifically for audio and video assets support the storage and playback of those assets in Web Parts and Web Part pages, and the HTML5 player is integrated with the user interface to enhance the media playback experience for users. Use the articles in this section to guide you in planning the management of digital assets in a solution that is based on SharePoint Server 2013.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/library/ee721060.aspx"&gt;Plan digital asset library topology and architecture in SharePoint Server 2013&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Learn about logical architecture and topology decisions that are related to deploying digital asset libraries. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/b/vbertocci/archive/2013/01/02/oauth-2-0-and-sign-in.aspx"&gt;OAuth 2.0 and Sign-In&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;OAuth 2.0 is NOT an authentication protocol. The OAuth 2.0 protocol is aimed at authorizing rather than authenticating and its aim is to authorize applications. OAuth 2.0 is an authorization framework. OAuth 2.0 cannot be used to implement a sign-in flow without adding provider-specific knowledge. Read this post from Vittorio Bertocci to know more.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/library/jj900474.aspx"&gt;Viewing reports and dashboards on mobile devices&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This article contains detailed information about how to create reports, scorecards, and dashboards that can be viewed by using a mobile device, such as Apple iPad and Windows 8 tablets. Learn how to view reports and dashboards on mobile devices, such as Apple iPad and Windows 8 tablet devices.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/library/fp161352(office.15).aspx"&gt;What's new for mobile devices in SharePoint 2013&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;SharePoint Server 2013 offers new, optimized viewing experiences across different mobile platforms. Additionally, several new features were added to help improve both worker productivity and usability on the device. In this article, you can learn about the new mobile features available in SharePoint Server 2013, including the mobile browser experience, device channels, and location.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/library/jj900489.aspx"&gt;Configuring business intelligence content for viewing on mobile devices&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This article contains recommendations on how to configure business intelligence content to display on devices such as Apple iPad or Windows 8 slate (or Surface) devices. Learn tips and tricks of configuring reports, scorecards, and dashboards to be displayed correctly on mobile devices.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/library/ee667266(office.15).aspx"&gt;What's new in search in SharePoint Server 2013&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Learn about new search capabilities in SharePoint Server 2013, including ways to configure and monitor the system and improve search results.&lt;/p&gt;  &lt;p&gt;SharePoint 2013 uses the web-based interface to show the current status of the topology. However, unlike SharePoint Server 2010 that included a web-based option for changing the topology along with Windows PowerShell, SharePoint 2013 does not include the option to change the topology from the web-based interface.&lt;/p&gt;  &lt;p&gt;&lt;a href="&amp;sect;%09http:/technet.microsoft.com/en-us/library/jj851144.aspx"&gt;Manage the Search Center&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Learn about pages that are created in a Search Center site in SharePoint Server 2013, and see articles about how to configure Web Parts. When you create an Enterprise Search Center site collection, SharePoint 2013 creates a default search home page and a default search results page. In addition, several pages known as search verticals are also created. Search verticals are customized for searching specific content, such as People, Conversations, and Videos, and they display search results that are filtered and formatted for a specific content type or class.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/library/jj219802.aspx"&gt;Manage continuous crawls in SharePoint Server 2013&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Learn how to enable continuous crawls of SharePoint content to help keep the search index and search results as fresh as possible. Enable continuous crawls is a crawl schedule option that is new in SharePoint 2013. It is available only for content sources that use the SharePoint sites content source type. A continuous crawl starts at set intervals. The default interval is 15 minutes, but you can set continuous crawls to occur at shorter intervals by using Windows PowerShell.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/fp179930(office.15).aspx"&gt;Apps for SharePoint overview&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Learn what apps for SharePoint are, why you should build them, and the concepts that are fundamental to building them in SharePoint 2013 Preview.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/library/fp161237(office.15).aspx"&gt;Plan for apps for SharePoint 2013&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The apps for SharePoint provide a new method to deliver specific information or functionality to a SharePoint site. An app for SharePoint is a small, easy-to-use, stand-alone productivity app that solves a specific end-user need. Learn how to use apps for SharePoint 2013. Plan the App Catalog, app URLs, and how to monitor and license apps. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/library/gg188041(office.15).aspx"&gt;Overview of profile synchronization in SharePoint Server 2013&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The process of importing profile data from external systems and writing data back to these systems is called profile synchronization. Learn about profile synchronization, also known as &amp;quot;profile sync,&amp;quot; in SharePoint Server 2013.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/library/jj219700(office.15).aspx"&gt;Microblog features, feeds, and the Distributed Cache service overview in SharePoint Server 2013&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Learn about microblog features, newsfeed, and the Distributed Cache service in SharePoint Server 2013 Preview. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10388767" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Search/">Search</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Authentication/">Authentication</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/User/">User</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Preview/">Preview</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/authorization/">authorization</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint/">SharePoint</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Information/">Information</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Protocol/">Protocol</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/overview/">overview</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+2013/">SharePoint 2013</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/method/">method</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/server/">server</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Content/">Content</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/provider/">provider</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/PowerShell/">PowerShell</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Plan/">Plan</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Windows/">Windows</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/deployment/">deployment</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/People/">People</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Learn/">Learn</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/interface/">interface</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/collection/">collection</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/database/">database</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Microsoft/">Microsoft</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/environment/">environment</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/environments/">environments</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/performance/">performance</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/utilization/">utilization</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Storage/">Storage</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/impacts/">impacts</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/addition/">addition</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/option/">option</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/indications/">indications</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Surface/">Surface</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/dashboards/">dashboards</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/intelligence/">intelligence</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/system/">system</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/index/">index</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/users/">users</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/platform/">platform</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/assets/">assets</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/concepts/">concepts</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Apple/">Apple</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/device/">device</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/systems/">systems</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Microblog/">Microblog</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/scorecards/">scorecards</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Apps/">Apps</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/size/">size</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/asset/">asset</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/tablet/">tablet</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/recommendations/">recommendations</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/status/">status</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/library/">library</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Read/">Read</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/intervals/">intervals</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/data/">data</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Software/">Software</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Statistics/">Statistics</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/worker/">worker</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Bertocci/">Bertocci</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/iPad/">iPad</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/interval/">interval</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Cache/">Cache</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/BLOBS/">BLOBS</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/knowledge/">knowledge</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/media/">media</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+Server+2013/">SharePoint Server 2013</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/characteristics/">characteristics</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Synchronization/">Synchronization</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/article/">article</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/improvement/">improvement</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Videos/">Videos</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Parts/">Parts</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/General/">General</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/OAuth/">OAuth</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/URLs/">URLs</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/maintenance/">maintenance</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Documents/">Documents</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Sign/">Sign</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Center/">Center</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/recommendation/">recommendation</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/platforms/">platforms</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/usage/">usage</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/playback/">playback</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Conversations/">Conversations</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Word/">Word</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/location/">location</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/boundaries/">boundaries</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Introduction/">Introduction</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Presentations/">Presentations</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/player/">player</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/topology/">topology</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/tablets/">tablets</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Enterprise/">Enterprise</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/PowerPoint/">PowerPoint</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Part/">Part</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Vittorio/">Vittorio</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Enable/">Enable</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Digital/">Digital</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/libraries/">libraries</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Reference/">Reference</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/File/">File</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/analysis/">analysis</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/management/">management</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/solution/">solution</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/framework/">framework</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/architecture/">architecture</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/capabilities/">capabilities</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/decisions/">decisions</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Manage/">Manage</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/verticals/">verticals</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/cost/">cost</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/findings/">findings</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SOAP/">SOAP</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Catalog/">Catalog</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Cobalt/">Cobalt</category></item><item><title>What’s new in SharePoint 2013 – Resources</title><link>http://blogs.msdn.com/b/tejasr/archive/2012/08/01/what-s-new-in-sharepoint-2013-resources.aspx</link><pubDate>Wed, 01 Aug 2012 11:25:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10388764</guid><dc:creator>-Tejas</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/tejasr/rsscomments.aspx?WeblogPostID=10388764</wfw:commentRss><comments>http://blogs.msdn.com/b/tejasr/archive/2012/08/01/what-s-new-in-sharepoint-2013-resources.aspx#comments</comments><description>&lt;p&gt;This post is as per beta version, there could be some changes with RTM version.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/sharepoint/fp142374.aspx" target="_blank"&gt;For IT Pro - Capabilities and features in SharePoint 2013&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://technet.microsoft.com/en-US/sharepoint/fp123606"&gt;SharePoint 2013 training for IT pros&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;How-to training and walkthrough videos with this interactive course about SharePoint 2013 including changes and new features for search, social, deployment and performance/scalability.&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="5" width="735" border="0"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td width="733"&gt;SharePoint Server 2013 Introduction and Overview &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="733"&gt; SharePoint Server 2013 System Requirements &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="733"&gt;Architectural Changes in SharePoint Server 2013 &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="733"&gt;Plan for Server Farms and Environments &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="733"&gt;Office Web Applications 2013 &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="733"&gt;Introduction to Service Applications in SharePoint Server 2013 &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="733"&gt;Enterprise Search in SharePoint Server 2013 &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="733"&gt;Social Features in SharePoint Server 2013 &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="733"&gt;Enterprise and Web Content Management in SharePoint Server 2013 &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="733"&gt;Managing Customizations in SharePoint Server 2013 &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="733"&gt;Security in SharePoint Server 2013 &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="733"&gt;Business Continuity Management in SharePoint Server 2013 &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="733"&gt;Upgrading to SharePoint 2013 &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/jj163091.aspx" target="_blank"&gt;What’s new for developers in SharePoint 2013&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-US/office/apps/fp123626" target="_blank"&gt;Developer Training&lt;/a&gt;&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="5" width="737" border="0"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td width="735"&gt;Introduction to Office 2013 and SharePoint 2013 development &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="735"&gt;SharePoint 2013 app model for developers &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="735"&gt;SharePoint 2013 developer tools &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="735"&gt;Create hosted apps in SharePoint 2013 &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="735"&gt;Create cloud-hosted apps for SharePoint 2013 &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="735"&gt;SharePoint 2013 client object model (CSOM) and REST APIs &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="735"&gt;OAuth and application identity in SharePoint 2013 &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="735"&gt;Develop SharePoint 2013 remote event receivers &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="735"&gt;Workflow changes and features in SharePoint 2013 &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="735"&gt;Business connectivity services changes in SharePoint 2013 &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="735"&gt;Search features and changes in SharePoint 2013 &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="735"&gt;Enterprise content management changes in SharePoint 2013 &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="735"&gt;Web content management changes and features in SharePoint 2013 &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="735"&gt;Social features in SharePoint 2013 &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="735"&gt;Create mobile apps for SharePoint 2013 &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.sharepointjoel.com/Lists/Posts/Post.aspx?ID=568"&gt;SharePoint 2013 Top 10 New Features&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Overview of the Top Features of SharePoint 2013&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sharepoint.microsoft.com/blog/Pages/BlogPost.aspx?pID=1012"&gt;The New SharePoint&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Highlights of the new version of SharePoint&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/b/tothesharepoint/archive/2012/07/23/new-sharepoint-technical-content.aspx"&gt;New SharePoint Technical Content&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The TechNet home page and feature package covers IT professional content for new Office, Office 365, SharePoint, Exchange, Lync, and Project&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/en-us/download/details.aspx?id=30382"&gt;SharePoint 2013 Technical Library in Compiled Help (Chm)&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;CHM version of SharePoint 2013 content in the SharePoint 2013 technical library.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10388764" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Search/">Search</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Features/">Features</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Resources/">Resources</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/version/">version</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint/">SharePoint</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/overview/">overview</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+2013/">SharePoint 2013</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/server/">server</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Content/">Content</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Plan/">Plan</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/deployment/">deployment</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Technical/">Technical</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/environments/">environments</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/performance/">performance</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/system/">system</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Apps/">Apps</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/library/">library</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+Server+2013/">SharePoint Server 2013</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/OAuth/">OAuth</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Introduction/">Introduction</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Enterprise/">Enterprise</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/management/">management</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/capabilities/">capabilities</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/development/">development</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Project/">Project</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/REST/">REST</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/pros/">pros</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Changes/">Changes</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Requirements/">Requirements</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/client/">client</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/event/">event</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Highlights/">Highlights</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Customizations/">Customizations</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Exchange/">Exchange</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Farms/">Farms</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/CSOM/">CSOM</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Lync/">Lync</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/developers/">developers</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Architectural/">Architectural</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/APIs/">APIs</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/tools/">tools</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Create/">Create</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Applications/">Applications</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Developer/">Developer</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Office/">Office</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/TechNet/">TechNet</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Social/">Social</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Help/">Help</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Develop/">Develop</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Service/">Service</category></item><item><title>Code to create a task in Windows Task Scheduler</title><link>http://blogs.msdn.com/b/tejasr/archive/2012/03/01/code-to-create-a-task-in-windows-task-scheduler.aspx</link><pubDate>Thu, 01 Mar 2012 11:54:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10388762</guid><dc:creator>-Tejas</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/tejasr/rsscomments.aspx?WeblogPostID=10388762</wfw:commentRss><comments>http://blogs.msdn.com/b/tejasr/archive/2012/03/01/code-to-create-a-task-in-windows-task-scheduler.aspx#comments</comments><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;div id="codeSnippet" style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;     &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum1" style="color: rgb(96, 96, 96);"&gt;   1:&lt;/span&gt; TaskSchedulerClass scheduler = &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; TaskSchedulerClass();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum2" style="color: rgb(96, 96, 96);"&gt;   2:&lt;/span&gt; scheduler.Connect(&lt;span style="color: rgb(0, 0, 255);"&gt;null&lt;/span&gt;, &lt;span style="color: rgb(0, 0, 255);"&gt;null&lt;/span&gt;, &lt;span style="color: rgb(0, 0, 255);"&gt;null&lt;/span&gt;, &lt;span style="color: rgb(0, 0, 255);"&gt;null&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum3" style="color: rgb(96, 96, 96);"&gt;   3:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum4" style="color: rgb(96, 96, 96);"&gt;   4:&lt;/span&gt; ITaskDefinition task = scheduler.NewTask(0);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum5" style="color: rgb(96, 96, 96);"&gt;   5:&lt;/span&gt; task.RegistrationInfo.Author = &lt;span style="color: rgb(0, 96, 128);"&gt;&amp;quot;MS PFE&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum6" style="color: rgb(96, 96, 96);"&gt;   6:&lt;/span&gt; task.RegistrationInfo.Description = &lt;span style="color: rgb(0, 96, 128);"&gt;&amp;quot;.....&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum7" style="color: rgb(96, 96, 96);"&gt;   7:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum8" style="color: rgb(96, 96, 96);"&gt;   8:&lt;/span&gt; IDailyTrigger trigger = (IDailyTrigger)task.Triggers.Create(_TASK_TRIGGER_TYPE2.TASK_TRIGGER_DAILY);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum9" style="color: rgb(96, 96, 96);"&gt;   9:&lt;/span&gt; trigger.Id = &lt;span style="color: rgb(0, 96, 128);"&gt;&amp;quot;TaskName-Trigger&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum10" style="color: rgb(96, 96, 96);"&gt;  10:&lt;/span&gt; trigger.DaysInterval = 1;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum11" style="color: rgb(96, 96, 96);"&gt;  11:&lt;/span&gt; trigger.StartBoundary = &lt;span style="color: rgb(0, 96, 128);"&gt;&amp;quot;2012-06-01T23:55:00&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum12" style="color: rgb(96, 96, 96);"&gt;  12:&lt;/span&gt; trigger.EndBoundary = &lt;span style="color: rgb(0, 96, 128);"&gt;&amp;quot;2020-06-01T23:55:00&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum13" style="color: rgb(96, 96, 96);"&gt;  13:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum14" style="color: rgb(96, 96, 96);"&gt;  14:&lt;/span&gt; IExecAction action = (IExecAction)task.Actions.Create(_TASK_ACTION_TYPE.TASK_ACTION_EXEC);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum15" style="color: rgb(96, 96, 96);"&gt;  15:&lt;/span&gt; action.Id = &lt;span style="color: rgb(0, 96, 128);"&gt;&amp;quot;GetContentDBDetails-Action&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum16" style="color: rgb(96, 96, 96);"&gt;  16:&lt;/span&gt; action.Path = @assemblypath;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum17" style="color: rgb(96, 96, 96);"&gt;  17:&lt;/span&gt; action.WorkingDirectory = &lt;span style="color: rgb(0, 96, 128);"&gt;@&amp;quot;C:\Program Files\Microsoft\...&amp;quot;&lt;/span&gt;; &lt;span style="color: rgb(0, 128, 0);"&gt;//generally the folder in which assembly is placed&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum18" style="color: rgb(96, 96, 96);"&gt;  18:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum19" style="color: rgb(96, 96, 96);"&gt;  19:&lt;/span&gt; ITaskFolder folder = scheduler.GetFolder(&lt;span style="color: rgb(0, 96, 128);"&gt;&amp;quot;\\&amp;quot;);&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum20" style="color: rgb(96, 96, 96);"&gt;  20:&lt;/span&gt; IRegisteredTask regTask = folder.RegisterTaskDefinition(&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum21" style="color: rgb(96, 96, 96);"&gt;  21:&lt;/span&gt;     &amp;quot;TaskName&lt;span style="color: rgb(0, 96, 128);"&gt;&amp;quot;,&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum22" style="color: rgb(96, 96, 96);"&gt;  22:&lt;/span&gt;     task,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum23" style="color: rgb(96, 96, 96);"&gt;  23:&lt;/span&gt;     (int)_TASK_CREATION.TASK_CREATE_OR_UPDATE,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum24" style="color: rgb(96, 96, 96);"&gt;  24:&lt;/span&gt;     Environment.UserName, //System.Security.Principal.WindowsIdentity.GetCurrent().Name,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum25" style="color: rgb(96, 96, 96);"&gt;  25:&lt;/span&gt;     null, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum26" style="color: rgb(96, 96, 96);"&gt;  26:&lt;/span&gt;     _TASK_LOGON_TYPE.TASK_LOGON_INTERACTIVE_TOKEN, &amp;quot;&amp;quot;);&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10388762" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Windows/">Windows</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Create/">Create</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/RegistrationInfo/">RegistrationInfo</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Description/">Description</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Author/">Author</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/ITaskDefinition/">ITaskDefinition</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Trigger/">Trigger</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Scheduler/">Scheduler</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/IDailyTrigger/">IDailyTrigger</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Triggers/">Triggers</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Connect/">Connect</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/TaskName/">TaskName</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/DaysInterval/">DaysInterval</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Actions/">Actions</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/task/">task</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/NewTask/">NewTask</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Code/">Code</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/action/">action</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/StartBoundary/">StartBoundary</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/EndBoundary/">EndBoundary</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/IExecAction/">IExecAction</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/TaskSchedulerClass/">TaskSchedulerClass</category></item><item><title>A Few Sneak Peeks of my SharePoint Site Archival Workflow Project</title><link>http://blogs.msdn.com/b/tejasr/archive/2011/12/01/a-few-sneak-peeks-of-my-sharepoint-site-archival-workflow-project.aspx</link><pubDate>Thu, 01 Dec 2011 00:13:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10264057</guid><dc:creator>-Tejas</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/tejasr/rsscomments.aspx?WeblogPostID=10264057</wfw:commentRss><comments>http://blogs.msdn.com/b/tejasr/archive/2011/12/01/a-few-sneak-peeks-of-my-sharepoint-site-archival-workflow-project.aspx#comments</comments><description>&lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;I had a requirement from customer to develop an archival workflow solution using which they can automate the Site Collection archival based on a set of business rules. The features should be, notify users for the key LOB information expiration based on which the sites were created, Maintain the notification count and based on the count take a call to make a particular site read-only, offline or take a back up &amp;amp; delete it permanently from the content database in case of no action taken to update the key LOB information. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;And, just to give you a little idea about the size of the farm, it’s in TBs and there are thousands of site collections created automatically across multiple content databases through an automated process. so to do the above steps manually for each site collection based on different notification counter values and repeat it every week, was just impossible and that’s how we decided for an automatic site archival solution.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;The purpose of this blog post is to give you an idea about the various features and parts of the solution so in case you come across any of the similar business requirement in future then can make use of some of these ideas or code snippets and make your life little easier&lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-05-23-metablogapi/0842.wlEmoticon_2D00_smile_5F00_09BA4926.png" /&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;This solution has several features like &lt;/font&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;font size="2"&gt;Automatic scanning for all Site Collections with expired Key Information(Based on which Site Collections are created)&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2"&gt;Check for the expiration date of Key Information with LOB system(The Origin place of the Key Information)&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2"&gt;Find out the Site Owners&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2"&gt;Validation of the Site Owners with the directory services&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2"&gt;Send configurable email notifications to Site Owners about the Key Information expiration&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2"&gt;Keep track of notifications count&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2"&gt;Automatically extend the Site Collection’s Key Information details in SharePoint if it’s been updated in LOB system&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2"&gt;Make the Site Collection offline based on the notification count in case of no response from Owners&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2"&gt;Take the Site Collection Backup, transfer the back up to a shared location for the archival &amp;amp; delete it to reclaim the used space based on the notification count&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2"&gt;Provision to take an exception for a Site Collection for the Key Information expiration scan &amp;amp; archival&lt;/font&gt;&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;font size="2"&gt;And following are the configuration features of the solution&lt;/font&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;font size="2"&gt;Configurable LOB pointer &amp;amp; Workflow Admins list&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2"&gt;Configurable Email Templates for notifications&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2"&gt;Configurable Execution Timing/Schedule&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2"&gt;No IISRESET/ App pool recycle required&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2"&gt;Logging of each execution in the event viewers for the Admin review&lt;/font&gt;&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;font size="2"&gt;So here is how I designed these configuration features&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;For Configurable LOB pointer &amp;amp; Workflow Admins list, I kept txt files with solution which would contain the connection and Administrator details respectively so can be modified anytime. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;Created XML for the email templates and would read the specific template from the code using template id.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;Built whole application as an exe so can be configured with windows task scheduler.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;Since no deployment of WSP to SharePoint and solution is just a stand alone exe, no IISReset/ App Pool Recycle required.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;Used Event viewer for writing the execution log.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;Now following are a few Code Snippets which are used for the above functionalities.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;&lt;font size="2"&gt;For txt read&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;     &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&lt;font size="2"&gt;try&lt;/font&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;{&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    &lt;span style="color: #0000ff"&gt;const&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; f = &lt;span style="color: #006080"&gt;&amp;quot;ConnectionString.txt&amp;quot;&lt;/span&gt;;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    &lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; (StreamReader r = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; StreamReader(f))&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    {&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;        connectionString = r.ReadLine();&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    }&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;}&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;&lt;span style="color: #0000ff"&gt;catch&lt;/span&gt; (Exception ex)&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;{&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    WritetoEventViewer(&lt;span style="color: #006080"&gt;&amp;quot;Exception(ConnectionString Fileread) : &amp;quot;&lt;/span&gt; + ex.Message.ToString());&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;}&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;&lt;font size="2"&gt;To check user validity with directory services&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;
  &lt;div id="codeSnippetWrapper"&gt;
    &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
      &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;&lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; checkValidUser(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; UserID)&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

      &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;{&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

      &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; isValid = &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

      &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    &lt;span style="color: #0000ff"&gt;try&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

      &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    {&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

      &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;        &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; (var ctx = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; PrincipalContext(ContextType.Domain)) &lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

      &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;        {     &lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

      &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;            var user = UserPrincipal.FindByIdentity(ctx, UserID);      &lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

      &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;            &lt;span style="color: #0000ff"&gt;if&lt;/span&gt;(user != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;)     &lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

      &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;            {&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

      &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;                isValid = &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

      &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;                user.Dispose();     &lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

      &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;            } &lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

      &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;        } &lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

      &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    }&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

      &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    &lt;span style="color: #0000ff"&gt;catch&lt;/span&gt; (Exception ex)&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

      &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    {&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

      &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;        WritetoEventViewer(&lt;span style="color: #006080"&gt;&amp;quot;Exception(Checking AD User Validation) : &amp;quot;&lt;/span&gt; + ex.Message.ToString());&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

      &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    }&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

      &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;&amp;#160;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

      &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; isValid;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

      &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;}&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
  &lt;/div&gt;

  &lt;br /&gt;&lt;strong&gt;&lt;u&gt;&lt;font size="2"&gt;To get mail templates from XML&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;&lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; GetMailTemplates()&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;{&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    mailTemplates = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt;[3, 5];&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    &lt;span style="color: #0000ff"&gt;try&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    {&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;       &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; i = -1, j = 0;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;&amp;#160;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;        XmlTextReader reader = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; XmlTextReader(&lt;span style="color: #006080"&gt;&amp;quot;EmailTemplates.xml&amp;quot;&lt;/span&gt;);&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;        &lt;span style="color: #0000ff"&gt;while&lt;/span&gt; (reader.Read())&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;        {&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;            &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; ((reader.NodeType == XmlNodeType.Element) &amp;amp;&amp;amp; (reader.Name == &lt;span style="color: #006080"&gt;&amp;quot;template&amp;quot;&lt;/span&gt;))&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;            {&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;                i++;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;                j = 0;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;&amp;#160;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;                &lt;span style="color: #008000"&gt;//to save from array overload&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;                &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (i == 2)&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;                    &lt;span style="color: #0000ff"&gt;break&lt;/span&gt;;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;            }&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;            &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (reader.NodeType == XmlNodeType.Text)&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;            {&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;                mailTemplates[i, j] = reader.Value.ToString().Trim(&lt;span style="color: #006080"&gt;'\n'&lt;/span&gt;, &lt;span style="color: #006080"&gt;'\r'&lt;/span&gt;, &lt;span style="color: #006080"&gt;' '&lt;/span&gt;);&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;                j++;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;            }&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;        }&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    }&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    &lt;span style="color: #0000ff"&gt;catch&lt;/span&gt; (Exception ex)&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    {&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;        WritetoEventViewer(&lt;span style="color: #006080"&gt;&amp;quot;Exception(Getting Mail Templates) : &amp;quot;&lt;/span&gt; + ex.Message.ToString());&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    }&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;}&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;&lt;font size="2"&gt;To make NoAccess to the Site Collection&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;&lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; operation = &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&lt;font size="2"&gt;try&lt;/font&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;{&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; (SPSite site = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; SPSite(url))&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    {&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;        site.WriteLocked = &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;        site.LockIssue = &lt;span style="color: #006080"&gt;&amp;quot;Making site collection NoAccess as per the Archival Workflow&amp;quot;&lt;/span&gt;;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;        site.ReadOnly = &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;        site.ReadLocked = &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;        &lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;        operation = &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    }&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;}&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;&lt;span style="color: #0000ff"&gt;catch&lt;/span&gt; (Exception ex)&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;{&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    operation = &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    WritetoEventViewer(&lt;span style="color: #006080"&gt;&amp;quot;Exception(Making SiteCollection Offline) : &amp;quot;&lt;/span&gt; + ex.Message.ToString());&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;}&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;&lt;font size="2"&gt;To backup &amp;amp; move the Site Collection in a shared location&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;&lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; operation = &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&lt;font size="2"&gt;try&lt;/font&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;{&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; bkLocation = &lt;/font&gt;&lt;span style="color: #006080"&gt;&lt;font size="2"&gt;@&amp;quot;c:\&amp;quot;;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    string bkFileName = DateTime.Now.ToString() + &amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;font size="2"&gt;.bak&lt;/font&gt;&lt;span style="color: #006080"&gt;&lt;font size="2"&gt;&amp;quot;;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;&amp;#160;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    bkFileName = bkFileName.Replace(&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;font size="2"&gt;/&lt;span style="color: #006080"&gt;&amp;quot;, &amp;quot;&lt;/span&gt;&lt;/font&gt;&lt;span style="color: #006080"&gt;&lt;font size="2"&gt;&amp;quot;);&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    bkFileName = bkFileName.Replace(&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;font size="2"&gt;:&lt;span style="color: #006080"&gt;&amp;quot;, &amp;quot;&lt;/span&gt;-&lt;/font&gt;&lt;span style="color: #006080"&gt;&lt;font size="2"&gt;&amp;quot;);&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;                   &lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    using (SPSite site = new SPSite(url))&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    {&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;        SPWebApplication webApp = site.WebApplication;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;        SPSiteCollection siteCol = webApp.Sites;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;        siteCol.Backup(url, bkFileName, true);&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;&amp;#160;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;        //Move the file to destination after creation&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;        File.Move(bkFileName, bkLocation + bkFileName);&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;&amp;#160;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;        operation = true;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    }&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;}&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;catch (Exception ex)&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;{&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    operation = false;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    WritetoEventViewer(&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;font size="2"&gt;Exception(SiteCollection Backup) : &amp;quot; + ex.Message.ToString());&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;}&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;&lt;font size="2"&gt;To delete Site Collection&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;&lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; operation = &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&lt;font size="2"&gt;try&lt;/font&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;{&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;!--CRLF--&gt;&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; (SPSite site = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; SPSite(url))&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    {&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;        &lt;span style="color: #008000"&gt;//Making site accessible if it is made NoAccess&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;        site.WriteLocked = &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;        site.ReadOnly = &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;        site.ReadLocked = &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;&amp;#160;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;        &lt;span style="color: #008000"&gt;//Delete the site&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;        site.Delete();&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;&amp;#160;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;        operation = &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    }&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;}&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;&lt;span style="color: #0000ff"&gt;catch&lt;/span&gt; (Exception ex)&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;{&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    operation = &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;    WritetoEventViewer(&lt;span style="color: #006080"&gt;&amp;quot;Exception(SiteCollection Deletion) : &amp;quot;&lt;/span&gt; + ex.Message.ToString());&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;font size="2"&gt;}&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;strong&gt;&lt;u&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10264057" width="1" height="1"&gt;</description></item><item><title>SharePoint 2010 Performance Dashboard - Farm Content Size Reporting(Post 2/2)</title><link>http://blogs.msdn.com/b/tejasr/archive/2011/10/01/sharepoint-2010-performance-dashboard-farm-content-size-reporting-post-2-2.aspx</link><pubDate>Sat, 01 Oct 2011 19:02:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10264018</guid><dc:creator>-Tejas</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/tejasr/rsscomments.aspx?WeblogPostID=10264018</wfw:commentRss><comments>http://blogs.msdn.com/b/tejasr/archive/2011/10/01/sharepoint-2010-performance-dashboard-farm-content-size-reporting-post-2-2.aspx#comments</comments><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Here I have mentioned the code which can be useful to get the Content DB, Site Collection Usage details.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;     &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;SPFarm farm                 = SPFarm.Local;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;SPWebService service        = farm.Services.GetValue&amp;lt;SPWebService&amp;gt;(&lt;span style="color: #006080"&gt;&amp;quot;&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; webappName       = &lt;span style="color: #006080"&gt;&amp;quot;&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;SPWeb web               = &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;SPUserCollection owners = &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; OwnerString      = &lt;span style="color: #006080"&gt;&amp;quot;&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; count               = 0;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt; (SPWebApplication webapp &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; service.WebApplications)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;{&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    webappName                                  = webapp.Name.ToString();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    SPContentDatabaseCollection DBCollection    = webapp.ContentDatabases;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt; (SPContentDatabase contentDB &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; DBCollection)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #008000"&gt;//ContentDB details &lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        row = &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        row = tableDB.NewRow();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        row[col1] = webappName;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        row[col2] = contentDB.Name.ToString();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            &lt;span style="color: #008000"&gt;//Get the ContentDB size from farm database server&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            SqlConnection con   = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; SqlConnection(contentDB.DatabaseConnectionString.ToString());&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            SqlCommand com      = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; SqlCommand(&lt;span style="color: #006080"&gt;&amp;quot;select Sum(size/128) from sys.database_files&amp;quot;&lt;/span&gt;, con);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            &lt;span style="color: #0000ff"&gt;try&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                con.Open();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                row[col3] = Convert.ToInt64(com.ExecuteScalar());&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                con.Close();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            &lt;span style="color: #0000ff"&gt;catch&lt;/span&gt; (Exception ex)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                WritetoEventViewer(&lt;span style="color: #006080"&gt;&amp;quot;Exception(ContentDB size calculation from farm DB) : &amp;quot;&lt;/span&gt; + ex.Message.ToString());&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            &lt;span style="color: #0000ff"&gt;finally&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                con.Dispose();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        row[col4] = Convert.ToInt64(contentDB.CurrentSiteCount);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        row[col5] = Environment.MachineName;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        tableDB.Rows.Add(row);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #008000"&gt;//Site collection details&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt; (SPSite site &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; contentDB.Sites)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            &lt;span style="color: #0000ff"&gt;try&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                rowSite = &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                rowSite = tableSite.NewRow();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                rowSite[Server]         = Environment.MachineName;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                rowSite[WebApp]         = webappName;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                rowSite[ContentDBName]  = contentDB.Name.ToString();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                rowSite[URL]            = site.Url.ToString();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                rowSite[Size]           = site.Usage.Storage; &lt;span style="color: #008000"&gt;// in bytes&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                rowSite[Quota]          = site.Quota.StorageMaximumLevel; &lt;span style="color: #008000"&gt;// in bytes&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                    &lt;span style="color: #008000"&gt;//Get the Users from site collection's owner group&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                    OwnerString = &lt;span style="color: #006080"&gt;&amp;quot;&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                    web         = site.RootWeb;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                    &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (web.AssociatedOwnerGroup != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                        owners = web.AssociatedOwnerGroup.Users;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                    &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; ((owners != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;) &amp;amp;&amp;amp; (owners.Count &amp;gt; 0))&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                    {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                        count = 0;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                        &lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt; (SPUser user &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; owners)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                        {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                            &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; loginname = user.LoginName.ToString();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                            &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                            &lt;span style="color: #008000"&gt;//To remove extra characters from claims&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                            &lt;span style="color: #0000ff"&gt;if&lt;/span&gt;(loginname.IndexOf(&lt;span style="color: #006080"&gt;&amp;quot;i:0#.w|&amp;quot;&lt;/span&gt;) &amp;gt;= 0)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                                loginname = loginname.Replace(&lt;span style="color: #006080"&gt;&amp;quot;i:0#.w|&amp;quot;&lt;/span&gt;, &lt;span style="color: #006080"&gt;&amp;quot;&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                            &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (count == 0)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                            {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                                OwnerString = loginname;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                                count++;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                            }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                            &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                            {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                                count++;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                                OwnerString = OwnerString + &lt;span style="color: #006080"&gt;&amp;quot;; &amp;quot;&lt;/span&gt; + loginname;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                            }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                        }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                    }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                rowSite[Owner]          = OwnerString;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                rowSite[ReadLocked]     = site.ReadLocked;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                rowSite[ReadOnly]       = site.ReadOnly;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                rowSite[CurrentResourceUsage] = site.CurrentResourceUsage;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                rowSite[WriteLocked]    = site.WriteLocked;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                rowSite[UsageBandwidth] = site.Usage.Bandwidth;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                rowSite[UsageHits]      = site.Usage.Hits;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                rowSite[UsageVisits]    = site.Usage.Visits;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                tableSite.Rows.Add(rowSite);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            &lt;span style="color: #0000ff"&gt;catch&lt;/span&gt; (Exception ex)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                WritetoEventViewer(&lt;span style="color: #006080"&gt;&amp;quot;Exception(Site Collection details collection) : &amp;quot;&lt;/span&gt; + ex.Message.ToString());&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            &lt;span style="color: #0000ff"&gt;finally&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                owners = &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (web != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                    web.Dispose();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (site != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                    site.Dispose();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;}&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10264018" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Code+Samples/">Code Samples</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Coding+Tips/">Coding Tips</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Snippets/">Snippets</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/How+To/">How To</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+2010/">SharePoint 2010</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Object+Model/">Object Model</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+2010+Developer/">SharePoint 2010 Developer</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Custom+Solutions/">Custom Solutions</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Business+Intelligence/">Business Intelligence</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Performance+and+capacity+planning/">Performance and capacity planning</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Visual+Studio/">Visual Studio</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Performance+Monitor/">Performance Monitor</category></item><item><title>SharePoint 2010 Performance Dashboard - Farm Content Size Reporting(Post 1/2)</title><link>http://blogs.msdn.com/b/tejasr/archive/2011/09/01/sharepoint-2010-performance-dashboard-farm-content-size-reporting-post-1-2.aspx</link><pubDate>Thu, 01 Sep 2011 18:46:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10264012</guid><dc:creator>-Tejas</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/tejasr/rsscomments.aspx?WeblogPostID=10264012</wfw:commentRss><comments>http://blogs.msdn.com/b/tejasr/archive/2011/09/01/sharepoint-2010-performance-dashboard-farm-content-size-reporting-post-1-2.aspx#comments</comments><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In this post we will look into how I did “Farm Content Size Reporting” part of the project,&lt;/p&gt;  &lt;p&gt;We have two types of reporting in this functionality.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Content Databases per Web Applications Report&lt;/li&gt;    &lt;li&gt;Site Collections per Content Databases Report&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;This can be useful for a very large size farm and where there could be multiple databases per Web Applications and many Site Collections in each Content Database. This kind of reporting/data is not available OOTB so I developed my own custom utility using SharePoint Object Model which can pull the size data from the farm and can log it into my custom database. I can connect to my custom logging database from my SQL Business Intelligence Project and have the Reports created the way I want. Utility I can schedule on any of the servers in the farm and that can keep pushing the reporting data in my DB. And, at SQL side we can schedule a SQL job which can flush the reporting data from the DB before our utility pushes the new data per the defined schedule.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;&lt;font size="4"&gt;Content Databases per Web Applications Report&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-05-23-metablogapi/1033.1_5F00_375D5023.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="1" border="0" alt="1" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-05-23-metablogapi/4667.1_5F00_thumb_5F00_45D84C48.png" width="813" height="139" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font size="4"&gt;&lt;strong&gt;&lt;u&gt;Site Collections per Content Databases Report&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-05-23-metablogapi/1513.image_5F00_5E87738B.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-05-23-metablogapi/3644.image_5F00_thumb_5F00_73B57933.png" width="826" height="186" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;For my custom DB, I created two tables in my custom DB as below&lt;/p&gt;  &lt;p&gt;Report_SiteCollectionDetails&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-05-23-metablogapi/6443.image_5F00_56EBDE51.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-05-23-metablogapi/8407.image_5F00_thumb_5F00_26E18CD0.png" width="317" height="164" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Report_SiteCollectionDetails&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-05-23-metablogapi/0045.image_5F00_439B01E5.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-05-23-metablogapi/5415.image_5F00_thumb_5F00_39F293AF.png" width="322" height="333" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now that we have got the structure of the reporting and how the components can be integrated, in my next post I will mention a few code snippets to get Content DB &amp;amp; Site Collection size details using SharePoint Object Model.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10264012" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Code+Samples/">Code Samples</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Coding+Tips/">Coding Tips</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/How+To/">How To</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+2010/">SharePoint 2010</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Object+Model/">Object Model</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+2010+Developer/">SharePoint 2010 Developer</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Custom+Solutions/">Custom Solutions</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Business+Intelligence/">Business Intelligence</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Performance+and+capacity+planning/">Performance and capacity planning</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Performance+Monitor/">Performance Monitor</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SQL+Reporting+with+SharePoint/">SQL Reporting with SharePoint</category></item><item><title>SharePoint 2010 Performance Dashboard - Server Performance Reporting(Post 2/2)</title><link>http://blogs.msdn.com/b/tejasr/archive/2011/08/01/sharepoint-2010-performance-dashboard-server-performance-reporting-post-2-2.aspx</link><pubDate>Mon, 01 Aug 2011 17:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10264010</guid><dc:creator>-Tejas</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/tejasr/rsscomments.aspx?WeblogPostID=10264010</wfw:commentRss><comments>http://blogs.msdn.com/b/tejasr/archive/2011/08/01/sharepoint-2010-performance-dashboard-server-performance-reporting-post-2-2.aspx#comments</comments><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Continuing from the &lt;a href="http://blogs.msdn.com/b/tejasr/archive/2011/07/01/sharepoint-2010-performance-dashboard-server-performance-reporting-post-1.aspx" target="_blank"&gt;Post 1&lt;/a&gt;, &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;&lt;font size="4"&gt;Request Workload / Agent&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-05-23-metablogapi/8156.image_5F00_0322A6AB.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-05-23-metablogapi/6428.image_5F00_thumb_5F00_002D41F8.png" width="389" height="314" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Query :&lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;     &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;SELECT&lt;/span&gt;     &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        AgentName, &lt;span style="color: #0000ff"&gt;SUM&lt;/span&gt;(RequestCount) &lt;span style="color: #0000ff"&gt;AS&lt;/span&gt; RequestsCount&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;FROM&lt;/span&gt;         &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        RequestWorkload&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;WHERE&lt;/span&gt;     &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        (LogTime &lt;span style="color: #0000ff"&gt;BETWEEN&lt;/span&gt; GETDATE() - 10 &lt;span style="color: #0000ff"&gt;AND&lt;/span&gt; GETDATE()) &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #0000ff"&gt;AND&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        (AgentName &lt;span style="color: #0000ff"&gt;IN&lt;/span&gt; (&lt;span style="color: #006080"&gt;'Browser'&lt;/span&gt;, &lt;span style="color: #006080"&gt;'Collab'&lt;/span&gt;, &lt;span style="color: #006080"&gt;'ExcelViewer'&lt;/span&gt;, &lt;span style="color: #006080"&gt;'DAV'&lt;/span&gt;, &lt;span style="color: #006080"&gt;'Groove14'&lt;/span&gt;, &lt;span style="color: #006080"&gt;'Excel14'&lt;/span&gt;, &lt;span style="color: #006080"&gt;'Word14'&lt;/span&gt;))&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;GROUP&lt;/span&gt; &lt;span style="color: #0000ff"&gt;BY&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        AgentName&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;ORDER&lt;/span&gt; &lt;span style="color: #0000ff"&gt;BY&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        RequestsCount DESC&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;&lt;font size="4"&gt;Request Duration / Agent&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-05-23-metablogapi/3704.image_5F00_55FD940F.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-05-23-metablogapi/4606.image_5F00_thumb_5F00_4C5525D9.png" width="402" height="307" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Query : &lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;SELECT&lt;/span&gt;     &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #0000ff"&gt;TOP&lt;/span&gt; (10) AgentName, &lt;span style="color: #0000ff"&gt;SUM&lt;/span&gt;(Duration) &lt;span style="color: #0000ff"&gt;AS&lt;/span&gt; Durations&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;FROM&lt;/span&gt;         &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        RequestWorkload&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;WHERE&lt;/span&gt;     &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        (LogTime &lt;span style="color: #0000ff"&gt;BETWEEN&lt;/span&gt; GETDATE() - 10 &lt;span style="color: #0000ff"&gt;AND&lt;/span&gt; GETDATE()) &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #0000ff"&gt;AND&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        (AgentName &lt;span style="color: #0000ff"&gt;IN&lt;/span&gt; (&lt;span style="color: #006080"&gt;'Browser'&lt;/span&gt;, &lt;span style="color: #006080"&gt;'Collab'&lt;/span&gt;, &lt;span style="color: #006080"&gt;'ExcelViewer'&lt;/span&gt;, &lt;span style="color: #006080"&gt;'DAV'&lt;/span&gt;, &lt;span style="color: #006080"&gt;'Groove14'&lt;/span&gt;, &lt;span style="color: #006080"&gt;'Excel14'&lt;/span&gt;, &lt;span style="color: #006080"&gt;'Word14'&lt;/span&gt;))&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;GROUP&lt;/span&gt; &lt;span style="color: #0000ff"&gt;BY&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        AgentName&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;ORDER&lt;/span&gt; &lt;span style="color: #0000ff"&gt;BY&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        Durations DESC&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;u&gt;&lt;font size="3"&gt;UI &amp;amp; Packaging&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="2"&gt;For UI, I have used SQL Reporting services since I wanted to make this as a web based solution rather than any thick client application so it can be accessed by anyone(based on the permissions) at any place. I created a project using SQL Server Business Intelligence Development Studio and hosted it in SharePoint. For setting up reporting services with SharePoint, please refer &lt;a href="http://msdn.microsoft.com/en-us/library/bb326356.aspx" target="_blank"&gt;Configuring Reporting Services for SharePoint 2010 Integration&lt;/a&gt;.&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="2"&gt;Also, Y&lt;/font&gt;&lt;font size="2"&gt;ou may use any of the other methods for reporting like, SharePoint chart controls, Business Connectivity Services(BCS), Custom web parts using ASP.Net chart controls etc…&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="2"&gt;This full solution as a readymade project with configurations &amp;amp; additional features, is available as an offering from &lt;a href="http://www.microsoft.com/microsoftservices/en/us/home.aspx" target="_blank"&gt;Microsoft Premier Services&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="2"&gt;Thank you for Reading!&lt;/font&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10264010" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Coding+Tips/">Coding Tips</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Customization/">Customization</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+2010/">SharePoint 2010</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+2010+Developer/">SharePoint 2010 Developer</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+Foundation+2010/">SharePoint Foundation 2010</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Business+Intelligence/">Business Intelligence</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Performance+and+capacity+planning/">Performance and capacity planning</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+Server+2010/">SharePoint Server 2010</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+Performance+Monitor/">SharePoint Performance Monitor</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+Usage+and+Health+Data+Collection/">SharePoint Usage and Health Data Collection</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SQL+Reporting+with+SharePoint/">SQL Reporting with SharePoint</category></item><item><title>SharePoint 2010 Performance Dashboard - Server Performance Reporting(Post 1/2)</title><link>http://blogs.msdn.com/b/tejasr/archive/2011/07/01/sharepoint-2010-performance-dashboard-server-performance-reporting-post-1.aspx</link><pubDate>Fri, 01 Jul 2011 17:33:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10264004</guid><dc:creator>-Tejas</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/tejasr/rsscomments.aspx?WeblogPostID=10264004</wfw:commentRss><comments>http://blogs.msdn.com/b/tejasr/archive/2011/07/01/sharepoint-2010-performance-dashboard-server-performance-reporting-post-1.aspx#comments</comments><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In this post, I will talk about my SharePoint Performance Dashboard Project. It has mainly two major types of reporting features, Part 1.&amp;#160; CPU Monitor, Memory Monitor, Top Users of the farm, Top Site Collections in the farm and many more and Part 2. List of content database with the size - for each web application, per content database how many site collections are there and what is the quota of each site collection and how much is used out of it.&lt;/p&gt;  &lt;p&gt;So this project was planned in two parts, 1. Server Performance Reporting 2. Farm Content Size Reporting&lt;/p&gt;  &lt;p&gt;Considering the length of the information,&amp;#160; I will divide each part into two posts, so lets start with Part 1. Server Performance Reporting&lt;/p&gt;  &lt;p&gt;For this functionality, We wanted mainly five types of reporting&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;CPU trend in SharePoint servers in the farm for last 10 days &lt;/li&gt;    &lt;li&gt;Memory trend in SharePoint servers in the farm for last 10 days &lt;/li&gt;    &lt;li&gt;Top users of the farm &lt;/li&gt;    &lt;li&gt;Top Site Collections of the farm &lt;/li&gt;    &lt;li&gt;Tools used for the access&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;To begin with, I did my initial research in SharePoint’s Usage and Health data collection functionality. I studied how this functionality is and what type of information it collects. For more information about this functionality, please refer to &lt;a href="http://technet.microsoft.com/en-us/library/ee663480.aspx" target="_blank"&gt;Configure usage and health data collection (SharePoint Server 2010)&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In WSS_Logging database, we have various views available and it really contains very useful information, it’s the data source for our reporting in this part.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-05-23-metablogapi/4478.image_5F00_0FA27D87.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-05-23-metablogapi/1643.image_5F00_thumb_5F00_3E388669.png" width="272" height="514" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Also, I evaluated &lt;a href="http://technet.microsoft.com/en-us/library/hh144782.aspx" target="_blank"&gt;SharePoint Diagnostic Studio 2010 (SPDiag 3.0) (SharePoint Server 2010)&lt;/a&gt;. Based on it and by checking the various views from WSS_logging database I could derive all the necessary SQL queries that are required to get various performance information about each server in the farm.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;&lt;font size="4"&gt;CPU Monitor :&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-05-23-metablogapi/4578.image_5F00_0FD1E932.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-05-23-metablogapi/6138.image_5F00_thumb_5F00_52ED4192.png" width="824" height="161" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Query : &lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;     &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;SELECT&lt;/span&gt;     &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    MachineName, LogTime, &lt;span style="color: #0000ff"&gt;Value&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;FROM&lt;/span&gt;         &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    PerformanceCounters&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;WHERE&lt;/span&gt;    &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;(counterid &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    (&lt;span style="color: #0000ff"&gt;select&lt;/span&gt; id &lt;span style="color: #0000ff"&gt;from&lt;/span&gt; PerformanceCountersDefinitions &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;where&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    category = &lt;span style="color: #006080"&gt;'Processor'&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;and&lt;/span&gt; Machine &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; (&lt;span style="color: #006080"&gt;'sharepoint'&lt;/span&gt;) –- &lt;span style="color: #0000ff"&gt;Add&lt;/span&gt; your server &lt;span style="color: #0000ff"&gt;names&lt;/span&gt; &lt;span style="color: #0000ff"&gt;of&lt;/span&gt; the SharePoint farm here&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    )&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;) &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;and&lt;/span&gt; (LogTime &lt;span style="color: #0000ff"&gt;between&lt;/span&gt; GETDATE() - 10 &lt;span style="color: #0000ff"&gt;and&lt;/span&gt; GETDATE())&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;order&lt;/span&gt; &lt;span style="color: #0000ff"&gt;by&lt;/span&gt; Machinename,logtime&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;&lt;font size="4"&gt;&lt;strong&gt;&lt;u&gt;Memory Monitor&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-05-23-metablogapi/6661.image_5F00_34D3E7D9.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-05-23-metablogapi/8625.image_5F00_thumb_5F00_6369F0BB.png" width="831" height="162" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Query : &lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;SELECT&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    LogTime,    [MachineName], [CounterId]&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    ,(&lt;span style="color: #0000ff"&gt;convert&lt;/span&gt;(&lt;span style="color: #0000ff"&gt;decimal&lt;/span&gt;(10,1),((14336-[&lt;span style="color: #0000ff"&gt;Value&lt;/span&gt;]) / 1024)) / 14) * 100 &lt;span style="color: #006080"&gt;'Value'&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;FROM&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    [PerformanceCounters]&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;where&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;CounterId &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; (    &lt;span style="color: #0000ff"&gt;select&lt;/span&gt; id &lt;span style="color: #0000ff"&gt;from&lt;/span&gt; PerformanceCountersDefinitions &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #0000ff"&gt;where&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        category = &lt;span style="color: #006080"&gt;'Memory'&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #0000ff"&gt;and&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        Machine &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; (&lt;span style="color: #006080"&gt;'sharepoint'&lt;/span&gt;) –- &lt;span style="color: #0000ff"&gt;Add&lt;/span&gt; your server &lt;span style="color: #0000ff"&gt;names&lt;/span&gt; &lt;span style="color: #0000ff"&gt;of&lt;/span&gt; the SharePoint farm here &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;) &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;and&lt;/span&gt; (LogTime &lt;span style="color: #0000ff"&gt;between&lt;/span&gt; GETDATE() - 10 &lt;span style="color: #0000ff"&gt;and&lt;/span&gt; GETDATE())&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;order&lt;/span&gt; &lt;span style="color: #0000ff"&gt;by&lt;/span&gt; [MachineName],[LogTime]&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;&lt;font size="4"&gt;Top Users of the farm&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-05-23-metablogapi/8132.image_5F00_52361318.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-05-23-metablogapi/2845.image_5F00_thumb_5F00_6359CAEE.png" width="813" height="203" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Query : &lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;SELECT&lt;/span&gt;     &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;         &lt;span style="color: #0000ff"&gt;TOP&lt;/span&gt; (10) [Username], &lt;span style="color: #0000ff"&gt;SUM&lt;/span&gt;(RequestCount) &lt;span style="color: #0000ff"&gt;AS&lt;/span&gt; &lt;span style="color: #006080"&gt;'RequestCount'&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;FROM&lt;/span&gt;         &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;         TopUserRequestCount&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;WHERE&lt;/span&gt;     &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;         (LogTime &lt;span style="color: #0000ff"&gt;BETWEEN&lt;/span&gt; GETDATE() - 10 &lt;span style="color: #0000ff"&gt;AND&lt;/span&gt; GETDATE()) &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;GROUP&lt;/span&gt; &lt;span style="color: #0000ff"&gt;BY&lt;/span&gt; UserName&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;ORDER&lt;/span&gt; &lt;span style="color: #0000ff"&gt;BY&lt;/span&gt; &lt;span style="color: #006080"&gt;'RequestCount'&lt;/span&gt; &lt;span style="color: #0000ff"&gt;DESC&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;&lt;font size="4"&gt;Top URL/Site Collection Requests&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-05-23-metablogapi/5670.image_5F00_0DE585FF.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-05-23-metablogapi/1362.image_5F00_thumb_5F00_63B5D816.png" width="833" height="273" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Queries : &lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;SELECT&lt;/span&gt;  &lt;span style="color: #0000ff"&gt;top&lt;/span&gt; 10   &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;SUM&lt;/span&gt;(duration) &lt;span style="color: #0000ff"&gt;AS&lt;/span&gt; requests, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    SiteUrl &lt;span style="color: #0000ff"&gt;AS&lt;/span&gt; Url&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;FROM&lt;/span&gt;         &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    RequestUsage&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;where&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    (LogTime &lt;span style="color: #0000ff"&gt;between&lt;/span&gt; GETDATE() - 10 &lt;span style="color: #0000ff"&gt;and&lt;/span&gt; GETDATE())&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;and&lt;/span&gt; SiteUrl &lt;span style="color: #0000ff"&gt;not&lt;/span&gt; &lt;span style="color: #0000ff"&gt;like&lt;/span&gt; &lt;span style="color: #006080"&gt;'%_vti_bin%'&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;and&lt;/span&gt; SiteUrl &lt;span style="color: #0000ff"&gt;not&lt;/span&gt; &lt;span style="color: #0000ff"&gt;like&lt;/span&gt; &lt;span style="color: #006080"&gt;'%.axd%'&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;and&lt;/span&gt; SiteUrl &lt;span style="color: #0000ff"&gt;not&lt;/span&gt; &lt;span style="color: #0000ff"&gt;like&lt;/span&gt; &lt;span style="color: #006080"&gt;'%.asmx%'&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;and&lt;/span&gt; SiteUrl &lt;span style="color: #0000ff"&gt;not&lt;/span&gt; &lt;span style="color: #0000ff"&gt;like&lt;/span&gt; &lt;span style="color: #006080"&gt;'%office_viewing_service_cache%'&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;and&lt;/span&gt; SiteUrl &lt;span style="color: #0000ff"&gt;not&lt;/span&gt; &lt;span style="color: #0000ff"&gt;like&lt;/span&gt; &lt;span style="color: #006080"&gt;'%_layouts%'&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;GROUP&lt;/span&gt; &lt;span style="color: #0000ff"&gt;BY&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    SiteUrl&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;order&lt;/span&gt; &lt;span style="color: #0000ff"&gt;by&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    requests&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;SELECT&lt;/span&gt; &lt;span style="color: #0000ff"&gt;top&lt;/span&gt; 10&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    Url,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;count&lt;/span&gt;([&lt;span style="color: #0000ff"&gt;Count&lt;/span&gt;]) Visitcount&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;FROM&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    [UrlVisit]&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;where&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    (LogTime &lt;span style="color: #0000ff"&gt;between&lt;/span&gt; (GETDATE() - 10) &lt;span style="color: #0000ff"&gt;and&lt;/span&gt; GETDATE())    &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;and&lt;/span&gt; Url &lt;span style="color: #0000ff"&gt;not&lt;/span&gt; &lt;span style="color: #0000ff"&gt;like&lt;/span&gt; &lt;span style="color: #006080"&gt;'%_vti_bin%'&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;and&lt;/span&gt; Url &lt;span style="color: #0000ff"&gt;not&lt;/span&gt; &lt;span style="color: #0000ff"&gt;like&lt;/span&gt; &lt;span style="color: #006080"&gt;'%.axd%'&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;and&lt;/span&gt; Url &lt;span style="color: #0000ff"&gt;not&lt;/span&gt; &lt;span style="color: #0000ff"&gt;like&lt;/span&gt; &lt;span style="color: #006080"&gt;'%.asmx%'&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;and&lt;/span&gt; Url &lt;span style="color: #0000ff"&gt;not&lt;/span&gt; &lt;span style="color: #0000ff"&gt;like&lt;/span&gt; &lt;span style="color: #006080"&gt;'%office_viewing_service_cache%'&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;and&lt;/span&gt; Url &lt;span style="color: #0000ff"&gt;not&lt;/span&gt; &lt;span style="color: #0000ff"&gt;like&lt;/span&gt; &lt;span style="color: #006080"&gt;'%_layouts%'&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;group&lt;/span&gt; &lt;span style="color: #0000ff"&gt;by&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    Url&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;order&lt;/span&gt; &lt;span style="color: #0000ff"&gt;by&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    Visitcount desc&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;pre class="csharpcode"&gt;&lt;font face="Segoe UI"&gt;Information about the other reporting and how I did the UI part &amp;amp; packaging, I have covered in my next post.&lt;/font&gt;&lt;/pre&gt;

&lt;pre class="csharpcode"&gt;&amp;#160;&lt;/pre&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10264004" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Customization/">Customization</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+2010/">SharePoint 2010</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+2010+Developer/">SharePoint 2010 Developer</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+Foundation+2010/">SharePoint Foundation 2010</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Business+Intelligence/">Business Intelligence</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Performance+and+capacity+planning/">Performance and capacity planning</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+Server+2010/">SharePoint Server 2010</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Performance+Monitor/">Performance Monitor</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/WSS_5F00_Logging+database/">WSS_Logging database</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+Performance+Monitor/">SharePoint Performance Monitor</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+Usage+and+Health+Data+Collection/">SharePoint Usage and Health Data Collection</category></item><item><title>Experience of Configuring Remote Blob Storage (RBS) with SharePoint 2010</title><link>http://blogs.msdn.com/b/tejasr/archive/2011/04/01/experience-of-configuring-remote-blob-storage-rbs-with-sharepoint-2010.aspx</link><pubDate>Fri, 01 Apr 2011 06:34:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10148594</guid><dc:creator>-Tejas</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/tejasr/rsscomments.aspx?WeblogPostID=10148594</wfw:commentRss><comments>http://blogs.msdn.com/b/tejasr/archive/2011/04/01/experience-of-configuring-remote-blob-storage-rbs-with-sharepoint-2010.aspx#comments</comments><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Recently there was a need to configure Remote blob storage(RBS) in our new SharePoint 2010 farm. I had referred a few TechNet &amp;amp; Blog articles to configure it and there were some differences while following the steps, The purpose of this blog is to mention the exact steps and commands we executed to setup RBS is the farm.&lt;/p&gt;  &lt;p&gt;The servers are like this,&lt;/p&gt;  &lt;p&gt;3 Web Front Ends(WFEs)&lt;/p&gt;  &lt;p&gt;2 Application Servers(App Srv)&lt;/p&gt;  &lt;p&gt;Database is SQL 2008 R2&lt;/p&gt;  &lt;p&gt;To begin with, we referred the steps published in this blog post   &lt;br /&gt;&lt;a title="http://blogs.msdn.com/b/sharepointalps/archive/2010/10/06/configure-remote-blob-storage-rbs-with-sharepoint-2010.aspx" href="http://blogs.msdn.com/b/sharepointalps/archive/2010/10/06/configure-remote-blob-storage-rbs-with-sharepoint-2010.aspx"&gt;http://blogs.msdn.com/b/sharepointalps/archive/2010/10/06/configure-remote-blob-storage-rbs-with-sharepoint-2010.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;For overview of RBS in SharePoint Foundation 2010, please read the following article   &lt;br /&gt;&lt;a title="http://technet.microsoft.com/en-us/library/ee748592.aspx" href="http://technet.microsoft.com/en-us/library/ee748592.aspx"&gt;http://technet.microsoft.com/en-us/library/ee748592.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;All the following installations have been done on Microsoft &lt;strong&gt;Windows Server 2008 R2&lt;/strong&gt; and &lt;strong&gt;Microsoft SQL Server 2008 R2&lt;/strong&gt; as there is no support for RBS on Microsoft SQL Server 2005.&lt;/p&gt;  &lt;p&gt;First of all we have to activate &lt;strong&gt;FILESTREAM&lt;/strong&gt; on the SQL instance that you want to put to the BLOB. &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Connect to SQL Server      &lt;br /&gt;&lt;strong&gt;&lt;i&gt;Start –&amp;gt; All Programs –&amp;gt; Microsoft SQL Server 2008 R2 –&amp;gt; Configuration Tools –&amp;gt; SQL Server Configurations Manager&lt;/i&gt;&lt;/strong&gt;&lt;/li&gt;    &lt;li&gt;In the Services list, click “&lt;em&gt;&lt;b&gt;SQL Server Services&lt;/b&gt;&lt;/em&gt;” &lt;/li&gt;    &lt;li&gt;Choose your SQL instance (here “&lt;em&gt;&lt;b&gt;SQL Server (MSSQLSERVER)&lt;/b&gt;&lt;/em&gt;”) and &lt;strong&gt;&lt;em&gt;right click&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;&lt;b&gt;Properties&lt;/b&gt;&lt;/em&gt;. &lt;/li&gt;    &lt;li&gt;Switch to the FILESTREAM tab and check all the available checkboxes &lt;/li&gt;    &lt;li&gt;Click &lt;strong&gt;&lt;i&gt;Apply –&amp;gt; OK &lt;/i&gt;&lt;/strong&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-26-52-metablogapi/0083.image_5F00_21C44CF1.png"&gt;&lt;b&gt;         &lt;br /&gt;&lt;img title="clip_image002" border="0" alt="clip_image002" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-26-52-metablogapi/8863.clip_5F00_image002_5F00_327D6D72.gif" width="538" height="393" /&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;Now start SQL Server Management Studio      &lt;br /&gt;&lt;strong&gt;&lt;i&gt;Start –&amp;gt; All Programs –&amp;gt; Microsoft SQL Server 2008 R2 –&amp;gt;SQL Server Management Studio&lt;/i&gt;&lt;/strong&gt;&lt;/li&gt;    &lt;li&gt;Open a query windows and start the following SQL statement      &lt;br /&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-26-52-metablogapi/4572.image43_5F00_2A0EBE78.png"&gt;&lt;b&gt;&lt;img title="clip_image004" border="0" alt="clip_image004" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-26-52-metablogapi/8688.clip_5F00_image004_5F00_11516166.gif" width="546" height="176" /&gt;&lt;/b&gt;&lt;/a&gt;      &lt;br /&gt;&lt;em&gt;For easier reference, just copy the text below&lt;/em&gt;      &lt;hr align="center" size="2" width="100%" /&gt; &lt;strong&gt;&lt;i&gt;EXEC sp_configure filestream_access_level, 2 &lt;/i&gt;&lt;/strong&gt;&lt;b&gt;&lt;i&gt;         &lt;br /&gt;&lt;strong&gt;RECONFIGURE           &lt;br /&gt;&lt;/strong&gt;&lt;/i&gt;&lt;/b&gt;&lt;strong&gt;&lt;i&gt;         &lt;hr align="center" size="2" width="100%" /&gt;&lt;/i&gt;&lt;/strong&gt;&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;This was the first step, FILESTREAM is now successfully activated.&lt;/p&gt;  &lt;p&gt;All further steps requires SharePoint to be installed properly and that a Web Application has already been created. The Content Database in this case I created by PowerShell: &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Connect to a server (App Srv1 – I chose this server since it hosts Central Admin but it’s not mandatory, you may run this command from any SharePoint server)     &lt;br /&gt;&lt;em&gt;&lt;b&gt;Start –&amp;gt; Microsoft SharePoint 2010 Products –&amp;gt; SharePoint 2010 Management Shell&lt;/b&gt;&lt;/em&gt;      &lt;br /&gt;Create a Content Database       &lt;br /&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-26-52-metablogapi/7167.image45_5F00_2F71EF3E.png"&gt;&lt;b&gt;&lt;img title="clip_image006" border="0" alt="clip_image006" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-26-52-metablogapi/8765.clip_5F00_image006_5F00_6C23F12C.gif" width="546" height="275" /&gt;&lt;/b&gt;&lt;/a&gt;      &lt;br /&gt;&lt;em&gt;For easier reference, just copy the text below&lt;/em&gt;      &lt;hr align="center" size="2" width="100%" /&gt; &lt;em&gt;&lt;b&gt;New-SPContentDatabase –name WSS_Content_Blob_001 –WebApplication &lt;/b&gt;&lt;/em&gt;&lt;a href="http://0"&gt;&lt;em&gt;&lt;b&gt;&lt;a href="http://tejas"&gt;http://&lt;/a&gt;&lt;/b&gt;&lt;/em&gt;tejas&lt;/a&gt;&lt;em&gt;&lt;b&gt; –MaxSiteCount 1 –WarningSiteCount 0 &lt;/b&gt;&lt;/em&gt;&lt;em&gt;&lt;b&gt;         &lt;hr align="center" size="2" width="100%" /&gt;&lt;/b&gt;&lt;/em&gt;&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Now the new content database (in this case “WSS_Content_Blob_001”) has to be prepared for use with FILESTREAM. &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Connect to your SQL Server      &lt;br /&gt;&lt;strong&gt;&lt;i&gt;Start –&amp;gt; All Programs –&amp;gt; Microsoft SQL Server 2008 R2 –&amp;gt;SQL Server Management Studio&lt;/i&gt;&lt;/strong&gt;&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Open a query and execute the statement below. Replace “C:\Blobstore“ by your storage-path. The directory must not exist when executing the statement, otherwise an error will be given.    &lt;br /&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-26-52-metablogapi/7701.image23_5F00_4F61A44F.png"&gt;&lt;b&gt;&lt;img title="clip_image008" border="0" alt="clip_image008" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-26-52-metablogapi/6710.clip_5F00_image008_5F00_1830C851.gif" width="601" height="265" /&gt;&lt;/b&gt;&lt;/a&gt;    &lt;br /&gt;&lt;em&gt;For easier reference, just copy the text below      &lt;br /&gt;&lt;/em&gt;&lt;/p&gt;  &lt;hr align="center" size="2" width="100%" /&gt;&lt;em&gt;&lt;b&gt;use [WSS_Content_Blob_001] &lt;/b&gt;&lt;/em&gt;&lt;b&gt;&lt;i&gt;     &lt;br /&gt;&lt;em&gt;if not exists (select * from sys.symmetric_keys where name = N'##MS_DatabaseMasterKey##')create master key encryption by password = N'Admin Key Password !2#4'&lt;/em&gt;&lt;/i&gt;&lt;/b&gt;  &lt;hr align="center" size="2" width="100%" /&gt;  &lt;p&gt;&lt;em&gt;&lt;b&gt;use [WSS_Content_Blob_001] &lt;/b&gt;&lt;/em&gt;&lt;b&gt;&lt;i&gt;       &lt;br /&gt;&lt;em&gt;if not exists (select groupname from sysfilegroups where groupname=N'RBSFilestreamProvider')alter database [WSS_Content_Blob_001] add filegroup RBSFilestreamProvider contains filestream&lt;/em&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;  &lt;hr align="center" size="2" width="100%" /&gt;  &lt;p&gt;&lt;em&gt;&lt;b&gt;use [WSS_Content_Blob_001] &lt;/b&gt;&lt;/em&gt;&lt;b&gt;&lt;i&gt;       &lt;br /&gt;&lt;em&gt;alter database [WSS_Content_Blob_001] add file (name = RBSFilestreamFile, filename = 'c:\Blob_001') to filegroup RBSFilestreamProvider &lt;/em&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;  &lt;hr align="center" size="2" width="100%" /&gt;  &lt;p&gt;Now the direcory for the Blobstore has been created in “&lt;strong&gt;C:\Blob_001&lt;/strong&gt;”&lt;/p&gt;  &lt;p&gt;Next you have to &lt;a href="http://go.microsoft.com/fwlink/?LinkID=188395&amp;amp;clcid=0x409"&gt;download&lt;/a&gt; the EXE for RBS, and it has to be copied to each Web Frontend Servers &amp;amp; in App Servers (please, do not rename the file). During all the following steps mind checking the log files for errors. &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Connect to the Web Front End hosting the Central Admin Console &lt;/li&gt;    &lt;li&gt;Open a Command Prompt (IMPORTANT -&amp;gt; run with elevated permissions) &lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-26-52-metablogapi/6648.image_5F00_419EC27A.png"&gt;&lt;b&gt;         &lt;br /&gt;&lt;img title="clip_image010" border="0" alt="clip_image010" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-26-52-metablogapi/8204.clip_5F00_image010_5F00_24524278.gif" width="407" height="500" /&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;Change to the directory containing the previously downloaded RBS.exe &lt;/li&gt;    &lt;li&gt;Delete or rename a already existing „rbs_install_log.txt“ if applicable. &lt;/li&gt;    &lt;li&gt;Run the following command, replace DBNAME with your content database and DBINSTANCE with your SQL instance. Mind that this command only works once, if you want to configure a second database, chose the option “&lt;strong&gt;&lt;em&gt;Configure additional database&lt;/em&gt;&lt;/strong&gt;” (see below).&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;strong&gt;[We executed this command in App Server1 &amp;amp; App Server2]&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;   &lt;hr align="center" size="2" width="100%" /&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;i&gt;msiexec /qn /lvx* rbs_install_log.txt /i RBS.msi TRUSTSERVERCERTIFICATE=true FILEGROUP=PRIMARY DBNAME=&amp;quot;WSS_Content_Blob_001&amp;quot; DBINSTANCE=&amp;quot;DC&amp;quot; FILESTREAMFILEGROUP=RBSFilestreamProvider FILESTREAMSTORENAME=FilestreamProvider_1&lt;/i&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;   &lt;hr align="center" size="2" width="100%" /&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;After this process has completed (it may take a minute or two, the log reads “Verbose Logging stopped”), check the “rbs_install_log.txt” if it contains the following line of text (it should be approximately 21 lines before the end of the file:      &lt;hr align="center" size="2" width="100%" /&gt;&lt;em&gt;&lt;b&gt;&amp;quot;Product: SQL Remote Blob Storage -- Configuration completed successfully&amp;quot;          &lt;br /&gt;&lt;/b&gt;&lt;/em&gt;      &lt;hr align="center" size="2" width="100%" /&gt;      &lt;br /&gt;If that is not the case you have an issue. Check the following:       &lt;br /&gt;- Are you in the right directory       &lt;br /&gt;- Did you make a typo       &lt;br /&gt;- Did you run the prompt with elevated privileges &lt;/li&gt;    &lt;li&gt;If you have more than one WFE in your farm, you now have to change to the other servers and run the following command:      &lt;br /&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-26-52-metablogapi/5518.image_5F00_3CF891F3.png"&gt;&lt;b&gt;&lt;img title="clip_image012" border="0" alt="clip_image012" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-26-52-metablogapi/5148.clip_5F00_image012_5F00_465A9E3E.gif" width="575" height="287" /&gt;&lt;/b&gt;&lt;/a&gt;      &lt;br /&gt;&lt;em&gt;For easier reference, just copy the text below &lt;strong&gt;(Please note that we have included “ServerScript” here &amp;amp; we executed it in all 3 WFEs)&lt;/strong&gt;&lt;/em&gt;      &lt;hr align="center" size="2" width="100%" /&gt; &lt;em&gt;&lt;b&gt;msiexec /qn /lvx* rbs_install_log.txt /i RBS.msi DBNAME=&amp;quot;WSS_Content_Blob_001&amp;quot; DBINSTANCE=&amp;quot;DC&amp;quot; ADDLOCAL=&amp;quot;Client,Docs,Mai&lt;/b&gt;&lt;/em&gt;&lt;em&gt;&lt;b&gt;ntainer,ServerScript,FilestreamClient,FilestreamServer&amp;quot;&lt;/b&gt;&lt;/em&gt;      &lt;hr align="center" size="2" width="100%" /&gt;&lt;/li&gt;    &lt;li&gt;Check the “rbs_install_log.txt” if it contains the following line of text (it should be approximately 21 lines before the end of the file:      &lt;hr align="center" size="2" width="100%" /&gt;&lt;em&gt;&lt;b&gt;&amp;quot;Product: SQL Remote Blob Storage -- Configuration completed successfully&amp;quot;&lt;/b&gt;&lt;/em&gt;      &lt;hr align="center" size="2" width="100%" /&gt;&lt;/li&gt;    &lt;li&gt;Execute all steps from step 7 on every additional WFE. This is mandatory, otherwise problems might occur. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;The script has created a few tables in the database, check if they are existing: &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Connect to SQL Server      &lt;br /&gt;&lt;strong&gt;&lt;i&gt;Start –&amp;gt; All Programs –&amp;gt; Microsoft SQL Server 2008 R2 –&amp;gt;SQL Server Management Studio&lt;/i&gt;&lt;/strong&gt;&lt;/li&gt;    &lt;li&gt;Execute the following query      &lt;br /&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-26-52-metablogapi/5518.image_5F00_7960E0D0.png"&gt;&lt;b&gt;&lt;img title="clip_image014" border="0" alt="clip_image014" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-26-52-metablogapi/0755.clip_5F00_image014_5F00_00696B1E.gif" width="557" height="290" /&gt;&lt;/b&gt;&lt;/a&gt;      &lt;br /&gt;&lt;em&gt;For easier reference, just copy the text below&lt;/em&gt;      &lt;hr align="center" size="2" width="100%" /&gt; &lt;em&gt;&lt;b&gt;use WSS_Content_Blob_001 &lt;/b&gt;&lt;/em&gt;&lt;b&gt;&lt;i&gt;         &lt;br /&gt;&lt;em&gt;select * from dbo.sysobjects &lt;/em&gt;          &lt;br /&gt;&lt;em&gt;where name like ‘rbs%’&lt;/em&gt;&lt;/i&gt;&lt;/b&gt;      &lt;hr align="center" size="2" width="100%" /&gt;&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;The result should show the RBS tables. This may take a while.&lt;/p&gt;  &lt;p&gt;As one last step you have to tell SharePoint that the content database uses RBS. To do that you have to execute the following command: &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Connect to WFE      &lt;br /&gt;&lt;em&gt;&lt;b&gt;Start –&amp;gt; Microsoft SharePoint 2010 Products –&amp;gt; SharePoint 2010 Management Shell&lt;/b&gt;&lt;/em&gt;&lt;/li&gt;    &lt;li&gt;Execute the following commands in sequence:      &lt;br /&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-26-52-metablogapi/5224.image_5F00_5765587F.png"&gt;&lt;b&gt;&lt;img title="clip_image016" border="0" alt="clip_image016" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-26-52-metablogapi/4075.clip_5F00_image016_5F00_10953317.gif" width="601" height="260" /&gt;&lt;/b&gt;&lt;/a&gt;      &lt;br /&gt;&lt;em&gt;For easier reference, just copy the text below&lt;/em&gt;      &lt;hr align="center" size="2" width="100%" /&gt; &lt;em&gt;&lt;b&gt;$cdb = Get-SPContentDatabase WSS_Content_Blob_001         &lt;br /&gt;&lt;/b&gt;&lt;/em&gt;&lt;em&gt;&lt;b&gt;         &lt;hr align="center" size="2" width="100%" /&gt;          &lt;br /&gt;&lt;/b&gt;&lt;/em&gt;&lt;em&gt;&lt;b&gt;$rbss = $cdb.RemoteBlobStorageSettings &lt;/b&gt;&lt;/em&gt;&lt;em&gt;&lt;b&gt;         &lt;hr align="center" size="2" width="100%" /&gt;          &lt;br /&gt;&lt;/b&gt;&lt;/em&gt;&lt;em&gt;&lt;b&gt;$rbss.Installed() &lt;/b&gt;&lt;/em&gt;&lt;em&gt;&lt;b&gt;         &lt;hr align="center" size="2" width="100%" /&gt;          &lt;br /&gt;&lt;/b&gt;&lt;/em&gt;&lt;em&gt;&lt;b&gt;$rbss.Enable()         &lt;br /&gt;&lt;/b&gt;&lt;/em&gt;&lt;em&gt;&lt;b&gt;         &lt;hr align="center" size="2" width="100%" /&gt;          &lt;br /&gt;&lt;/b&gt;&lt;/em&gt;&lt;em&gt;&lt;b&gt;$rbss.SetActiveProviderName($rbss.GetProviderNames()[0])&lt;/b&gt;&lt;/em&gt;      &lt;hr align="center" size="2" width="100%" /&gt; &lt;em&gt;&lt;b&gt;$rbss&lt;/b&gt;&lt;/em&gt;&lt;em&gt;&lt;b&gt;         &lt;br /&gt;&lt;/b&gt;&lt;/em&gt;      &lt;hr align="center" size="2" width="100%" /&gt;&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Since all has been prepared we can check the functionality. Just create a site collection and make sure the content database used is “&lt;strong&gt;&lt;em&gt;WSS_Content_Blob_001&lt;/em&gt;&lt;/strong&gt;”. (or whatever you chose during install). &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Connect to WFE      &lt;br /&gt;&lt;em&gt;&lt;b&gt;Start –&amp;gt; Microsoft SharePoint 2010 Products –&amp;gt; SharePoint 2010 Central Administration&lt;/b&gt;&lt;/em&gt;&lt;/li&gt;    &lt;li&gt;Application Management – Manage Content Databases &lt;/li&gt;    &lt;li&gt;Choose the applicable Web Application &lt;/li&gt;    &lt;li&gt;Configure the Content Database to put the next site collection to &lt;em&gt;&lt;strong&gt;“WSS_Content_Blob_001”&lt;/strong&gt;&lt;/em&gt;      &lt;br /&gt;– If you have multiple databases, set “Maximum Number of Site Collections” to the current value       &lt;br /&gt;– “&lt;strong&gt;&lt;em&gt;WSS_Content_Blob_001&lt;/em&gt;&lt;/strong&gt;” should not contain any site collections &lt;/li&gt;    &lt;li&gt;Go back to the main site of &lt;em&gt;&lt;b&gt;Central Administration&lt;/b&gt;&lt;/em&gt;&lt;/li&gt;    &lt;li&gt;&lt;em&gt;&lt;b&gt;Application Management – Create Site Collection&lt;/b&gt;&lt;/em&gt;      &lt;br /&gt;- Enter all the required data       &lt;br /&gt;- OK &lt;/li&gt;    &lt;li&gt;As soon as the site collection creation is finished, all newly uploaded documents should be created in the file system. &lt;/li&gt; &lt;/ol&gt;  &lt;h5&gt;Notice: &lt;/h5&gt;  &lt;p&gt;Documents below 100 kB will not be put to the file system but will be stored in the database.&lt;/p&gt;  &lt;h5&gt;Configure additional content databases:&lt;/h5&gt;  &lt;p&gt;If you want to configure more than one content database for RBS, all the steps above have to be executed. The only difference is the command in step 5. This one dies not work, and no RBS tables are created. Therefore use the command below:&lt;/p&gt;  &lt;hr align="center" size="2" width="100%" /&gt;  &lt;p&gt;&lt;em&gt;&lt;strong&gt;msiexec /qn /i rbs.msi REMOTEBLOBENABLE=1 FILESTREAMPROVIDERENABLE=1 DBNAME=WSS_Content_Blob_002 FILESTREAMSTORENAME=FilestreamProvider_1 ADDLOCAL=EnableRBS,FilestreamRunScript DBINSTANCE=CD        &lt;br /&gt;&lt;/strong&gt;&lt;/em&gt;&lt;em&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;strong&gt;&lt;/strong&gt;      &lt;hr align="center" size="2" width="100%" /&gt;         &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;strong&gt;Info about Backup:&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;If a content database is set to use the SQL FILESTREAM remote BLOB storage (RBS) provider, the RBS provider must be installed both on the database server that is being backed up and on the database server that is being recovered to.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10148594" width="1" height="1"&gt;</description></item><item><title>Experience of upgrading Terabytes(TB) of MOSS2007 farm to SP2</title><link>http://blogs.msdn.com/b/tejasr/archive/2011/03/21/experience-of-upgrading-terabytes-tb-of-moss2007-farm-to-sp2.aspx</link><pubDate>Mon, 21 Mar 2011 23:19:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10146378</guid><dc:creator>-Tejas</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/tejasr/rsscomments.aspx?WeblogPostID=10146378</wfw:commentRss><comments>http://blogs.msdn.com/b/tejasr/archive/2011/03/21/experience-of-upgrading-terabytes-tb-of-moss2007-farm-to-sp2.aspx#comments</comments><description>&lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;Few weeks ago I had visited a customer regarding the MOSS2007 SP2 upgrade. Their total size of the data in MOSS was in Terabytes and at the same time it was a business critical platform where multiple teams were depended on the SharePoint for their daily work. After observing the farm, I came to know that there were lots of customizations deployed in the farm and also we had a challenge that customer’s IT department didn’t know completely what all components, custom code, files and configuration changes are deployed in the farm. Considering these challenges in mind, it was absolutely required that we plan the SP2 upgrade very carefully. We did the dry run in staging environment which had a closest environment to production and it went successfully. However, while doing the upgrade in production environment, we did face some runtime problems and we had to resolve them well within the time limit as every single min was precious. Here is how our plan was and I have also documented at which point we faced the issues and how we resolved them. I am putting this complete exercise here so that someone in a similar situation, can benefit from this post.&lt;/font&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font color="#333333" size="2" face="Tahoma"&gt;Servers in farm&lt;/font&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;     &lt;div align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;WFE1 &lt;/font&gt;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;WFE2 &lt;/font&gt;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;APP Server1(CA Hosted) &lt;/font&gt;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;APP Server2(Indexing) &lt;/font&gt;&lt;/div&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;To begin with, I had referenced the following articles which talk about how you should plan the steps for the upgrade.&lt;/font&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://technet.microsoft.com/en-us/library/cc263467(office.12).aspx"&gt;&lt;font size="2" face="Tahoma"&gt;http://technet.microsoft.com/en-us/library/cc263467(office.12).aspx&lt;/font&gt;&lt;/a&gt;&lt;font size="2" face="Tahoma"&gt;&amp;#160;&lt;/font&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a title="http://blogs.architectingconnectedsystems.com/blogs/cjg/archive/2009/05/10/How-to-upgrade-to-SharePoint-2007-SP2-_2D00_-Step-by-Step.aspx" href="http://blogs.architectingconnectedsystems.com/blogs/cjg/archive/2009/05/10/How-to-upgrade-to-SharePoint-2007-SP2-_2D00_-Step-by-Step.aspx"&gt;&lt;font size="2" face="Tahoma"&gt;http://blogs.architectingconnectedsystems.com/blogs/cjg/archive/2009/05/10/How-to-upgrade-to-SharePoint-2007-SP2-_2D00_-Step-by-Step.aspx&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;Here is how we went&lt;/font&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;&lt;strong&gt;Task 1 – Check disk space on the servers&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;b&gt;&lt;font size="2" face="Tahoma"&gt;Task 2 – Backup the databases (truncate and backup)&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;ol&gt;     &lt;li&gt;       &lt;div align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;Create a backup folder (“D:\Backups”) &amp;amp;&amp;#160; ensure that you have enough disk space to save all your backups to this location (add the size of each database to determine how much you will need)&lt;/font&gt;&lt;/div&gt;     &lt;/li&gt;      &lt;li&gt;       &lt;div align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;Run the following commands TWICE for each database (this will shrink, backup and truncate your database and log files):&lt;/font&gt;&lt;/div&gt;        &lt;ul&gt;         &lt;li&gt;           &lt;div align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;WSS_Content*&lt;/font&gt;&lt;/div&gt;         &lt;/li&gt;          &lt;li&gt;           &lt;div align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;WSS_Search*&lt;/font&gt;&lt;/div&gt;         &lt;/li&gt;          &lt;li&gt;           &lt;div align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;SharePoint_Config&lt;/font&gt;&lt;/div&gt;         &lt;/li&gt;          &lt;li&gt;           &lt;div align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;SharedServices*&lt;/font&gt;&lt;/div&gt;         &lt;/li&gt;       &lt;/ul&gt;     &lt;/li&gt;   &lt;/ol&gt; &lt;/ol&gt;  &lt;blockquote&gt;   &lt;div align="justify"&gt;     &lt;table border="0" cellspacing="0" cellpadding="0"&gt;&lt;tbody&gt;         &lt;tr&gt;           &lt;td width="541"&gt;             &lt;p&gt;&lt;font size="2" face="Tahoma"&gt;use WSS_Content&lt;/font&gt;&lt;/p&gt;              &lt;p&gt;&lt;font size="2" face="Tahoma"&gt;dbcc shrinkfile ('WSS_Content')                  &lt;br /&gt;dbcc shrinkfile ('WSS_Content_log')                   &lt;br /&gt;go&lt;/font&gt;&lt;/p&gt;              &lt;p&gt;&lt;font size="2" face="Tahoma"&gt;backup database WSS_Content to disk = 'D:\backups\wss_content.bak'                  &lt;br /&gt;go                   &lt;br /&gt;backup log WSS_Content to disk = 'D:\backups\wss_content.bak'                   &lt;br /&gt;go&lt;/font&gt;&lt;/p&gt;              &lt;p&gt;&lt;font size="2" face="Tahoma"&gt;dbcc shrinkfile ('WSS_Content')                  &lt;br /&gt;dbcc shrinkfile ('WSS_Content_log')                   &lt;br /&gt;go&lt;/font&gt;&lt;/p&gt;           &lt;/td&gt;         &lt;/tr&gt;       &lt;/tbody&gt;&lt;/table&gt;   &lt;/div&gt; &lt;/blockquote&gt; &lt;b&gt;&lt;font face="Tahoma"&gt;     &lt;p align="justify"&gt;       &lt;br /&gt;&lt;/p&gt;     &lt;font size="2"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;  &lt;p align="justify"&gt;&lt;b&gt;&lt;font size="2" face="Tahoma"&gt;Task 3 – Evaluate Database Size&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;Make sure you are in the supported boundary and in case you need to shift any site collection in any additional Database please do so.&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p align="justify"&gt;&lt;b&gt;&lt;font size="2" face="Tahoma"&gt;Task 4 – Prepare to move&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;Large farm optimization&lt;/font&gt;&lt;/p&gt;    &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;In very large server farms, installing a software update with the content databases attached can result in too much in too much downtime. If there are multiple sites or many Web servers, then to minimize the downtime required to upgrade, we recommend that you perform the additional steps of running the Stsadm preparetomove operation from the command prompt and then detach the content databases.&lt;/font&gt;&lt;/p&gt;    &lt;p align="justify"&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;For best performance with the upgrade operations, use four or five front-end Web servers per database server. You must configure alternate access mappings on these temporary front-end Web servers to match the original servers. If the alternate access mappings are not identical, the content databases might be upgraded with the wrong URLs within their site content. This results in the inaccurate display of certain pages; you must contact Microsoft Product Services to correct the problem.&lt;b&gt; &lt;/b&gt;&lt;b&gt;&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;To prepare to move the content databases&lt;/font&gt;&lt;/p&gt;    &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;1. In Windows Server 2003, open a Command Prompt window and navigate to the %COMMONPROGRAMFILES%\Microsoft Shared\Web server extensions\12\Bin directory, which usually contains the Stsadm command-line tool.&lt;/font&gt;&lt;/p&gt;    &lt;p align="justify"&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;&lt;b&gt;2. &lt;/b&gt;Before you detach the databases, you must run the Stsadm preparetomove operation to ensure that the content database is included in the membership and profile synchronization after you reattach the content database. At the command prompt, type the following command:&lt;b&gt;&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p align="justify"&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;&lt;b&gt;stsadm -o preparetomove -contentDB &lt;i&gt;&amp;lt;database_server:database_name&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;b&gt;&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;Note: If you do not run this operation before you detach the content database, then the membership and profile information in the content database is static and is not synchronized after upgrade.&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p align="justify"&gt;&lt;b&gt;&lt;font size="2" face="Tahoma"&gt;Task 5 – Detach the content databases&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;We had created a batch files with detach command for all the content databases. Config databases and SSP databases were remained attached to the farm.&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p align="justify"&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;&lt;b&gt;stsadm -o deletecontentdb -url http://&lt;/b&gt;&lt;i&gt;computername&lt;/i&gt;&lt;b&gt;–databasename&lt;/b&gt;&lt;i&gt;ContentDatabaseName&lt;/i&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p align="justify"&gt;&lt;b&gt;&lt;font size="2" face="Tahoma"&gt;Task 6 – Backup important files&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;We had taken an exact synch backup of all the servers in the farm on a separate datacenter so we don’t miss any file on the servers.&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p align="justify"&gt;&lt;b&gt;&lt;font size="2" face="Tahoma"&gt;Task 7 – Disconnect users from the server farm &lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;Disconnect users from the server farm by stopping the World Wide Web Publishing Service (W3SVC) on all Web servers.&lt;/font&gt;&lt;/p&gt;    &lt;p align="justify"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/5100.clip_5F00_image001_5F00_71E1309B.gif"&gt;&lt;font size="2" face="Tahoma"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image001" border="0" alt="clip_image001" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/3060.clip_5F00_image001_5F00_thumb_5F00_0C1173F3.gif" width="10" height="10" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;&lt;b&gt;Note: &lt;/b&gt;This manual step is done as a precaution to ensure that the service is fully stopped.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;Stop IIS&lt;/font&gt;&lt;/p&gt;    &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;o Open a command prompt, run “iisreset /stop”&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p align="justify"&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;&lt;b&gt;Task 8 - Download and install the appropriate Windows SharePoint Services 3.0 software update for all servers in your server farm.&lt;/b&gt;&lt;b&gt;&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;We installed in the order, App Server1, App Server2, WFE1 &amp;amp; WFE2&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p align="justify"&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;&lt;b&gt;Task 9 - Download and install the appropriate Office SharePoint Server 2007 software update for all servers in your server farm.&lt;/b&gt;&lt;b&gt;&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;We installed in the order, App Server1, App Server2, WFE1 &amp;amp; WFE2&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p align="justify"&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;&lt;b&gt;Note: &lt;/b&gt;You can run the SharePoint Products and Technologies Configuration Wizard after you install the update on Windows SharePoint Services and again after you install the update on Office SharePoint Server. Or, you can run the wizard once after you install all the packages.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p align="justify"&gt;&lt;b&gt;&lt;font size="2" face="Tahoma"&gt;Task 10 – PSConfig &lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;1. At the end of the software update installation, the SharePoint Products and Technologies Configuration Wizard starts.&lt;/font&gt;&lt;/p&gt;    &lt;p align="justify"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/8540.clip_5F00_image0011_5F00_158A3269.gif"&gt;&lt;font size="2" face="Tahoma"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image001[1]" border="0" alt="clip_image001[1]" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/2376.clip_5F00_image0011_5F00_thumb_5F00_1AF8A30D.gif" width="10" height="10" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;&lt;b&gt;Note: &lt;/b&gt;If the wizard does not start automatically, click &lt;b&gt;Start&lt;/b&gt;, point to &lt;b&gt;All Programs&lt;/b&gt;, point to &lt;b&gt;Administrative Tools&lt;/b&gt;, and then click &lt;b&gt;SharePoint Products and Technologies Configuration Wizard&lt;/b&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;2. On the SharePoint Products and Technologies Configuration Wizard Welcome page, click &lt;b&gt;Next&lt;/b&gt;.&lt;/font&gt;&lt;/p&gt;    &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;3. In the dialog box that notifies you that some services might have to be restarted during configuration, click &lt;b&gt;Yes&lt;/b&gt;.&lt;/font&gt;&lt;/p&gt;    &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;4. On the &lt;b&gt;Completing the SharePoint Products and Technologies Configuration Wizard&lt;/b&gt; page, click &lt;b&gt;Next&lt;/b&gt;.&lt;/font&gt;&lt;/p&gt;    &lt;p align="justify"&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;5. When the dialog box about installation in a server farm opens, do not click &lt;b&gt;OK&lt;/b&gt;. Instead, leave each server with the following dialog box displayed: &lt;b&gt;You must run Setup to install new binary files for every server in your server farm. If you have multiple servers in your server farm, run Setup and the configuration wizard on the other servers now, and then return to this server and click OK to continue.&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;6. When the dialog box from the previous step is displayed on all the application servers and Web servers in the server farm, use one Web server that hosts the Central Administration Web site to finalize the installation.&lt;/font&gt;&lt;/p&gt;    &lt;p align="justify"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/3365.clip_5F00_image0012_5F00_206713B1.gif"&gt;&lt;font size="2" face="Tahoma"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image001[2]" border="0" alt="clip_image001[2]" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/0726.clip_5F00_image0012_5F00_thumb_5F00_77E8319C.gif" width="10" height="10" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;&lt;b&gt;Note: &lt;/b&gt;Microsoft recommends that you first install the software update on an application server that is hosting the Central Administration Web site, then on the other application servers, and finally on the front-end Web servers. If you are hosting your Central Administration Web site on a front-end Web server, it is recommended that you first install the software update on the front-end Web server that is hosting the Central Administration Web site, then on the application servers, and finally on the remaining front-end Web servers.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;7. On the server you selected in the previous step, click &lt;b&gt;OK&lt;/b&gt;.&lt;/font&gt;&lt;/p&gt;    &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;8. In the Configuration Successful dialog box, click &lt;b&gt;Finish&lt;/b&gt;.&lt;/font&gt;&lt;/p&gt;    &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;9. After you finish updating one Web server that hosts the Central Administration Web site, follow the procedures in the &lt;/font&gt;&lt;a href="http://technet.microsoft.com/en-us/library/#section4d"&gt;&lt;font size="2" face="Tahoma"&gt;Verify update completion and success&lt;/font&gt;&lt;/a&gt;&lt;font size="2" face="Tahoma"&gt; section in this article to ensure that the software update installation on this one Web server was successful.&lt;/font&gt;&lt;/p&gt;    &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;10. Continue updating the remaining computers in the server farm, one at a time, by clicking &lt;b&gt;OK &lt;/b&gt;in the dialog box.&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p align="justify"&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;&lt;strong&gt;Now this is the step where we faced some runtime issues&lt;/strong&gt;, We began with App Server1(CA), and PSConfig failed with an error, “The B2B upgrader timer job failed”. An exception of type Microsoft.SharePoint.PostSetupConfiguration.PostSetupConfigurationTaskException was thrown.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;We did the initial internet search for this exception but no any articles and resolutions seem to be matching to our situation and then we figured out by analyzing upgrade logs in detail that one of our SSP DBs was in “Read only” &amp;amp; PSConfig was failing at that DB. We made it “Read-Write” and PSConfig went passed that DB but failed again with the same exception and then same way by looking into upgrade logs we figured out that there was one more Content DB which was in “Read only”. We made that DB also in “Read-Write” &amp;amp; finally third time PSConfig finished successfully. Big Relief&lt;/font&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/8168.clip_5F00_image002_5F00_7D56A240.png"&gt;&lt;font size="2" face="Tahoma"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/1616.clip_5F00_image002_5F00_thumb_5F00_43675F54.png" width="23" height="23" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;Second, we ran PSConfig in App Server2 and it finished successfully.&lt;/font&gt;&lt;/p&gt;    &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;Third, We started on WFE1 and again boom, it kept on running for more than half an hour at one step in middle and continuously it was writing a message in upgrade log file, “&lt;/font&gt;&lt;a href="http://geekswithblogs.net/SharePointCherie/archive/2009/12/22/error-in-upgrade-log-syncupgradetimerjob-sleeping-for-10-seconds.aspx"&gt;&lt;font size="2" face="Tahoma"&gt;SyncUpgradeTimerJob: sleeping for 10 seconds&lt;/font&gt;&lt;/a&gt;&lt;font size="2" face="Tahoma"&gt;”. So we monitored this message for 5-10 min and then decided to kill PSConfig wizard from task manager. For this exception we found a good resolution steps from,&lt;/font&gt;&lt;/p&gt;    &lt;p align="justify"&gt;&lt;a href="http://geekswithblogs.net/SharePointCherie/archive/2009/12/22/error-in-upgrade-log-syncupgradetimerjob-sleeping-for-10-seconds.aspx"&gt;&lt;font size="2" face="Tahoma"&gt;http://geekswithblogs.net/SharePointCherie/archive/2009/12/22/error-in-upgrade-log-syncupgradetimerjob-sleeping-for-10-seconds.aspx&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;Set the following services to manual startup and shut them off:        &lt;br /&gt;World wide web service         &lt;br /&gt;Microsoft Single Sign-on Service         &lt;br /&gt;Windows Sharepoint Services Search&lt;/font&gt;&lt;/p&gt;    &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;Restart spadmin and sptimer services&lt;/font&gt;&lt;/p&gt;    &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;If needed: Command line with C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\BIN&amp;gt;psconfig.exe -cmd upgrade -inplace b2b -wait –force        &lt;br /&gt;[We didn’t want to do this step &amp;amp; wanted to start PSConfig from start menu]&lt;/font&gt;&lt;/p&gt;    &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;But when we tried to Re-Run PSConfig wizard, we got a message that another instance is already running and we suddenly felt that we are in a half-baked situation where we couldn’t run this wizard successfully and now we are not able to start it again. however, later on I realized that this wizard is handled by timer service and we waited for 5-10 min so timer job finishes the default execution cycle of every 5 min and then we could start PSConfig wizard. And at the end, It Finished successfully&lt;/font&gt;&lt;/p&gt;    &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;Fourth, we started the PSConfig on WFE2 and same issue that we faced in WFE1. Did the similar steps of WFE1 and it finished successfully.&lt;/font&gt;&lt;/p&gt;    &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;Finally after so much of tense moments, we managed to finish PSCofig successfully in all the machines.&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p align="justify"&gt;&lt;b&gt;&lt;font size="2" face="Tahoma"&gt;Task 11 – Verify Install&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;1. Open the upgrade.log file (in 12 hive LOGS directory)&lt;/font&gt;&lt;/p&gt;    &lt;ul&gt;     &lt;li&gt;       &lt;div align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;Look for “Finished upgrading SPFarm Name=&amp;lt;Name of Configuration Database&amp;gt;”&lt;/font&gt;&lt;/div&gt;     &lt;/li&gt;      &lt;li&gt;       &lt;div align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;Look for “In-place upgrade session finishes. Root object = SPFarm=&amp;lt;Name of Configuration Database&amp;gt;, recursive = True. 0 errors and 0 warnings encountered.”&lt;/font&gt;&lt;/div&gt;     &lt;/li&gt;   &lt;/ul&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;2. If the above entries DO NOT exist, look for all instances of logs under the files for each servers&lt;/font&gt;&lt;/p&gt;    &lt;ul&gt;     &lt;li&gt;       &lt;div align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;“fail”&lt;/font&gt;&lt;/div&gt;     &lt;/li&gt;      &lt;li&gt;       &lt;div align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;“error”&lt;/font&gt;&lt;/div&gt;     &lt;/li&gt;   &lt;/ul&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;3. Check version number on:&lt;/font&gt;&lt;/p&gt;    &lt;ul&gt;     &lt;li&gt;       &lt;div align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;Owssvr.dll (in 12 hive isapi directory) should be “12.0.6421.1000”&lt;/font&gt;&lt;/div&gt;     &lt;/li&gt;      &lt;li&gt;       &lt;div align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;Registry “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0”&lt;/font&gt;&lt;/div&gt;     &lt;/li&gt;      &lt;li&gt;       &lt;div align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;Central administration&lt;/font&gt;&lt;/div&gt;     &lt;/li&gt;   &lt;/ul&gt;    &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;4. Check version of the SharePoint databases:&lt;/font&gt;&lt;/p&gt;    &lt;ul&gt;     &lt;li&gt;       &lt;div align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;Run the following sql command on each database:&lt;/font&gt;&lt;/div&gt;     &lt;/li&gt;      &lt;li&gt;       &lt;div align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;select * from versions order by timestamp desc&lt;/font&gt;&lt;/div&gt;     &lt;/li&gt;      &lt;li&gt;       &lt;div align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;You should get “12.0.0.6421”&lt;/font&gt;&lt;/div&gt;     &lt;/li&gt;   &lt;/ul&gt;    &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;5. On Central Administration, click “Operations”&lt;/font&gt;&lt;/p&gt;    &lt;ul&gt;     &lt;li&gt;       &lt;div align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;Click “Servers In Farm”&lt;/font&gt;&lt;/div&gt;     &lt;/li&gt;      &lt;li&gt;       &lt;div align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;The version for the farm and servers should be “12.0.0.6421”&lt;/font&gt;&lt;/div&gt;     &lt;/li&gt;   &lt;/ul&gt; &lt;/blockquote&gt;  &lt;p align="justify"&gt;&lt;b&gt;&lt;font size="2" face="Tahoma"&gt;Task 12 – Attach the content DB&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;h5 align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;First, We need to attach the content DB which contains the root site collection and since that DB was in GBs, commad took around three hours to attach it to the farm and gave us a “Successful” message. there after we had to attach remianing hunderds of DBs and it went fairly fast for these DB than compared to first root content DB. at early morning we finsihed successful upgrade of the MOSS2007 farm to SP2 from SP1.&lt;/font&gt;&lt;/h5&gt;    &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;one small site was orphaned and that we managed to restore to a different location by using SP-Export.&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;h5 align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;To attach the content database at the command prompt&lt;/font&gt;&lt;/h5&gt;    &lt;ul&gt;     &lt;li&gt;       &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;To attach the database, open a Command Prompt window and type the following at the command prompt:&lt;/font&gt;&lt;/p&gt;        &lt;p align="justify"&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;&lt;strong&gt;stsadm -o addcontentdb -url &lt;/strong&gt;&lt;em&gt;&amp;lt;http://backupservername:port&amp;gt;&lt;/em&gt;&lt;strong&gt; -databasename &lt;/strong&gt;&lt;em&gt;&amp;lt;ContentDBName&amp;gt;&lt;/em&gt;&lt;strong&gt; -databaseserver &lt;/strong&gt;&lt;em&gt;&amp;lt;NewPrincipalServer&amp;gt;&lt;/em&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;     &lt;/li&gt;   &lt;/ul&gt; &lt;/blockquote&gt;  &lt;p align="justify"&gt;&lt;b&gt;&lt;font size="2" face="Tahoma"&gt;&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;b&gt;&lt;font size="2" face="Tahoma"&gt;Task 13 – Check for SharePoint 2010 readiness&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p align="justify"&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;1. Run the following command:&lt;b&gt; &lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p align="justify"&gt;     &lt;table border="0" cellspacing="0" cellpadding="0"&gt;&lt;tbody&gt;         &lt;tr&gt;           &lt;td width="541"&gt;             &lt;p&gt;&lt;font size="2" face="Tahoma"&gt;stsadm –o preupgradecheck&lt;/font&gt;&lt;/p&gt;           &lt;/td&gt;         &lt;/tr&gt;       &lt;/tbody&gt;&lt;/table&gt;   &lt;/p&gt;    &lt;p align="justify"&gt;&lt;b&gt;&lt;font size="2" face="Tahoma"&gt;&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;    &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;2. Review the PreUpgradeCheck-*.htm file in the 12 hive logs directory (it should open in a browser window)&lt;/font&gt;&lt;/p&gt;    &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;3. You should watch out for the following items:&lt;/font&gt;&lt;/p&gt;    &lt;ul&gt;     &lt;li&gt;       &lt;div align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;The above command should be run on all Web Front end servers to ensure they are identical&lt;/font&gt;&lt;/div&gt;     &lt;/li&gt;      &lt;li&gt;       &lt;div align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;You should review the Site Definition information for any non “Internal” site definitions, these will need to have an upgrade definition file.&amp;#160; Your developers will need to build this file for SP 2010&lt;/font&gt;&lt;/div&gt;     &lt;/li&gt;      &lt;li&gt;       &lt;div align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;If you have language packs installed, you will need to install the latest version when SP 2010 comes out&lt;/font&gt;&lt;/div&gt;     &lt;/li&gt;      &lt;li&gt;       &lt;div align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;Look for any referenced and missing features.&amp;#160; Either install them or delete the references to them&lt;/font&gt;&lt;/div&gt;     &lt;/li&gt;      &lt;li&gt;       &lt;div align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;Depending on the type of upgrade to SP 2010 you do, you many need to plan for URL changes in your sites&lt;/font&gt;&lt;/div&gt;     &lt;/li&gt;      &lt;li&gt;       &lt;div align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;Review the Lists that have more than the recommends number of items.&amp;#160; These could slow the migration process to SP 2010.&amp;#160; Consider removing the list or deleting items to shrink the list size&lt;/font&gt;&lt;/div&gt;     &lt;/li&gt;      &lt;li&gt;       &lt;div align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;Review any Custom Field types that have been added to your Farm.&amp;#160; CAML is not used in SP2010 and each of them will need to be re-developed with XSLT in mind.&lt;/font&gt;&lt;/div&gt;     &lt;/li&gt;      &lt;li&gt;       &lt;div align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;If you are running on 32 bit OS and Server 2003, you will need to start planning for migration to a 64bit server 2008 environment to run SP 2010&lt;/font&gt;&lt;/div&gt;     &lt;/li&gt;   &lt;/ul&gt; &lt;/blockquote&gt;  &lt;p align="justify"&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;&lt;strong&gt;Task 14 : MOSS SP2 causes the license to turn in to trial, which is a known bug.&lt;/strong&gt; &lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://support.microsoft.com/kb/971620"&gt;&lt;font size="2" face="Tahoma"&gt;http://support.microsoft.com/kb/971620&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p align="justify"&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;&lt;b&gt;&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;&lt;u&gt;&lt;b&gt;SP2 Package Installation&lt;/b&gt; &lt;b&gt;step&lt;/b&gt;s&lt;/u&gt; &lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;b&gt;&lt;font size="2" face="Tahoma"&gt;Steps to Install Windows SharePoint Services 3.0 SP2&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;Download Windows SharePoint Services 3.0 &lt;b&gt;SP2&lt;/b&gt; from &lt;/font&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=79BADA82-C13F-44C1-BDC1-D0447337051B&amp;amp;displaylang=en"&gt;&lt;font size="2" face="Tahoma"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyId=79BADA82-C13F-44C1-BDC1-D0447337051B&amp;amp;displaylang=en&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Right click EXE and click Run as Administrator. You only have to do this, if you are running this EXE on Windows Server 2008 Operating System&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;Make sure you have download correct version of executable i.e. 32 bit for 32-bit OS and 64-bit for 64-bit OS.&lt;/font&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/5428.clip_5F00_image002_5F00_5B1E96BA.jpg"&gt;&lt;font size="2" face="Tahoma"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/6507.clip_5F00_image002_5F00_thumb_5F00_3F2D61C2.jpg" width="715" height="297" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Accept license agreement and Click Continue&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/1234.clip_5F00_image004_5F00_233C2CCA.jpg"&gt;&lt;font size="2" face="Tahoma"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image004" border="0" alt="clip_image004" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/3884.clip_5F00_image004_5F00_thumb_5F00_7321B57B.jpg" width="721" height="458" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Windows SharePoint Services 3.0 &lt;b&gt;Installation&lt;/b&gt; will begin.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/8267.clip_5F00_image006_5F00_25093039.jpg"&gt;&lt;font size="2" face="Tahoma"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image006" border="0" alt="clip_image006" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/5852.clip_5F00_image006_5F00_thumb_5F00_69D5546D.jpg" width="720" height="344" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; Click NEXT to start the WSS 3.0 &lt;b&gt;SP2&lt;/b&gt; wizard.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/2728.clip_5F00_image008_5F00_1FF6CCBD.jpg"&gt;&lt;font size="2" face="Tahoma"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image008" border="0" alt="clip_image008" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/4314.clip_5F00_image008_5F00_thumb_5F00_55AC1217.jpg" width="723" height="623" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;&lt;strong&gt;Step 5:&lt;/strong&gt; Click YES to restart the services. &lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/5086.clip_5F00_image010_5F00_56745234.jpg"&gt;&lt;font size="2" face="Tahoma"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image010" border="0" alt="clip_image010" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/6064.clip_5F00_image010_5F00_thumb_5F00_170678D7.jpg" width="731" height="633" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;&lt;strong&gt;Step 6:&lt;/strong&gt; Click NEXT to start the configuration wizard.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/4338.clip_5F00_image012_5F00_22AB9A3C.jpg"&gt;&lt;font size="2" face="Tahoma"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image012" border="0" alt="clip_image012" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/8032.clip_5F00_image012_5F00_thumb_5F00_21A38492.jpg" width="731" height="622" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;&lt;strong&gt;Step 7:&lt;/strong&gt; You will be prompted to install WSS 3.0 &lt;b&gt;SP2&lt;/b&gt; on other SharePoint Servers in the Farm. Now logged into other SharePoint Servers and Install WSS 3.0 &lt;b&gt;SP2&lt;/b&gt; and run configuration wizard and leave the configuration wizard at this stage. Repeat the same &lt;b&gt;step&lt;/b&gt; for all other SharePoint Servers. Once you are done with all other SharePoint Servers then go back to the server, where you have first started to install WSS 3.0 &lt;b&gt;SP2&lt;/b&gt; and Click &amp;quot;OK&amp;quot;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/2768.clip_5F00_image014_5F00_17423A65.jpg"&gt;&lt;font size="2" face="Tahoma"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image014" border="0" alt="clip_image014" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/3364.clip_5F00_image014_5F00_thumb_5F00_6E46FF8E.jpg" width="611" height="515" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;&lt;strong&gt;Step 8:&lt;/strong&gt; Now configuration wizard will start to update SharePoint databases. &lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/7802.clip_5F00_image016_5F00_514DB4EC.jpg"&gt;&lt;font size="2" face="Tahoma"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image016" border="0" alt="clip_image016" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/5342.clip_5F00_image016_5F00_thumb_5F00_62DD9FB7.jpg" width="612" height="533" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;&lt;strong&gt;Step 9:&lt;/strong&gt; Configuration wizard is installed successfully. Now go back to other SharePoint Servers in the farm and complete the WSS 3.0 SP 2 upgrade. &lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/8475.clip_5F00_image018_5F00_7D0DE30E.jpg"&gt;&lt;font size="2" face="Tahoma"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image018" border="0" alt="clip_image018" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/2627.clip_5F00_image018_5F00_thumb_5F00_158D5A92.jpg" width="620" height="532" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;b&gt;&lt;font size="2" face="Tahoma"&gt;Steps to Install Microsoft Office SharePoint Server 2007 SP2&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;Download &lt;b&gt;MOSS&lt;/b&gt; 2007 &lt;b&gt;SP2&lt;/b&gt; from &lt;/font&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=B7816D90-5FC6-4347-89B0-A80DEB27A082&amp;amp;displaylang=en"&gt;&lt;font size="2" face="Tahoma"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyId=B7816D90-5FC6-4347-89B0-A80DEB27A082&amp;amp;displaylang=en&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Right click and run &lt;b&gt;MOSS&lt;/b&gt; 2007 &lt;b&gt;SP2&lt;/b&gt; EXE as Administrator, if you are using Windows Server 2008 OS&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/6431.clip_5F00_image020_5F00_10E72A0B.jpg"&gt;&lt;font size="2" face="Tahoma"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image020" border="0" alt="clip_image020" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/8585.clip_5F00_image020_5F00_thumb_5F00_6004729F.jpg" width="612" height="354" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Accept the license agreement and Click Continue.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/4278.clip_5F00_image022_5F00_55EFD174.jpg"&gt;&lt;font size="2" face="Tahoma"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image022" border="0" alt="clip_image022" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/2543.clip_5F00_image022_5F00_thumb_5F00_32DF6004.jpg" width="611" height="384" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; &lt;b&gt;Installation&lt;/b&gt; package will start and check for any previous update i.e. WSS 3.0 &lt;b&gt;SP2&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/4774.clip_5F00_image024_5F00_22373F49.jpg"&gt;&lt;font size="2" face="Tahoma"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image024" border="0" alt="clip_image024" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/0488.clip_5F00_image024_5F00_thumb_5F00_58C4EA8D.jpg" width="609" height="213" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; Once update detection is completed, &lt;b&gt;MOSS&lt;/b&gt; 2007 &lt;b&gt;SP2&lt;/b&gt; &lt;b&gt;installation&lt;/b&gt; will start. &lt;b&gt;Installation&lt;/b&gt; of &lt;b&gt;MOSS&lt;/b&gt; 2007 will take at least 20 minutes &lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/1663.clip_5F00_image026_5F00_04290B88.jpg"&gt;&lt;font size="2" face="Tahoma"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image026" border="0" alt="clip_image026" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/6036.clip_5F00_image026_5F00_thumb_5F00_7AECD046.jpg" width="614" height="220" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;&lt;strong&gt;Step 5:&lt;/strong&gt; SharePoint configuration wizard will automatically start. Click NEXT to Continue.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/2161.clip_5F00_image028_5F00_29EF0C1E.jpg"&gt;&lt;font size="2" face="Tahoma"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image028" border="0" alt="clip_image028" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/7853.clip_5F00_image028_5F00_thumb_5F00_46A88133.jpg" width="611" height="509" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;&lt;strong&gt;Step 6:&lt;/strong&gt; Click Yes to continue.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/0820.clip_5F00_image030_5F00_087F40B5.jpg"&gt;&lt;font size="2" face="Tahoma"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image030" border="0" alt="clip_image030" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/6874.clip_5F00_image030_5F00_thumb_5F00_6A04D9FE.jpg" width="615" height="524" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;&lt;strong&gt;Step 7:&lt;/strong&gt; Click Next to complete the wizard&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/7382.clip_5F00_image032_5F00_64F27682.jpg"&gt;&lt;font size="2" face="Tahoma"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image032" border="0" alt="clip_image032" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/3755.clip_5F00_image032_5F00_thumb_5F00_520DCD0B.jpg" width="620" height="517" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;&lt;strong&gt;Step 8:&lt;/strong&gt; At this &lt;b&gt;step&lt;/b&gt;, go to other SharePoint Servers in the farm and install &lt;b&gt;MOSS&lt;/b&gt; 2007 &lt;b&gt;SP2&lt;/b&gt; and leave the &lt;b&gt;installation&lt;/b&gt; at the same stage. Once you are done with other SharePoint servers, then come back to the server where you have started &lt;b&gt;MOSS&lt;/b&gt; 2007 &lt;b&gt;SP2&lt;/b&gt; upgrade process and Click OK to continue.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/4670.clip_5F00_image034_5F00_012F92D6.jpg"&gt;&lt;font size="2" face="Tahoma"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image034" border="0" alt="clip_image034" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/0044.clip_5F00_image034_5F00_thumb_5F00_24D894A3.jpg" width="614" height="531" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;&lt;strong&gt;Step 9:&lt;/strong&gt; SharePoint databases will be updated at this stage.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/3286.clip_5F00_image036_5F00_52B5C18E.jpg"&gt;&lt;font size="2" face="Tahoma"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image036" border="0" alt="clip_image036" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/2626.clip_5F00_image036_5F00_thumb_5F00_086B06E9.jpg" width="627" height="539" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;&lt;strong&gt;Step 10:&lt;/strong&gt; SharePoint Configuration Wizard is successfully completed. Now logged into other SharePoint Servers and complete the upgrade process.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/2022.clip_5F00_image038_5F00_432289F2.jpg"&gt;&lt;font size="2" face="Tahoma"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image038" border="0" alt="clip_image038" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/4604.clip_5F00_image038_5F00_thumb_5F00_1D1CB3CF.jpg" width="629" height="533" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;&lt;strong&gt;Step 11:&lt;/strong&gt; Now you can open Central Administration to check the version number of &lt;b&gt;MOSS&lt;/b&gt; 2007 is updated. &lt;b&gt;SP2&lt;/b&gt; version number is 12.0.0.6421&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/3122.clip_5F00_image040_5F00_5048C76B.jpg"&gt;&lt;font size="2" face="Tahoma"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image040" border="0" alt="clip_image040" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/3122.clip_5F00_image040_5F00_thumb_5F00_6244E52B.jpg" width="638" height="281" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;&lt;strong&gt;Step 12:&lt;/strong&gt; confirm in the registry location whether all servers have been upgraded HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;&lt;strong&gt;Step 13:&lt;/strong&gt; Check under the Databases in SQL for tables versions under content db and config db whether it has been upgraded.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;&amp;#160;&lt;/font&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font size="2" face="Tahoma"&gt;&lt;/font&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10146378" width="1" height="1"&gt;</description></item><item><title>Customizing Web Analytics in SharePoint</title><link>http://blogs.msdn.com/b/tejasr/archive/2010/12/26/customizing-web-analytics-in-sharepoint.aspx</link><pubDate>Sun, 26 Dec 2010 15:19:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10109124</guid><dc:creator>-Tejas</dc:creator><slash:comments>5</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/tejasr/rsscomments.aspx?WeblogPostID=10109124</wfw:commentRss><comments>http://blogs.msdn.com/b/tejasr/archive/2010/12/26/customizing-web-analytics-in-sharepoint.aspx#comments</comments><description>&lt;p&gt;&lt;br /&gt;From quite some time, I was trying to find ways to customize the SharePoint 2010 Web Analytics to capture the usage of Internal SharePoint solutions.&lt;/p&gt;
&lt;p&gt;With SharePoint Web Analytics,&amp;nbsp; Users will be able to find the following three categories of reports out of the box from SP2010 (&lt;a target="_blank" href="http://blogs.msdn.com/b/ecm/archive/2010/05/03/web-analytics-in-sharepoint-2010-insights-into-reports-and-metrics.aspx" title="SharePoint 2010 Web Analytics"&gt;More Details&lt;/a&gt;) but I wanted to find out the customization details of this functionality so I can capture the data my way and create my own reports. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Traffic Reports&lt;/strong&gt;: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Number of Page Views &lt;/li&gt;
&lt;li&gt;Top Referrers &lt;/li&gt;
&lt;li&gt;Top Visitors &lt;/li&gt;
&lt;li&gt;Number of Daily Unique Visitors, Top Destinations, Top Browsers, etc. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Search Reports&lt;/strong&gt;:&amp;nbsp; &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Top Queries &lt;/li&gt;
&lt;li&gt;Number of Queries&amp;nbsp; &lt;/li&gt;
&lt;li&gt;Failed Queries &lt;/li&gt;
&lt;li&gt;Best Bet Usage, Search keywords, etc. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;ins&gt;&lt;ins&gt;&lt;/ins&gt;&lt;/ins&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Inventory reports&lt;/strong&gt;: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Total disk drive space usage &lt;/li&gt;
&lt;li&gt;Number of Site Collections&amp;nbsp; &lt;/li&gt;
&lt;li&gt;Top Site Product Versions, Top Site Languages, etc. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The web analytics data comes from the request usage &amp;amp; It implements a usage receiver. From reflector we can see that SPUsageReceiver is an abstract class and we can write our own solution to override this class. We can create an usage receiver so that we can check every incoming request and store the statistics that we would like to. The receiver is going to be called when Usage Import job is executed. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/5344.image_5F00_4FC1E062.png"&gt;&lt;img height="211" width="794" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/7002.image_5F00_thumb_5F00_56B16D1A.png" alt="image" border="0" title="image" style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Custom Usage Receiver&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 102.36%; font-family: 'Courier New', courier, monospace; direction: ltr; height: 249px; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; border: silver 1px solid; padding: 4px;"&gt;
&lt;div id="codeSnippet" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span id="lnum1" style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; CustomSPRequestUsageReceiver : SPUsageReceiver    &lt;/pre&gt;
&lt;!--crlf--&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span id="lnum2" style="color: #606060"&gt;   2:&lt;/span&gt; {         &lt;/pre&gt;
&lt;!--crlf--&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span id="lnum3" style="color: #606060"&gt;   3:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;override&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; UsageImported(SPUsageReceiverProperties usageProperties)         &lt;/pre&gt;
&lt;!--crlf--&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span id="lnum4" style="color: #606060"&gt;   4:&lt;/span&gt;     {                 &lt;/pre&gt;
&lt;!--crlf--&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span id="lnum5" style="color: #606060"&gt;   5:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;while&lt;/span&gt; (usageProperties.UsageEntries.MoveNext())                 &lt;/pre&gt;
&lt;!--crlf--&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span id="lnum6" style="color: #606060"&gt;   6:&lt;/span&gt;         {                     &lt;/pre&gt;
&lt;!--crlf--&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span id="lnum7" style="color: #606060"&gt;   7:&lt;/span&gt;             SPRequestUsageEntry entry = usageProperties.UsageEntries.Current &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; SPRequestUsageEntry;                    &lt;/pre&gt;
&lt;!--crlf--&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span id="lnum8" style="color: #606060"&gt;   8:&lt;/span&gt;             &lt;/pre&gt;
&lt;!--crlf--&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span id="lnum9" style="color: #606060"&gt;   9:&lt;/span&gt;             &lt;span style="color: #008000"&gt;// You may write your custom logic here to access the entries per the custom requirement                 &lt;/span&gt;&lt;/pre&gt;
&lt;!--crlf--&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span id="lnum10" style="color: #606060"&gt;  10:&lt;/span&gt;         }         &lt;/pre&gt;
&lt;!--crlf--&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span id="lnum11" style="color: #606060"&gt;  11:&lt;/span&gt;     }     &lt;/pre&gt;
&lt;!--crlf--&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span id="lnum12" style="color: #606060"&gt;  12:&lt;/span&gt; } &lt;/pre&gt;
&lt;!--crlf--&gt;&lt;/!--crlf--&gt;&lt;/!--crlf--&gt;&lt;/!--crlf--&gt;&lt;/!--crlf--&gt;&lt;/!--crlf--&gt;&lt;/!--crlf--&gt;&lt;/!--crlf--&gt;&lt;/!--crlf--&gt;&lt;/!--crlf--&gt;&lt;/!--crlf--&gt;&lt;/!--crlf--&gt;&lt;/!--crlf--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="csharpcode"&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;


&lt;/p&gt;
&lt;p&gt;You can register your custom usage receiver like below, &lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 102.3%; font-family: 'Courier New', courier, monospace; direction: ltr; height: 182px; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; border: silver 1px solid; padding: 4px;"&gt;
&lt;div id="codeSnippet" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 105.79%; font-family: 'Courier New', courier, monospace; direction: ltr; height: 158px; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span id="lnum1" style="color: #606060"&gt;   1:&lt;/span&gt; SPRequestUsageDefinition definition = SPRequestUsageDefinition.Local; &lt;/pre&gt;
&lt;!--crlf--&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span id="lnum2" style="color: #606060"&gt;   2:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--crlf--&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span id="lnum3" style="color: #606060"&gt;   3:&lt;/span&gt; definition.Enabled = &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;; &lt;/pre&gt;
&lt;!--crlf--&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span id="lnum4" style="color: #606060"&gt;   4:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--crlf--&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span id="lnum5" style="color: #606060"&gt;   5:&lt;/span&gt; definition.EnableReceivers = &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;; &lt;/pre&gt;
&lt;!--crlf--&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span id="lnum6" style="color: #606060"&gt;   6:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--crlf--&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span id="lnum7" style="color: #606060"&gt;   7:&lt;/span&gt; definition.Receivers.Add(&lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(CustomSPRequestUsageReceiver)); &lt;/pre&gt;
&lt;!--crlf--&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span id="lnum8" style="color: #606060"&gt;   8:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--crlf--&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span id="lnum9" style="color: #606060"&gt;   9:&lt;/span&gt; definition.Update(); &lt;/pre&gt;
&lt;!--crlf--&gt;&lt;/!--crlf--&gt;&lt;/!--crlf--&gt;&lt;/!--crlf--&gt;&lt;/!--crlf--&gt;&lt;/!--crlf--&gt;&lt;/!--crlf--&gt;&lt;/!--crlf--&gt;&lt;/!--crlf--&gt;&lt;/!--crlf--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="csharpcode"&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10109124" width="1" height="1"&gt;</description></item><item><title>Resolution: Exception while accessing “SPWebService.ContentService” object</title><link>http://blogs.msdn.com/b/tejasr/archive/2010/09/27/resolution-exception-while-accessing-spwebservice-contentservice-object.aspx</link><pubDate>Mon, 27 Sep 2010 15:47:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10068246</guid><dc:creator>-Tejas</dc:creator><slash:comments>5</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/tejasr/rsscomments.aspx?WeblogPostID=10068246</wfw:commentRss><comments>http://blogs.msdn.com/b/tejasr/archive/2010/09/27/resolution-exception-while-accessing-spwebservice-contentservice-object.aspx#comments</comments><description>&lt;p&gt;Recently I came across a situation in which a customer was trying to access the web applications in the farm but he was getting an exception, “System.NullReferenceException was unhandled&amp;#160; Message=Object reference not set an instance of an object.” while executing “SPWebService.ContentService” from a console application as below.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/8883.image_5F00_30056060.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/1122.image_5F00_thumb_5F00_2BCB62CE.png" width="827" height="282" /&gt;&lt;/a&gt; &lt;/p&gt;   &lt;p&gt;Initially we started looking into what is wrong with the user permissions but logged in user had all the required rights(Farm Admin) but, after digging further we found that it’s a Visual Studio 2010 issue, the project was marked as x86 which definitely SP2010 doesn’t like:) Made the project build type as x64(Right click on the project in Solution Explorer –&amp;gt; Project Properties –&amp;gt; Build –&amp;gt; Platform target –&amp;gt; x64) and everything started working fine.&lt;/p&gt;  &lt;p&gt;I initially searched for the exceptions around this API and couldn’t find any hints so thought of posting the quick hint here. Hope it helps!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10068246" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+2010/">SharePoint 2010</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Object+Model/">Object Model</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+Foundation+2010/">SharePoint Foundation 2010</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+Server+2010/">SharePoint Server 2010</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Visual+Studio/">Visual Studio</category></item><item><title>SharePoint 2010: Fabulous 40 Application Templates and Upgrade guidelines</title><link>http://blogs.msdn.com/b/tejasr/archive/2010/08/30/sharepoint-2010-fabulous-40-application-templates-and-upgrade-guidelines.aspx</link><pubDate>Mon, 30 Aug 2010 19:57:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10055961</guid><dc:creator>-Tejas</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/tejasr/rsscomments.aspx?WeblogPostID=10055961</wfw:commentRss><comments>http://blogs.msdn.com/b/tejasr/archive/2010/08/30/sharepoint-2010-fabulous-40-application-templates-and-upgrade-guidelines.aspx#comments</comments><description>&lt;p&gt;It has been a long running topic since the launch of SP2010, &lt;a title="Fabulous 40 Application Templates" href="http://blogs.technet.com/b/tothesharepoint/archive/2010/08/18/sharepoint-2010-products-upgrade-and-the-fabulous-40-application-templates.aspx" target="_blank"&gt;Here&lt;/a&gt; is the latest post on the guidelines. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10055961" width="1" height="1"&gt;</description></item><item><title>How to remove “Open with (Windows) Explorer” button from Document Library’s Ribbon Menu</title><link>http://blogs.msdn.com/b/tejasr/archive/2010/07/20/how-to-remove-open-with-windows-explorer-button-from-document-library-s-ribbon-menu.aspx</link><pubDate>Mon, 19 Jul 2010 23:17:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10040062</guid><dc:creator>-Tejas</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/tejasr/rsscomments.aspx?WeblogPostID=10040062</wfw:commentRss><comments>http://blogs.msdn.com/b/tejasr/archive/2010/07/20/how-to-remove-open-with-windows-explorer-button-from-document-library-s-ribbon-menu.aspx#comments</comments><description>&lt;p&gt;Recently I had come across a situation in which customer wanted to remove the “Open with (Windows) Explorer” button from the Document Library’s Ribbon Menu.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/8640.image_5F00_1B5BF401.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/1222.image_5F00_thumb_5F00_77DF4F9B.png" width="841" height="125" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Following are the steps to remove this button from Ribbon&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Create an empty SharePoint 2010 Solution, you may give your favorite name to it&lt;/li&gt;    &lt;li&gt;Add a feature by right clicking on the Features in Solution Explorer&lt;/li&gt;    &lt;li&gt;Right click on the Project and add a new item, choose empty element and name it&lt;/li&gt;    &lt;li&gt;Open the Elements.xml file from the newly added item&lt;/li&gt;    &lt;li&gt;Copy &amp;amp; paste the following XML into the Elements.xml file&lt;/li&gt; &lt;/ol&gt;  &lt;blockquote&gt;   &lt;blockquote&gt;&lt;/blockquote&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;&lt;/blockquote&gt;  &lt;blockquote&gt;&lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;?&lt;/span&gt;&lt;span class="html"&gt;xml&lt;/span&gt; &lt;span class="attr"&gt;version&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;1.0&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;encoding&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;utf-8&amp;quot;&lt;/span&gt;?&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Elements&lt;/span&gt; &lt;span class="attr"&gt;xmlns&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://schemas.microsoft.com/sharepoint/&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
       &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;CustomAction&lt;/span&gt;
         &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;RemoveRibbonButton&amp;quot;&lt;/span&gt;
         &lt;span class="attr"&gt;Location&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;CommandUI.Ribbon&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
              &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;CommandUIExtension&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                     &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;CommandUIDefinitions&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                           &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;CommandUIDefinition&lt;/span&gt;
                             &lt;span class="attr"&gt;Location&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Ribbon.Library.Actions.OpenWithExplorer&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
                     &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;CommandUIDefinitions&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
              &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;CommandUIExtension&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
       &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;CustomAction&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Elements&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
  &lt;/blockquote&gt;

&lt;p&gt;Deploy the Solution and observe that “Open with Explorer” button will be removed from the Ribbon.&lt;/p&gt;

&lt;p&gt;Please check out &lt;a title="Default Server Ribbon Customization Locations" href="http://msdn.microsoft.com/en-us/library/ee537543(office.14).aspx" target="_blank"&gt;Default Server Ribbon Customization Locations&lt;/a&gt; for more location details.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10040062" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Customization/">Customization</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/How+To/">How To</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+2010/">SharePoint 2010</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+2010+Developer/">SharePoint 2010 Developer</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Custom+Solutions/">Custom Solutions</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+Foundation+2010/">SharePoint Foundation 2010</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+Server+2010/">SharePoint Server 2010</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Document+libraries/">Document libraries</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Menu/">Menu</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Ribbon/">Ribbon</category></item><item><title>Developing Applications for SharePoint 2010 - The release of patterns &amp; practices</title><link>http://blogs.msdn.com/b/tejasr/archive/2010/06/30/developing-applications-for-sharepoint-2010-the-release-of-patterns-amp-practices.aspx</link><pubDate>Wed, 30 Jun 2010 17:14:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10032944</guid><dc:creator>-Tejas</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/tejasr/rsscomments.aspx?WeblogPostID=10032944</wfw:commentRss><comments>http://blogs.msdn.com/b/tejasr/archive/2010/06/30/developing-applications-for-sharepoint-2010-the-release-of-patterns-amp-practices.aspx#comments</comments><description>&lt;h3&gt;Overview&lt;/h3&gt;  &lt;p&gt;Developing Applications for SharePoint 2010 contains guidance documentation, detailed examples, and a reusable class library. These resources are designed to help solution developers and architects make the right decisions and follow proven practices when designing and developing applications for SharePoint 2010. The guidance focuses primarily on the building blocks that every developer needs to understand to become an effective SharePoint developer or architect. The following diagram shows the key areas that are covered within the guidance documentation, reference implementations, and reusable class library.&lt;/p&gt;  &lt;p&gt;Key areas covered by Developing Applications for SharePoint 2010&lt;/p&gt;  &lt;p&gt;&lt;img alt="Key areas covered by Developing Applications for SharePoint 2010" src="http://i.msdn.microsoft.com/Ff770300.key-areas-spg4(en-us,PandP.10).png" /&gt;&lt;/p&gt;  &lt;h6&gt;Guidance Documentation&lt;/h6&gt;  &lt;p&gt;The guidance documentation is divided into four core sections. &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ff798371.aspx"&gt;Application Foundations for SharePoint 2010&lt;/a&gt;. This section describes approaches you can use to address the challenges of testability, flexibility, configuration, logging and exception handling, and maintainability; it also explains how to use the SharePoint Guidance Library components in these areas. &lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ff798421.aspx"&gt;Execution Models in SharePoint 2010&lt;/a&gt;. This section provides deep technical insights into the mechanics of the full-trust execution environment, the sandbox execution environment, and various hybrid approaches to executing code in SharePoint applications. &lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ff798364.aspx"&gt;Data Models in SharePoint 2010&lt;/a&gt;. This section explains new list and external data functionality, key design decision points that can help you to choose between standard SharePoint lists and external lists, and techniques and patterns to address large lists and list aggregation. &lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ff798452.aspx"&gt;Client Application Models in SharePoint 2010&lt;/a&gt;. This section provides guidance on how best to use the new client-side functionality to access data and build richer client experiences with Silverlight and Ajax. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Each section also contains a set of how-to topics. These explain how to perform specific tasks that the team found challenging to discover.&lt;/p&gt;  &lt;h6&gt;&lt;font size="3"&gt;Click &lt;/font&gt;&lt;a title="Developing Applications for SharePoint 2010" href="http://msdn.microsoft.com/en-us/library/ff770300.aspx" target="_blank"&gt;&lt;font size="3"&gt;HERE&lt;/font&gt;&lt;/a&gt;&lt;font size="3"&gt; For more details.&lt;/font&gt;&lt;/h6&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10032944" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Code+Samples/">Code Samples</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Coding+Tips/">Coding Tips</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/How+To/">How To</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+2010/">SharePoint 2010</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Object+Model/">Object Model</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Sandboxed+Solutions/">Sandboxed Solutions</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Best+Practices/">Best Practices</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+2010+Developer/">SharePoint 2010 Developer</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Custom+Solutions/">Custom Solutions</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/BCS/">BCS</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Silverlight+Object+Model/">Silverlight Object Model</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Managed+Client+Object+Model/">Managed Client Object Model</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+Foundation+2010/">SharePoint Foundation 2010</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+Server+2010/">SharePoint Server 2010</category></item><item><title>Silverlight Object Model code to access the current user of a SP2010 site</title><link>http://blogs.msdn.com/b/tejasr/archive/2010/06/26/silverlight-object-model-code-to-access-the-current-user-of-a-sp2010-site.aspx</link><pubDate>Sat, 26 Jun 2010 21:00:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10031087</guid><dc:creator>-Tejas</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/tejasr/rsscomments.aspx?WeblogPostID=10031087</wfw:commentRss><comments>http://blogs.msdn.com/b/tejasr/archive/2010/06/26/silverlight-object-model-code-to-access-the-current-user-of-a-sp2010-site.aspx#comments</comments><description>&lt;p&gt;&lt;/p&gt;  &lt;p&gt;More details on the Silverlight Object Model, you can find &lt;a title="Using the Silverlight Object Model" href="http://msdn.microsoft.com/en-us/library/ee538971.aspx" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Collections.Generic;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Linq;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Net;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Windows;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Windows.Controls;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Windows.Documents;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Windows.Input;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.SharePoint.Client;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.SharePoint;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; SilverlightApplication1
{
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;partial&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; MainPage : UserControl
    {
        Web oWebsite;
        ListCollection collList;
        IEnumerable&amp;lt;List&amp;gt; listInfo;
        User user;

        &lt;span class="kwrd"&gt;public&lt;/span&gt; MainPage()
        {
            InitializeComponent();
            SilverlightOM();
        }

         &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; SilverlightOM()
        {
            ClientContext clientContext = &lt;span class="kwrd"&gt;new&lt;/span&gt; ClientContext(&lt;span class="str"&gt;&amp;quot;http://fly2010&amp;quot;&lt;/span&gt;);

            oWebsite = clientContext.Web;
            collList = oWebsite.Lists;

            clientContext.Load(oWebsite, s =&amp;gt; s.CurrentUser);
            clientContext.ExecuteQueryAsync(onQuerySucceeded, onQueryFailed);
        }

        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; onQuerySucceeded(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, ClientRequestSucceededEventArgs args)
        {
             user = oWebsite.CurrentUser;
        }

        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; onQueryFailed(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, ClientRequestFailedEventArgs args)
        {
            MessageBox.Show(&lt;span class="str"&gt;&amp;quot;Request failed&amp;quot;&lt;/span&gt;);
        }
    }
}&lt;/pre&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10031087" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Snippets/">Snippets</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Object+Model/">Object Model</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Custom+Solutions/">Custom Solutions</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Silverlight+Object+Model/">Silverlight Object Model</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+2010+Silverlight+Client+Object+Model/">SharePoint 2010 Silverlight Client Object Model</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Managed+Client+Object+Model/">Managed Client Object Model</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+Foundation+2010/">SharePoint Foundation 2010</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+Server+2010/">SharePoint Server 2010</category></item><item><title>SharePoint 2010 Resources</title><link>http://blogs.msdn.com/b/tejasr/archive/2010/06/26/sharepoint-2010-resources.aspx</link><pubDate>Sat, 26 Jun 2010 20:39:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10031080</guid><dc:creator>-Tejas</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/tejasr/rsscomments.aspx?WeblogPostID=10031080</wfw:commentRss><comments>http://blogs.msdn.com/b/tejasr/archive/2010/06/26/sharepoint-2010-resources.aspx#comments</comments><description>&lt;p&gt;&lt;a target="_blank" href="http://channel9.msdn.com/learn/courses/SharePoint2010Developer/" title="SharePoint 2010 Developer Training Course"&gt;SharePoint 2010 Developer Training Course&lt;/a&gt; &lt;br /&gt;SharePoint 2010 provides the business collaboration platform for developers to rapidly build solutions using familiar tools while leveraging a rich set of out of the box features. Visual Studio 2010 and SharePoint Designer 2010 make developers more productive and Visual Studio Team Foundation Server delivers support for application lifecycle management. Developers can integrate Line of Business data in SharePoint 2010 with read/write capability delivered by Business Connectivity Services. Sandboxed Solutions can be deployed to a shared hosting environment to limit the impact of unpredictable code to the other applications in use. &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Getting Started with SharePoint 2010&lt;/li&gt;
&lt;li&gt;SharePoint 2010 Developer Roadmap&lt;/li&gt;
&lt;li&gt;Visual Studio 2010 Tools for SharePoint 2010&lt;/li&gt;
&lt;li&gt;UI Enhancements&lt;/li&gt;
&lt;li&gt;Lists and Schemas&lt;/li&gt;
&lt;li&gt;LINQ to SharePoint&lt;/li&gt;
&lt;li&gt;Client Object Model&lt;/li&gt;
&lt;li&gt;Workflow&lt;/li&gt;
&lt;li&gt;Services Architecture&lt;/li&gt;
&lt;li&gt;Accessing External Data&lt;/li&gt;
&lt;li&gt;Enterprise Content Management&lt;/li&gt;
&lt;li&gt;Extending Search&lt;/li&gt;
&lt;li&gt;PerformancePoint Services&lt;/li&gt;
&lt;li&gt;Sandboxed Solutions&lt;/li&gt;
&lt;li&gt;SharePoint 2010 Security&lt;/li&gt;
&lt;li&gt;Business Intelligence&lt;/li&gt;
&lt;li&gt;SharePoint 2010 Best Practices&lt;/li&gt;
&lt;li&gt;Building a SharePoint 2010 Virtual Machine&lt;/li&gt;
&lt;li&gt;Upgrading Custom Solutions&lt;/li&gt;
&lt;li&gt;Upgrading VSeWss Solutions to SharePoint 2010&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a target="_blank" href="http://channel9.msdn.com/learn/courses/VS2010/" title="Visual Studio 2010 and .NET Framework 4 Training Course"&gt;Visual Studio 2010 and .NET Framework 4 Training Course&lt;/a&gt; &lt;br /&gt;The Visual Studio 2010 and .NET Framework 4 Training Course includes videos and hands-on-labs designed to help you learn how to utilize the Visual Studio 2010 features and a variety of framework technologies including: C# 4.0, Visual Basic 10, F#, Parallel Computing Platform, WCF, WF, WPF, ASP.NET AJAX 4.0, ASP.NET MVC Dynamic Data&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/ff650022.aspx" title="Developing SharePoint Applications"&gt;Developing SharePoint Applications&lt;/a&gt; &lt;br /&gt;The &lt;em&gt;Developing SharePoint Applications&lt;/em&gt; guidance helps architects and developers design and build applications that are both flexible and scalable. It shows developers how to provide IT professionals with the information they need to maintain those applications and diagnose problems when they arise. The two reference implementations illustrate how to solve many of the common challenges developers encounter. One reference implementation addresses basic issues such as creating lists and content types. The other addresses more advanced problems such as how to integrate line of business services, how to create collaboration sites programmatically, and how to customize aspects of publishing and navigation. A library of reusable components helps you adopt techniques used in the reference implementations. The guidance discusses approaches for testing SharePoint applications, such as how to create unit tests, and documents experiences with stress and scale testing one of the reference implementations.&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/ee556427.aspx" title="Best Practices with SharePoint Foundation"&gt;Best Practices with SharePoint Foundation&lt;/a&gt; &lt;br /&gt;Learn the latest best practices and guidance that can help you create efficient custom applications in Microsoft SharePoint Foundation 2010 and help avoid common development problems. Key concerns that are addressed include enumeration of large folders and lists, disposal of unmanaged resources, and thread safety issues caused by caching objects.&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://spg.codeplex.com/" title="Patterns &amp;amp; practices SharePoint Guidance"&gt;Patterns &amp;amp; practices SharePoint Guidance&lt;/a&gt; &lt;br /&gt;The release is focusing on application models for SharePoint 2010. We are covering the different considerations to developing server and client logic in that release, including help developers and architects understand and make decisions regarding execution models including sandbox, full trust, and hybrid approaches combining full trust and sandbox applications, client side use of AJAX, Silverlight, client side object model, and REST, data models in SharePoint including external data and advancements with SharePoint list data, and some of the fundamentals for building manageable applications like logging, testing, and managing configuration.&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/ee558807.aspx" title="Writing Efficient Code in SharePoint Server"&gt;Writing Efficient Code in SharePoint Server&lt;/a&gt; &lt;br /&gt;If you write custom solutions by using the SharePoint object model, you should be aware of common issues related to performance, extensibility, and scalability. This topic can help you effectively troubleshoot and improve the performance of existing SharePoint applications or write new SharePoint applications. In both cases, you need to understand how to make the SharePoint object model work efficiently, and how to apply general programming techniques to the SharePoint platform specifically.&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/ee539757.aspx" title="Client Object Model Distribution and Deployment"&gt;Client Object Model Distribution and Deployment&lt;/a&gt; &lt;br /&gt;To use the client object models, you can obtain local copies of the appropriate .dll or .js files to develop from a remote computer on which Microsoft SharePoint Foundation 2010 is not installed.&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/ee662217.aspx" title="Redeploying Customizations and Solutions in SharePoint Foundation 2010 and SharePoint Server 2010"&gt;Redeploying Customizations and Solutions in SharePoint Foundation 2010 and SharePoint Server 2010&lt;/a&gt; &lt;br /&gt;Learn how to redeploy customizations and custom solutions that you created for Windows SharePoint Services 3.0 and Microsoft Office SharePoint Server 2007 in Microsoft SharePoint Server 2010 and Microsoft SharePoint Foundation 2010&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=fd1eac86-ad47-4865-9378-80040d08ac55&amp;amp;displaylang=en" title="SharePoint Server 2010 performance and capacity test results and recommendations"&gt;SharePoint Server 2010 performance and capacity test results and recommendations&lt;/a&gt; &lt;br /&gt;These white papers describe the performance and capacity impact of specific feature sets included in Microsoft SharePoint Server 2010. &lt;br /&gt;On This Page&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://msdn.microsoft.com/sharepoint" title="The SharePoint MSDN Developer Center"&gt;The SharePoint MSDN Developer Center&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://msdn.microsoft.com/en-us/sharepoint/ee514557.aspx" title="Upgrade Resource Center | SharePoint 2010"&gt;Upgrade Resource Center | SharePoint 2010&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/dd776256.aspx"&gt;The SharePoint 2010 MSDN SDK:&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://social.msdn.microsoft.com/Forums/en-US/category/sharepoint2010,sharepoint" title="SharePoint 2010 Forums"&gt;SharePoint 2010 Forums&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10031080" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+2010/">SharePoint 2010</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Search/">Search</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Workflow/">Workflow</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Sandboxed+Solutions/">Sandboxed Solutions</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Best+Practices/">Best Practices</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+2010+Developer/">SharePoint 2010 Developer</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/LINQ/">LINQ</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Custom+Solutions/">Custom Solutions</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/BCS/">BCS</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Client+Object+Model/">Client Object Model</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+Foundation+2010/">SharePoint Foundation 2010</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/External+Data/">External Data</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Services/">Services</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Business+Intelligence/">Business Intelligence</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Performance+and+capacity+planning/">Performance and capacity planning</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+Server+2010/">SharePoint Server 2010</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Security/">Security</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Schemas/">Schemas</category></item><item><title>Automatically restart the failed workflow instances</title><link>http://blogs.msdn.com/b/tejasr/archive/2010/05/26/automatically-restart-the-failed-workflow-instances.aspx</link><pubDate>Wed, 26 May 2010 20:46:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10015899</guid><dc:creator>-Tejas</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/tejasr/rsscomments.aspx?WeblogPostID=10015899</wfw:commentRss><comments>http://blogs.msdn.com/b/tejasr/archive/2010/05/26/automatically-restart-the-failed-workflow-instances.aspx#comments</comments><description>&lt;p&gt;Recently I came across a situation in which customer had email enabled a document library and he had setup a custom workflow to start whenever any new item is added in the library. This setup was working as expected but when end-users send some higher number of emails at the same time (lets say 20-30 emails in a min) then we observed that a few workflow instances were failed with the status &amp;ldquo;Error Occurred&amp;rdquo; as shown below.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/2251.image_5F00_6DC1A2D6.png"&gt;&lt;img height="79" width="854" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/8623.image_5F00_thumb_5F00_230AB53C.png" alt="image" border="0" title="image" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;While we investigate the internals of the workflow runtime and this behavior, we decided to implement a workaround so end-users can continue working. We planned for a custom timer job which can run periodically, scan all the failed instances and restart them.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;Timer Job&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Following is the code which we run in the timer job (for testing purpose you can put this code in a windows forms application and check, I have kept the commented message boxes in the code). We make a periodic entry in &amp;ldquo;Tasks&amp;rdquo; list just to verify that our timer job is running fine, you may disable this code.&lt;/p&gt;
&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;using &lt;/span&gt;System;
&lt;span style="color: blue"&gt;using &lt;/span&gt;System.Collections.Generic;
&lt;span style="color: blue"&gt;using &lt;/span&gt;System.Linq;
&lt;span style="color: blue"&gt;using &lt;/span&gt;System.Text;
&lt;span style="color: blue"&gt;using &lt;/span&gt;Microsoft.SharePoint;
&lt;span style="color: blue"&gt;using &lt;/span&gt;Microsoft.SharePoint.Workflow;
&lt;span style="color: blue"&gt;using &lt;/span&gt;Microsoft.SharePoint.Administration;

&lt;span style="color: blue"&gt;namespace &lt;/span&gt;WFRestart
{
    &lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;WFRestart &lt;/span&gt;: SPJobDefinition
    {
        &lt;span style="color: blue"&gt;public &lt;/span&gt;WFRestart()
            : &lt;span style="color: blue"&gt;base&lt;/span&gt;()
        {
        }

        &lt;span style="color: blue"&gt;public &lt;/span&gt;WFRestart(&lt;span style="color: blue"&gt;string &lt;/span&gt;jobName, SPService service, SPServer server, SPJobLockType targetType)
            : &lt;span style="color: blue"&gt;base&lt;/span&gt;(jobName, service, server, targetType)
        {
        }

        &lt;span style="color: blue"&gt;public &lt;/span&gt;WFRestart(&lt;span style="color: blue"&gt;string &lt;/span&gt;jobName, SPWebApplication webApplication)
            : &lt;span style="color: blue"&gt;base&lt;/span&gt;(jobName, webApplication, &lt;span style="color: blue"&gt;null&lt;/span&gt;, SPJobLockType.ContentDatabase)
        {
            &lt;span style="color: blue"&gt;this&lt;/span&gt;.Title = &lt;span style="color: #a31515"&gt;"WFRestart"&lt;/span&gt;;
        }

        &lt;span style="color: blue"&gt;public override void &lt;/span&gt;Execute(&lt;span style="color: #2b91af"&gt;Guid &lt;/span&gt;contentDbId)
        {
            &lt;span style="color: green"&gt;// get a reference to the current site collection's content database
            &lt;/span&gt;SPWebApplication webApplication = &lt;span style="color: blue"&gt;this&lt;/span&gt;.Parent &lt;span style="color: blue"&gt;as &lt;/span&gt;SPWebApplication;
            SPContentDatabase contentDb = webApplication.ContentDatabases[contentDbId];

            &lt;span style="color: green"&gt;// get a reference to the "Tasks" list
            &lt;/span&gt;SPList taskList = contentDb.Sites[&lt;span style="color: brown"&gt;0&lt;/span&gt;].RootWeb.Lists[&lt;span style="color: #a31515"&gt;"Tasks"&lt;/span&gt;];

            &lt;span style="color: green"&gt;// create a new task and set the Title to the current day/time
            &lt;/span&gt;SPListItem newTask = taskList.Items.Add();
            newTask[&lt;span style="color: #a31515"&gt;"Title"&lt;/span&gt;] = &lt;span style="color: #2b91af"&gt;DateTime&lt;/span&gt;.Now.ToString();
            newTask.Update();

            &lt;span style="color: green"&gt;// call this function to restart all the failed instances (e.g. error occurred)
            // you can make this code generic by passing the input parameters using the sharepoint object model
            // for configuration purpose create a list by name 'WFRestartConfig', _
            // put these values in a list item and retrive them to pass to this function
            //WorkflowRestart(site name, list name, workflow Association name)
            &lt;/span&gt;WorkflowRestart(&lt;span style="color: #a31515"&gt;"http://teja19141622:100"&lt;/span&gt;, &lt;span style="color: #a31515"&gt;"MyLibrary"&lt;/span&gt;, &lt;span style="color: #a31515"&gt;"CustomWorkflow"&lt;/span&gt;);

        }

        &lt;span style="color: blue"&gt;private void &lt;/span&gt;WorkflowRestart(&lt;span style="color: blue"&gt;string &lt;/span&gt;strSite, &lt;span style="color: blue"&gt;string &lt;/span&gt;strList, &lt;span style="color: blue"&gt;string &lt;/span&gt;strWFAssociation)
        {
            &lt;span style="color: green"&gt;//string strSite = textBox1.Text;
            //string strList = textBox2.Text;
            //string strWFAssociation = textBox3.Text;
            &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Guid &lt;/span&gt;wfAssocID = &lt;span style="color: #2b91af"&gt;Guid&lt;/span&gt;.Empty;

            &lt;span style="color: blue"&gt;try
            &lt;/span&gt;{
                &lt;span style="color: blue"&gt;using &lt;/span&gt;(SPSite site = &lt;span style="color: blue"&gt;new &lt;/span&gt;SPSite(strSite))
                {
                    &lt;span style="color: blue"&gt;using &lt;/span&gt;(SPWeb web = site.OpenWeb())
                    {
                        SPList list = web.Lists[strList];
                        &lt;span style="color: blue"&gt;foreach &lt;/span&gt;(SPWorkflowAssociation wfAssoc &lt;span style="color: blue"&gt;in &lt;/span&gt;list.WorkflowAssociations)
                        {
                            &lt;span style="color: blue"&gt;if &lt;/span&gt;(wfAssoc.InternalName.Equals(strWFAssociation))
                            {
                                wfAssocID = wfAssoc.Id;

                                SPListItemCollection itmCol = list.Items;
                                &lt;span style="color: blue"&gt;foreach &lt;/span&gt;(SPListItem item &lt;span style="color: blue"&gt;in &lt;/span&gt;itmCol)
                                {
                                    SPWorkflowCollection wfCol = item.Workflows;
                                    &lt;span style="color: blue"&gt;for &lt;/span&gt;(&lt;span style="color: blue"&gt;int &lt;/span&gt;i = &lt;span style="color: brown"&gt;0&lt;/span&gt;; i &amp;lt; wfCol.Count; i++)
                                    {
                                        &lt;span style="color: blue"&gt;if &lt;/span&gt;(wfCol[i].AssociationId.Equals(wfAssocID))
                                        {
                                            &lt;span style="color: green"&gt;//MessageBox.Show(wfCol[i].InternalState.ToString());
                                            &lt;/span&gt;&lt;span style="color: blue"&gt;if &lt;/span&gt;((wfCol[i].InternalState.ToString() == &lt;span style="color: #a31515"&gt;"Running, Faulting, Terminated"&lt;/span&gt;))
                                            {
                                                &lt;span style="color: green"&gt;//MessageBox.Show("Canceling WF...");
                                                &lt;/span&gt;SPWorkflowManager.CancelWorkflow(wfCol[i]);
                                                &lt;span style="color: green"&gt;//MessageBox.Show("WF Cancelled...");

                                                //MessageBox.Show("Restarting WF...");
                                                &lt;/span&gt;site.WorkflowManager.StartWorkflow(item, wfAssoc, wfAssoc.AssociationData, &lt;span style="color: blue"&gt;true&lt;/span&gt;);
                                                &lt;span style="color: green"&gt;//MessageBox.Show("WF Restarted...");
                                                &lt;/span&gt;&lt;span style="color: blue"&gt;break&lt;/span&gt;;
                                            }
                                        }
                                    }
                                    wfCol = &lt;span style="color: blue"&gt;null&lt;/span&gt;;
                                }
                            }
                        }
                    }
                }
                &lt;span style="color: green"&gt;//MessageBox.Show("Done!");
            &lt;/span&gt;}
            &lt;span style="color: blue"&gt;catch &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;Exception &lt;/span&gt;ex)
            {
                &lt;span style="color: green"&gt;//MessageBox.Show(ex.Message);
            &lt;/span&gt;}
            &lt;span style="color: blue"&gt;finally &lt;/span&gt;{ }
        }

    }
}&lt;/pre&gt;
&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;Timer Job Registration&lt;/span&gt;&lt;/strong&gt;

&lt;/p&gt;
&lt;p&gt;We can use a feature &amp;amp; it&amp;rsquo;s events to register this timer job.&lt;/p&gt;
&lt;p&gt;Feature:&amp;nbsp; WFRestartFeature&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Feature&lt;/span&gt;   
  &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="220DE1B8-B38E-42af-B917-85D99620D0F2"&lt;/span&gt; 
  &lt;span class="attr"&gt;Title&lt;/span&gt;&lt;span class="kwrd"&gt;="WFRestartFeature"&lt;/span&gt; 
  &lt;span class="attr"&gt;Scope&lt;/span&gt;&lt;span class="kwrd"&gt;="Web"&lt;/span&gt; 
  &lt;span class="attr"&gt;ReceiverAssembly&lt;/span&gt;&lt;span class="kwrd"&gt;="WFRestart, Version=1.0.0.0, Culture=neutral, PublicKeyToken=972558cd6f822bd6"&lt;/span&gt; 
  &lt;span class="attr"&gt;ReceiverClass&lt;/span&gt;&lt;span class="kwrd"&gt;="WFRestart.WFRestartInstall"&lt;/span&gt;  
  &lt;span class="attr"&gt;Hidden&lt;/span&gt;&lt;span class="kwrd"&gt;="False"&lt;/span&gt; 
  &lt;span class="attr"&gt;xmlns&lt;/span&gt;&lt;span class="kwrd"&gt;="http://schemas.microsoft.com/sharepoint/"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Feature&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;

&lt;/p&gt;
&lt;p&gt;Feature Receiver:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Collections.Generic;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Linq;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Text;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.SharePoint;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.SharePoint.Administration;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; WFRestart
{
    &lt;span class="kwrd"&gt;class&lt;/span&gt; WFRestartInstall : SPFeatureReceiver 
    {
        &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; JOB_NAME = &lt;span class="str"&gt;"WFRestart"&lt;/span&gt;;
         &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; FeatureInstalled (SPFeatureReceiverProperties properties) {
       }
     
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; FeatureUninstalling (SPFeatureReceiverProperties properties) {
        }
     
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; FeatureActivated (SPFeatureReceiverProperties properties) {
          SPSite site = properties.Feature.Parent &lt;span class="kwrd"&gt;as&lt;/span&gt; SPSite;

          &lt;span class="rem"&gt;// this is for testing purpose, you can put your site URL here under which you want to register the timer job, &lt;/span&gt;
          &lt;span class="rem"&gt;// you can use the site object as mentioned above &lt;/span&gt;
          SPSite jobSite = &lt;span class="kwrd"&gt;new&lt;/span&gt; SPSite(&lt;span class="str"&gt;"http://teja19141622:100"&lt;/span&gt;);

          &lt;span class="rem"&gt;// make sure the job isn't already registered&lt;/span&gt;
          &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (SPJobDefinition job &lt;span class="kwrd"&gt;in&lt;/span&gt; jobSite.WebApplication.JobDefinitions)
          {
              &lt;span class="kwrd"&gt;if&lt;/span&gt; (job.Name == JOB_NAME)
              job.Delete();
          }
     
          &lt;span class="rem"&gt;// install the job&lt;/span&gt;
          WFRestart wfRestartJob = &lt;span class="kwrd"&gt;new&lt;/span&gt; WFRestart(JOB_NAME, jobSite.WebApplication);
     
          SPMinuteSchedule schedule = &lt;span class="kwrd"&gt;new&lt;/span&gt; SPMinuteSchedule();
          schedule.BeginSecond = 0;
          schedule.EndSecond = 59;
          schedule.Interval = 5;
          wfRestartJob.Schedule = schedule;

          wfRestartJob.Update();

          jobSite.Dispose();
        }

        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; FeatureDeactivating(SPFeatureReceiverProperties properties)
        {
            SPSite site = properties.Feature.Parent &lt;span class="kwrd"&gt;as&lt;/span&gt; SPSite;

            &lt;span class="rem"&gt;// this is for testing purpose, you can put your site URL here under which you want to unregister the timer job, &lt;/span&gt;
            &lt;span class="rem"&gt;// you can use the site object as mentioned above &lt;/span&gt;
            SPSite jobSite = &lt;span class="kwrd"&gt;new&lt;/span&gt; SPSite(&lt;span class="str"&gt;"http://teja19141622:100"&lt;/span&gt;);

            &lt;span class="rem"&gt;// delete the job&lt;/span&gt;
            &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (SPJobDefinition job &lt;span class="kwrd"&gt;in&lt;/span&gt; jobSite.WebApplication.JobDefinitions)
            {
                &lt;span class="kwrd"&gt;if&lt;/span&gt; (job.Name == JOB_NAME)
                    job.Delete();
            }
            jobSite.Dispose();
        }
    }
}&lt;/pre&gt;
&lt;p&gt;

&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;All the failed workflow instances will automatically restart within 5 min.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/3240.image_5F00_07198044.png"&gt;&lt;img height="83" width="902" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-05-23-metablogapi/5315.image_5F00_thumb_5F00_72B3BAB8.png" alt="image" border="0" title="image" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10015899" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Code+Samples/">Code Samples</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Coding+Tips/">Coding Tips</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Snippets/">Snippets</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/How+To/">How To</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/MOSS+2007/">MOSS 2007</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Workflow/">Workflow</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Object+Model/">Object Model</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Custom+Solutions/">Custom Solutions</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Timer+Job/">Timer Job</category></item><item><title>Not to allow Contributor users to access webpart menu of the webparts</title><link>http://blogs.msdn.com/b/tejasr/archive/2010/03/26/not-to-allow-contributor-users-to-access-webpart-menu-of-the-webparts.aspx</link><pubDate>Fri, 26 Mar 2010 20:46:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9985944</guid><dc:creator>-Tejas</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/tejasr/rsscomments.aspx?WeblogPostID=9985944</wfw:commentRss><comments>http://blogs.msdn.com/b/tejasr/archive/2010/03/26/not-to-allow-contributor-users-to-access-webpart-menu-of-the-webparts.aspx#comments</comments><description>&lt;p&gt;One of my customers had a requirement in which Contributor users should not be allowed to access webpart menu of the webparts on the home page. &lt;/p&gt; &lt;p&gt;Contributor users will get the webpart menu like below for all the webparts which are present on the page. Our requirement is to remove this menu.&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/tejasr/WindowsLiveWriter/Nottoallowcontributoruserstoclosethewebp_13153/t_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="t" border="0" alt="t" src="http://blogs.msdn.com/blogfiles/tejasr/WindowsLiveWriter/Nottoallowcontributoruserstoclosethewebp_13153/t_thumb.png" width="809" height="144"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;There is no direct permission setting for this requirement in SharePoint Permissions. If we view the Personal Permission settings of Contributor role, It is like below.&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/tejasr/WindowsLiveWriter/Nottoallowcontributoruserstoclosethewebp_13153/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/tejasr/WindowsLiveWriter/Nottoallowcontributoruserstoclosethewebp_13153/image_thumb.png" width="391" height="178"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;If we remove the Permission for “Update Personal Web Parts” then it automatically removes the Permission for “Add/Remove Personal Web Parts” as well(shown below). In customer’s requirement, he wants to allow Contributor users to add/remove the webparts but doesn’t want to allow them to personalize it. Users should not get webpart menu so that they can change the webpart properties / close the webparts accidently. Customer wants to give Contributor rights to users for his own internal purpose so that he can manage their personalization settings in his own custom solution.&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/tejasr/WindowsLiveWriter/Nottoallowcontributoruserstoclosethewebp_13153/image_4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/tejasr/WindowsLiveWriter/Nottoallowcontributoruserstoclosethewebp_13153/image_thumb_1.png" width="405" height="192"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;Solution&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;After thinking of some different ideas, we decided to take JavaScript path. We thought of executing a JavaScript on the page which can remove this webpart menu from all the webparts. &lt;/p&gt; &lt;p&gt;SharePoint puts a hidden &lt;strong&gt;&amp;lt;span&amp;gt;&lt;/strong&gt; covering the complete menu control in it and whenever user clicks on the menu button, it brings the menuitems on the fly through JavaScript.&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;span &lt;/span&gt;&lt;span style="color: red"&gt;style&lt;/span&gt;&lt;span style="color: blue"&gt;="&lt;/span&gt;&lt;span style="color: red"&gt;display&lt;/span&gt;&lt;span style="color: blue"&gt;:none;"&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;menu &lt;/span&gt;&lt;span style="color: red"&gt;id&lt;/span&gt;&lt;span style="color: blue"&gt;="&lt;strong&gt;MSOMenu_WebPartMenu&lt;/strong&gt;" &lt;/span&gt;&lt;span style="color: red"&gt;class&lt;/span&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;span style="color: blue"&gt;="ms-SrvMenuUI"&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;ie&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: maroon"&gt;menuitem &lt;/span&gt;&lt;span style="color: red"&gt;id&lt;/span&gt;&lt;span style="color: blue"&gt;="MSOMenu_Minimize" &lt;/span&gt;&lt;span style="color: red"&gt;onMenuClick&lt;/span&gt;&lt;span style="color: blue"&gt;="javascript:MSOLayout_MinimizeRestore(MenuWebPart)" &lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;span style="color: blue"&gt;="option"&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Minimize&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon"&gt;ie&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: maroon"&gt;menuitem&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;ie&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: maroon"&gt;menuitem &lt;/span&gt;&lt;span style="color: red"&gt;id&lt;/span&gt;&lt;span style="color: blue"&gt;="&lt;strong&gt;MSOMenu_Restore&lt;/strong&gt;" &lt;/span&gt;&lt;span style="color: red"&gt;onMenuClick&lt;/span&gt;&lt;span style="color: blue"&gt;="javascript:MSOLayout_MinimizeRestore(MenuWebPart)" &lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;span style="color: blue"&gt;="option"&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Restore&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon"&gt;ie&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: maroon"&gt;menuitem&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;ie&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: maroon"&gt;menuitem &lt;/span&gt;&lt;span style="color: red"&gt;id&lt;/span&gt;&lt;span style="color: blue"&gt;="&lt;strong&gt;MSOMenu_Close&lt;/strong&gt;" &lt;/span&gt;&lt;span style="color: red"&gt;onMenuClick&lt;/span&gt;&lt;span style="color: blue"&gt;="javascript:MSOLayout_RemoveWebPart(MenuWebPart)" &lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;span style="color: blue"&gt;="option"&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Close&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon"&gt;ie&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: maroon"&gt;menuitem&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;ie&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: maroon"&gt;menuitem &lt;/span&gt;&lt;span style="color: red"&gt;id&lt;/span&gt;&lt;span style="color: blue"&gt;="&lt;strong&gt;MSOMenu_Delete&lt;/strong&gt;" &lt;/span&gt;&lt;span style="color: red"&gt;iconSrc&lt;/span&gt;&lt;span style="color: blue"&gt;="/_layouts/images/DelItem.gif" &lt;/span&gt;&lt;span style="color: red"&gt;onMenuClick&lt;/span&gt;&lt;span style="color: blue"&gt;="if(confirm('You are about to permanently delete this Web Part. Are you sure you want to do this?\nTo delete this Web Part, click OK. To keep this Web Part, click Cancel.')) {MSOWebPartPage_partDeleted = MenuWebPartID;MSOWebPartPage_MenuDoPostBack('ctl00$m', MenuWebPartID + ';MSOMenu_Delete');}" &lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;span style="color: blue"&gt;="option"&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Delete&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon"&gt;ie&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: maroon"&gt;menuitem&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;ie&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: maroon"&gt;menuitem &lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;="separator" /&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;ie&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: maroon"&gt;menuitem &lt;/span&gt;&lt;span style="color: red"&gt;title&lt;/span&gt;&lt;span style="color: blue"&gt;="Change properties of this shared Web Part. These changes will apply to all users." &lt;/span&gt;&lt;span style="color: red"&gt;id&lt;/span&gt;&lt;span style="color: blue"&gt;="MSOMenu_Edit" &lt;/span&gt;&lt;span style="color: red"&gt;iconSrc&lt;/span&gt;&lt;span style="color: blue"&gt;="/_layouts/images/EditItem.gif" &lt;/span&gt;&lt;span style="color: red"&gt;onMenuClick&lt;/span&gt;&lt;span style="color: blue"&gt;="javascript:MSOTlPn_ShowToolPane2Wrapper('Edit', 16, MenuWebPartID)" &lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;span style="color: blue"&gt;="option"&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Modify Shared Web Part&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon"&gt;ie&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: maroon"&gt;menuitem&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;ie&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: maroon"&gt;menuitem &lt;/span&gt;&lt;span style="color: red"&gt;id&lt;/span&gt;&lt;span style="color: blue"&gt;="&lt;strong&gt;MSOMenu_Connections&lt;/strong&gt;" &lt;/span&gt;&lt;span style="color: red"&gt;onMenuClick&lt;/span&gt;&lt;span style="color: blue"&gt;="" &lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;span style="color: blue"&gt;="option"&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Connections&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon"&gt;ie&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: maroon"&gt;menuitem&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;ie&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: maroon"&gt;menuitem &lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;="separator" /&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;ie&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: maroon"&gt;menuitem &lt;/span&gt;&lt;span style="color: red"&gt;id&lt;/span&gt;&lt;span style="color: blue"&gt;="MSOMenu_Export" &lt;/span&gt;&lt;span style="color: red"&gt;onMenuClick&lt;/span&gt;&lt;span style="color: blue"&gt;="javascript:MSOWebPartPage_ExportCheckWarning('\u002f_vti_bin\u002fexportwp.aspx?pageurl=http\u00253A\u00252F\u00252Fms10\u00253A101\u00252Fdefault\u00252Easpx\u0026guidstring='+ escape(MenuWebPartID), MenuWebPart.getAttribute('HasPers') == 'true')" &lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;span style="color: blue"&gt;="option"&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Export...&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon"&gt;ie&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: maroon"&gt;menuitem&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;ie&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: maroon"&gt;menuitem &lt;/span&gt;&lt;span style="color: red"&gt;id&lt;/span&gt;&lt;span style="color: blue"&gt;="&lt;strong&gt;MSOMenu_Help&lt;/strong&gt;" &lt;/span&gt;&lt;span style="color: red"&gt;iconSrc&lt;/span&gt;&lt;span style="color: blue"&gt;="/_layouts/images/HelpIcon.gif" &lt;/span&gt;&lt;span style="color: red"&gt;onMenuClick&lt;/span&gt;&lt;span style="color: blue"&gt;="MSOWebPartPage_SetNewWindowLocation(MenuWebPart.getAttribute('helpLink'), MenuWebPart.getAttribute('helpMode'))" &lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;="option" &lt;/span&gt;&lt;span style="color: red"&gt;style&lt;/span&gt;&lt;span style="color: blue"&gt;="&lt;/span&gt;&lt;span style="color: red"&gt;display&lt;/span&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;span style="color: blue"&gt;:none"&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Help&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon"&gt;ie&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: maroon"&gt;menuitem&lt;/span&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon"&gt;menu&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon"&gt;span&lt;/span&gt;&lt;/font&gt;&lt;span style="color: blue"&gt;&lt;font size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="color: blue"&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;We need to write a script which can hide these menu and menuitems. Following is the script which can hide these elements.&lt;/p&gt;&lt;pre class="code"&gt;&lt;font size="2"&gt;&lt;font face="Verdana"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;script &lt;/span&gt;&lt;span style="color: red"&gt;language&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="Verdana"&gt;&lt;span style="color: blue"&gt;="JavaScript"&amp;gt;
    var &lt;/span&gt;doc = document.getElementsByTagName(&lt;span style="color: maroon"&gt;&lt;strong&gt;'ie:menuitem'&lt;/strong&gt;&lt;/span&gt;);
    &lt;span style="color: blue"&gt;for &lt;/span&gt;(&lt;span style="color: blue"&gt;var &lt;/span&gt;i = 0; i &amp;lt; doc.length; i++) 
    {
        itm = doc[i];
        &lt;span style="color: blue"&gt;if &lt;/span&gt;(itm.id.match(&lt;span style="color: maroon"&gt;&lt;strong&gt;'MSOMenu'&lt;/strong&gt;&lt;/span&gt;) != &lt;span style="color: blue"&gt;null&lt;/span&gt;) 
        {
            itm.hidden = &lt;span style="color: blue"&gt;true&lt;/span&gt;; 
        }
    } 
&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon"&gt;script&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;span style="color: blue"&gt;&lt;font size="2" face="Verdana"&gt;&amp;gt;&lt;/font&gt;

&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;Now we need to think of a way to run this script on the home page.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Option 1.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If we just want to enable this on a single site then we can add this script at the bottom of the master page in SharePoint Designer. remember that when you do modification through SharePoint Designer then your site becomes customized.&lt;/p&gt;
&lt;p&gt;Put this JavaScript just before “&amp;lt;/BODY&amp;gt;”.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Option 2.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Put this script in a .js file and use it in master page.&lt;/p&gt;
&lt;p&gt;&lt;u&gt;Step 1&lt;/u&gt;&lt;/p&gt;
&lt;p&gt;Create a “TJ.JS” file and put it in “C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\1033”.&lt;/p&gt;&lt;pre class="code"&gt;&lt;font size="2" face="Verdana"&gt;var doc = document.getElementsByTagName('ie:menuitem');
for (var i = 0; i &amp;lt; doc.length; i++) 
{
   itm = doc[i];
   if (itm.id.match('MSOMenu') != null) 
   {
      itm.hidden = true;
   }
}&lt;/font&gt;&lt;/pre&gt;&lt;pre class="code"&gt;&lt;font size="2" face="Verdana"&gt;&lt;u&gt;Step 2&lt;/u&gt;&lt;/font&gt;&lt;/pre&gt;&lt;pre class="code"&gt;&lt;font size="2"&gt;&lt;font face="Verdana"&gt;Use this file in your master page, &lt;br&gt;Find a control, &lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;SharePoint&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: maroon"&gt;ScriptLink &lt;/span&gt;&lt;span style="color: red"&gt;language&lt;/span&gt;&lt;span style="color: blue"&gt;="javascript" &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;="core.js" &lt;/span&gt;&lt;span style="color: red"&gt;Defer&lt;/span&gt;&lt;span style="color: blue"&gt;="true" &lt;/span&gt;&lt;span style="color: red"&gt;runat&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;span style="color: blue"&gt;&lt;font size="2" face="Verdana"&gt;="server"/&amp;gt;&lt;/font&gt; &lt;font color="#000000"&gt;&lt;font size="2" face="Verdana"&gt;and put the following line just below it.&lt;/font&gt;&lt;/pre&gt;&lt;pre class="code"&gt;&lt;font size="2"&gt;&lt;font face="Verdana"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;SharePoint&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: maroon"&gt;ScriptLink &lt;/span&gt;&lt;span style="color: red"&gt;language&lt;/span&gt;&lt;span style="color: blue"&gt;="javascript" &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;="tj.js" &lt;/span&gt;&lt;span style="color: red"&gt;Defer&lt;/span&gt;&lt;span style="color: blue"&gt;="true" &lt;/span&gt;&lt;span style="color: red"&gt;runat&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;span style="color: blue"&gt;&lt;font size="2" face="Verdana"&gt;="server"/&amp;gt;
&lt;/font&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;Save and check the home page.&lt;/p&gt;&lt;p&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Option 3.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Delegate control : &lt;/p&gt;
&lt;p&gt;We can deploy a feature and enable/disable it whenever required on a site or on any other future site.&lt;/p&gt;
&lt;p&gt;&lt;u&gt;Step 1&lt;/u&gt;&lt;/p&gt;
&lt;p&gt;Create a user control, &lt;/p&gt;
&lt;p&gt;Name it as “MSOMenu.ascx” and put it in “C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES”.&lt;/p&gt;&lt;pre class="code"&gt;&lt;font size="2"&gt;&lt;font face="Verdana"&gt;&lt;span style="background: yellow"&gt;&amp;lt;%&lt;/span&gt;&lt;span style="color: blue"&gt;@ &lt;/span&gt;&lt;span style="color: red"&gt;Control Language&lt;/span&gt;&lt;span style="color: blue"&gt;="C#" &lt;/span&gt;&lt;span style="color: red"&gt;ClassName&lt;/span&gt;&lt;span style="color: blue"&gt;="MSOMenu" &lt;/span&gt;&lt;span style="background: yellow"&gt;%&amp;gt;&lt;/span&gt; 
&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;script &lt;/span&gt;&lt;span style="color: red"&gt;language&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="Verdana"&gt;&lt;span style="color: blue"&gt;="JavaScript"&amp;gt;
    var &lt;/span&gt;doc = document.getElementsByTagName(&lt;span style="color: maroon"&gt;&lt;strong&gt;'ie:menuitem'&lt;/strong&gt;&lt;/span&gt;);
    &lt;span style="color: blue"&gt;for &lt;/span&gt;(&lt;span style="color: blue"&gt;var &lt;/span&gt;i = 0; i &amp;lt; doc.length; i++) {
        itm = doc[i];
        &lt;span style="color: blue"&gt;if &lt;/span&gt;(itm.id.match(&lt;span style="color: maroon"&gt;&lt;strong&gt;'MSOMenu'&lt;/strong&gt;&lt;/span&gt;) != &lt;span style="color: blue"&gt;null&lt;/span&gt;) {
            itm.hidden = &lt;span style="color: blue"&gt;true&lt;/span&gt;;
        }
    } 
&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon"&gt;script&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;span style="color: blue"&gt;&lt;font size="2" face="Verdana"&gt;&amp;gt;&lt;/font&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;u&gt;Step 2&lt;/u&gt;&lt;/p&gt;
&lt;p&gt;Now create a feature with name “MSOMenu”, install and activate it.&lt;/p&gt;
&lt;p&gt;Feature.xml&lt;/p&gt;
&lt;p&gt;&lt;span style="color: blue"&gt;&lt;font size="2"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;font size="2"&gt;&lt;span style="color: #a31515"&gt;Feature&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: red"&gt;Id&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;292B7CA8-0A69-46e9-890C-CF55613966D0&lt;/span&gt;"&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: red"&gt;Title&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;&lt;strong&gt;MSOMenu&lt;/strong&gt;&lt;/span&gt;"&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: red"&gt;Description&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;To hide webpart menu&lt;/span&gt;"&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: red"&gt;Scope&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;Web&lt;/span&gt;"&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: red"&gt;Hidden&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;FALSE&lt;/span&gt;"&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: red"&gt;xmlns&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;http://schemas.microsoft.com/sharepoint/&lt;/span&gt;" &lt;/font&gt;&lt;font size="2"&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br&gt;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;ElementManifests&lt;/span&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;ElementManifest &lt;/span&gt;&lt;span style="color: red"&gt;Location&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;elements.xml&lt;/span&gt;"&lt;/font&gt;&lt;font size="2"&gt;&lt;span style="color: blue"&gt;/&amp;gt;&lt;br&gt;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;ElementManifests&lt;/span&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Feature&lt;/span&gt;&lt;/font&gt;&lt;span style="color: blue"&gt;&lt;font size="2"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;&lt;/p&gt;&lt;/span&gt;
&lt;p&gt;Elements.xml&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Elements &lt;/span&gt;&lt;span style="color: red"&gt;xmlns&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;http://schemas.microsoft.com/sharepoint/&lt;/span&gt;"&lt;/font&gt;&lt;span style="color: blue"&gt;&lt;font size="2"&gt;&amp;gt;&lt;br&gt;&amp;nbsp; &amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;font size="2"&gt;&lt;span style="color: #a31515"&gt;Control&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: red"&gt;ControlSrc&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;~/_controltemplates/MSOMenu.ascx&lt;/span&gt;"&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: red"&gt;Sequence&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;99&lt;/span&gt;"&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: red"&gt;Id&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;&lt;strong&gt;MSOMenu&lt;/strong&gt;&lt;/span&gt;" &lt;/font&gt;&lt;font size="2"&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br&gt;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Control&lt;/span&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Elements&lt;/span&gt;&lt;/font&gt;&lt;span style="color: blue"&gt;&lt;font size="2"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;u&gt;Step 3&lt;/u&gt;&lt;/p&gt;
&lt;p&gt;Add following delegate control entry in your custom master page (A copy of default.master, this is required if you don’t want to modify master page from SharePoint Designer and make your site customized from SharePoint designer). Add this tag just before “&amp;lt;/BODY&amp;gt;”.&lt;/p&gt;&lt;pre class="code"&gt;&lt;font size="2"&gt;&lt;font face="Verdana"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;SharePoint&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: maroon"&gt;DelegateControl &lt;/span&gt;&lt;span style="color: red"&gt;runat&lt;/span&gt;&lt;span style="color: blue"&gt;="server" &lt;/span&gt;&lt;span style="color: red"&gt;ControlId&lt;/span&gt;&lt;span style="color: blue"&gt;="MSOMenu" &lt;/span&gt;&lt;span style="color: red"&gt;AllowMultipleControls&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;span style="color: blue"&gt;&lt;font size="2" face="Verdana"&gt;="true"/&amp;gt;&lt;/font&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;span style="color: blue"&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;font color="#000000" size="2"&gt;Apply the custom master page to your site and check your home page. You won’t find webpart menu coming out when you click on the menu button.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/tejasr/WindowsLiveWriter/Nottoallowcontributoruserstoclosethewebp_13153/t2_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="t2" border="0" alt="t2" src="http://blogs.msdn.com/blogfiles/tejasr/WindowsLiveWriter/Nottoallowcontributoruserstoclosethewebp_13153/t2_thumb.png" width="833" height="126"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;br&gt;&lt;/span&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9985944" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Customization/">Customization</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/WSS+v3/">WSS v3</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/MOSS+2007/">MOSS 2007</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Features/">Features</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/JavaScript/">JavaScript</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Permissions/">Permissions</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/DelegateControls/">DelegateControls</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Webpart+Menu/">Webpart Menu</category></item><item><title>Webpart code to dynamically load a page viewer webpart to display a requested page</title><link>http://blogs.msdn.com/b/tejasr/archive/2010/03/06/webpart-code-to-dynamically-load-a-page-viewer-webpart-to-display-a-requested-page.aspx</link><pubDate>Sat, 06 Mar 2010 06:39:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9974011</guid><dc:creator>-Tejas</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/tejasr/rsscomments.aspx?WeblogPostID=9974011</wfw:commentRss><comments>http://blogs.msdn.com/b/tejasr/archive/2010/03/06/webpart-code-to-dynamically-load-a-page-viewer-webpart-to-display-a-requested-page.aspx#comments</comments><description>&lt;div class="csharpcode"&gt;   &lt;pre&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Runtime.InteropServices;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web.UI;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web.UI.WebControls;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web.UI.WebControls.WebParts;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Xml.Serialization;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.SharePoint;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.SharePoint.WebControls;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.SharePoint.WebPartPages;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Xml;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.ComponentModel;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;&lt;span class="kwrd"&gt;namespace&lt;/span&gt; WebPart1&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt;{&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;    [Guid(&lt;span class="str"&gt;&amp;quot;8517b24e-202c-4319-8960-303996a3fdb6&amp;quot;&lt;/span&gt;)]&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; WebPart1 : System.Web.UI.WebControls.WebParts.WebPart&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  18:  &lt;/span&gt;    {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  19:  &lt;/span&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; WebPart1()&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  20:  &lt;/span&gt;        {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  21:  &lt;/span&gt;            &lt;span class="kwrd"&gt;this&lt;/span&gt;.ExportMode = WebPartExportMode.All;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  22:  &lt;/span&gt;        }&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  23:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  24:  &lt;/span&gt;        &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; CreateChildControls()&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  25:  &lt;/span&gt;        {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  26:  &lt;/span&gt;            &lt;span class="kwrd"&gt;base&lt;/span&gt;.CreateChildControls();&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  27:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  28:  &lt;/span&gt;            &lt;span class="rem"&gt;// TODO: add custom rendering code here.&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  29:  &lt;/span&gt;            &lt;span class="rem"&gt;// Label label = new Label();&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  30:  &lt;/span&gt;            &lt;span class="rem"&gt;// label.Text = &amp;quot;Hello World&amp;quot;;&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  31:  &lt;/span&gt;            &lt;span class="rem"&gt;// this.Controls.Add(label);&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  32:  &lt;/span&gt;        }&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  33:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  34:  &lt;/span&gt;        &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Render(HtmlTextWriter writer)&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  35:  &lt;/span&gt;        {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  36:  &lt;/span&gt;            SPWeb web = SPContext.GetContext(&lt;span class="kwrd"&gt;this&lt;/span&gt;.Context).Web;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  37:  &lt;/span&gt;            web.AllowUnsafeUpdates = &lt;span class="kwrd"&gt;true&lt;/span&gt;;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  38:  &lt;/span&gt;            SPUser user = web.CurrentUser;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  39:  &lt;/span&gt;            SPWebPartCollection collection = web.GetWebPartCollection(&lt;span class="str"&gt;&amp;quot;default.aspx&amp;quot;&lt;/span&gt;, Storage.Personal);&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  40:  &lt;/span&gt;            writer.Write(user.LoginName);&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  41:  &lt;/span&gt;            PageViewerWebPart lobjWebPArt = &lt;span class="kwrd"&gt;new&lt;/span&gt; PageViewerWebPart();&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  42:  &lt;/span&gt;            &lt;span class="rem"&gt;//Change to the JSP URL or your web Application&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  43:  &lt;/span&gt;            lobjWebPArt.ContentLink = &lt;span class="str"&gt;&amp;quot;http://www.microsoft.com?SID=&amp;quot;&lt;/span&gt; + user.LoginName.ToString() + &lt;span class="str"&gt;&amp;quot;&amp;amp;VIEW=domain&amp;quot;&lt;/span&gt;;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  44:  &lt;/span&gt;            collection.Add(lobjWebPArt);web.Dispose();&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  45:  &lt;/span&gt;        }&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  46:  &lt;/span&gt;    }&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  47:  &lt;/span&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;


.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;&lt;font size="1" face="Tahoma"&gt;:: Please note that I would have just uploaded my initial code and you might want to consider proper optimization of the code and disposal of objects properly. I might not have updated the latest code here.&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9974011" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Code+Samples/">Code Samples</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Coding+Tips/">Coding Tips</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/How+To/">How To</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/WSS+v3/">WSS v3</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/MOSS+2007/">MOSS 2007</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Object+Model/">Object Model</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Custom+Solutions/">Custom Solutions</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Webparts/">Webparts</category></item><item><title>Code snippet to copy documents from one document library to another</title><link>http://blogs.msdn.com/b/tejasr/archive/2010/03/06/code-snippet-to-copy-documents-from-one-document-library-to-another.aspx</link><pubDate>Sat, 06 Mar 2010 06:36:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9974010</guid><dc:creator>-Tejas</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/tejasr/rsscomments.aspx?WeblogPostID=9974010</wfw:commentRss><comments>http://blogs.msdn.com/b/tejasr/archive/2010/03/06/code-snippet-to-copy-documents-from-one-document-library-to-another.aspx#comments</comments><description>&lt;div class="csharpcode"&gt;   &lt;pre&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; (SPSite site = &lt;span class="kwrd"&gt;new&lt;/span&gt; SPSite(&lt;span class="str"&gt;&amp;quot;http://ms10:200/sites/200&amp;quot;&lt;/span&gt;))&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;            {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;                &lt;span class="kwrd"&gt;using&lt;/span&gt; (SPWeb web = site.OpenWeb())&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;                {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;                    SPList lib1 = (SPDocumentLibrary)web.Lists[&lt;span class="str"&gt;&amp;quot;Documents&amp;quot;&lt;/span&gt;];&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;                    SPList lib2 = (SPDocumentLibrary)web.Lists[&lt;span class="str"&gt;&amp;quot;Site Collection Documents&amp;quot;&lt;/span&gt;];&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;                    &lt;span class="kwrd"&gt;byte&lt;/span&gt;[] fileBytes = &lt;span class="kwrd"&gt;null&lt;/span&gt;;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;                    &lt;span class="kwrd"&gt;string&lt;/span&gt; destUrl = &lt;span class="kwrd"&gt;null&lt;/span&gt;;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;                    SPFile destFile = &lt;span class="kwrd"&gt;null&lt;/span&gt;;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;                    &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (SPListItem item1 &lt;span class="kwrd"&gt;in&lt;/span&gt; lib1.Items)&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;                    {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;                        fileBytes = item1.File.OpenBinary();&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;                        destUrl = lib2.RootFolder.Url + &lt;span class="str"&gt;&amp;quot;/&amp;quot;&lt;/span&gt; + item1.File.Name;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;                        destFile = lib2.RootFolder.Files.Add(destUrl, fileBytes, &lt;span class="kwrd"&gt;true&lt;/span&gt; &lt;span class="rem"&gt;/*overwrite*/&lt;/span&gt;);&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;                        fileBytes = &lt;span class="kwrd"&gt;null&lt;/span&gt;;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt;                        destUrl = &lt;span class="kwrd"&gt;null&lt;/span&gt;;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  18:  &lt;/span&gt;                        destFile = &lt;span class="kwrd"&gt;null&lt;/span&gt;;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  19:  &lt;/span&gt;                    }&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  20:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  21:  &lt;/span&gt;                    lib1 = &lt;span class="kwrd"&gt;null&lt;/span&gt;;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  22:  &lt;/span&gt;                    lib2 = &lt;span class="kwrd"&gt;null&lt;/span&gt;;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  23:  &lt;/span&gt;                }&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  24:  &lt;/span&gt;            }&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  25:  &lt;/span&gt;            MessageBox.Show(&lt;span class="str"&gt;&amp;quot;Done!&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;&lt;font size="1" face="Tahoma"&gt;:: Please note that I would have just uploaded my initial code and you might want to consider proper optimization of the code and disposal of objects properly. I might not have updated the latest code here.&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9974010" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Code+Samples/">Code Samples</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Coding+Tips/">Coding Tips</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Snippets/">Snippets</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/How+To/">How To</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/MOSS+2007/">MOSS 2007</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+Foundation+2010/">SharePoint Foundation 2010</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/SharePoint+Server+2010/">SharePoint Server 2010</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Document+libraries/">Document libraries</category></item><item><title>Code snippet to create a Tasks list and associate it with a Parallel Approval workflow in a Pages library</title><link>http://blogs.msdn.com/b/tejasr/archive/2010/03/06/code-snippet-to-create-a-tasks-list-and-associate-it-with-a-parallel-approval-workflow-in-a-pages-library.aspx</link><pubDate>Sat, 06 Mar 2010 06:20:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9974005</guid><dc:creator>-Tejas</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/tejasr/rsscomments.aspx?WeblogPostID=9974005</wfw:commentRss><comments>http://blogs.msdn.com/b/tejasr/archive/2010/03/06/code-snippet-to-create-a-tasks-list-and-associate-it-with-a-parallel-approval-workflow-in-a-pages-library.aspx#comments</comments><description>&lt;p&gt;The requirement to write this code was, After export/import, workflow modification for approvers was failing. Approvers were not able to perform the Approval workflow operations and then we tested that if we create a new Tasks list and modify the existing Approval workflow association then everything starts working so we needed a code which can do this operation for whole site collection.&lt;/p&gt;  &lt;p&gt;Following code snippet will create a Tasks list with name “MS Tasks” and associate it with a Parallel Approval workflow in a “Pages” library in root site as well as in all the sub sites.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/tejasr/WindowsLiveWriter/CodesnippettocreateaTaskslistandassociat_A689/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/tejasr/WindowsLiveWriter/CodesnippettocreateaTaskslistandassociat_A689/image_thumb.png" width="587" height="163" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;div class="csharpcode"&gt;   &lt;pre&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.ComponentModel;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Data;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Drawing;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Linq;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Text;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Windows.Forms;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.SharePoint;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.SharePoint.Publishing;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.SharePoint.Workflow;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;&lt;span class="kwrd"&gt;namespace&lt;/span&gt; WorkflowAssoc&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;{&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;partial&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; Form1 : Form&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;    {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; Form1()&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  18:  &lt;/span&gt;        {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  19:  &lt;/span&gt;            InitializeComponent();&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  20:  &lt;/span&gt;        }&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  21:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  22:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  23:  &lt;/span&gt;        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; button1_Click(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, EventArgs e)&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  24:  &lt;/span&gt;        {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  25:  &lt;/span&gt;            &lt;span class="kwrd"&gt;using&lt;/span&gt; (SPSite site = &lt;span class="kwrd"&gt;new&lt;/span&gt; SPSite(textBox1.Text.Trim()))&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  26:  &lt;/span&gt;            {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  27:  &lt;/span&gt;                &lt;span class="kwrd"&gt;using&lt;/span&gt; (SPWeb web = site.OpenWeb())&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  28:  &lt;/span&gt;                {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  29:  &lt;/span&gt;                    &lt;span class="rem"&gt;//executing for root site&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  30:  &lt;/span&gt;                    WorkflowModification(web);&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  31:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  32:  &lt;/span&gt;                    &lt;span class="rem"&gt;//executing for all subsites&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  33:  &lt;/span&gt;                    &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (SPWeb subweb &lt;span class="kwrd"&gt;in&lt;/span&gt; web.Webs)&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  34:  &lt;/span&gt;                    {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  35:  &lt;/span&gt;                        WorkflowModification(subweb);&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  36:  &lt;/span&gt;                    }&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  37:  &lt;/span&gt;                }&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  38:  &lt;/span&gt;            }&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  39:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  40:  &lt;/span&gt;            MessageBox.Show(&lt;span class="str"&gt;&amp;quot;Done!&amp;quot;&lt;/span&gt;);&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  41:  &lt;/span&gt;        }&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  42:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  43:  &lt;/span&gt;        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; WorkflowModification(SPWeb web)&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  44:  &lt;/span&gt;        {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  45:  &lt;/span&gt;            &lt;span class="kwrd"&gt;bool&lt;/span&gt; checkTasks = &lt;span class="kwrd"&gt;true&lt;/span&gt;;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  46:  &lt;/span&gt;            &lt;span class="kwrd"&gt;bool&lt;/span&gt; checkPages = &lt;span class="kwrd"&gt;true&lt;/span&gt;;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  47:  &lt;/span&gt;            SPList pages;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  48:  &lt;/span&gt;            SPWorkflowAssociation WFCol;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  49:  &lt;/span&gt;            SPList tasks;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  50:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  51:  &lt;/span&gt;            &lt;span class="rem"&gt;//making sure Pages list is available.&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  52:  &lt;/span&gt;            &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (SPList list &lt;span class="kwrd"&gt;in&lt;/span&gt; web.Lists)&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  53:  &lt;/span&gt;            {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  54:  &lt;/span&gt;                &lt;span class="kwrd"&gt;if&lt;/span&gt; (list.Title == &lt;span class="str"&gt;&amp;quot;Pages&amp;quot;&lt;/span&gt;)&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  55:  &lt;/span&gt;                {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  56:  &lt;/span&gt;                    checkPages = &lt;span class="kwrd"&gt;false&lt;/span&gt;;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  57:  &lt;/span&gt;                }&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  58:  &lt;/span&gt;            }&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  59:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  60:  &lt;/span&gt;            &lt;span class="rem"&gt;//making sure Tasks list is not available.&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  61:  &lt;/span&gt;            &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (SPList list &lt;span class="kwrd"&gt;in&lt;/span&gt; web.Lists)&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  62:  &lt;/span&gt;            {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  63:  &lt;/span&gt;                &lt;span class="kwrd"&gt;if&lt;/span&gt; (list.Title == &lt;span class="str"&gt;&amp;quot;MS Tasks&amp;quot;&lt;/span&gt;)&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  64:  &lt;/span&gt;                {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  65:  &lt;/span&gt;                    checkTasks = &lt;span class="kwrd"&gt;false&lt;/span&gt;;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  66:  &lt;/span&gt;                }&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  67:  &lt;/span&gt;            }&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  68:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  69:  &lt;/span&gt;            &lt;span class="rem"&gt;//execute only if Tasks list not available and Pages list is available&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  70:  &lt;/span&gt;            &lt;span class="kwrd"&gt;if&lt;/span&gt; (checkTasks &amp;amp;&amp;amp; !checkPages)&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  71:  &lt;/span&gt;            {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  72:  &lt;/span&gt;                &lt;span class="rem"&gt;//creating a Tasks list&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  73:  &lt;/span&gt;                web.Lists.Add(&lt;span class="str"&gt;&amp;quot;MS Tasks&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;MS Tasks List&amp;quot;&lt;/span&gt;, SPListTemplateType.Tasks);&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  74:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  75:  &lt;/span&gt;                &lt;span class="rem"&gt;//getting an object of Pages list&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  76:  &lt;/span&gt;                pages = web.Lists[&lt;span class="str"&gt;&amp;quot;Pages&amp;quot;&lt;/span&gt;];&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  77:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  78:  &lt;/span&gt;                &lt;span class="rem"&gt;//getting an object of Tasks list and setting it in workflow association&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  79:  &lt;/span&gt;                tasks = web.Lists[&lt;span class="str"&gt;&amp;quot;MS Tasks&amp;quot;&lt;/span&gt;];&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  80:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  81:  &lt;/span&gt;                &lt;span class="rem"&gt;//getting an object of &amp;quot;Parallel Approval&amp;quot; workflow&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  82:  &lt;/span&gt;                &lt;span class="rem"&gt;//this is the only workflow available so first index&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  83:  &lt;/span&gt;                &lt;span class="kwrd"&gt;for&lt;/span&gt; (&lt;span class="kwrd"&gt;int&lt;/span&gt; i = 0; i &amp;lt; pages.WorkflowAssociations.Count; i++)&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  84:  &lt;/span&gt;                {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  85:  &lt;/span&gt;                    WFCol = pages.WorkflowAssociations[i];&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  86:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  87:  &lt;/span&gt;                    &lt;span class="rem"&gt;//setting up Tasks list &lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  88:  &lt;/span&gt;                    WFCol.SetTaskList(tasks);&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  89:  &lt;/span&gt;                    WFCol.TaskListTitle = &lt;span class="str"&gt;&amp;quot;MS Tasks&amp;quot;&lt;/span&gt;;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  90:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  91:  &lt;/span&gt;                    &lt;span class="rem"&gt;//updating the workflow association&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  92:  &lt;/span&gt;                    pages.UpdateWorkflowAssociation(WFCol);&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  93:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  94:  &lt;/span&gt;                    &lt;span class="rem"&gt;//clearing the objects&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  95:  &lt;/span&gt;                    WFCol = &lt;span class="kwrd"&gt;null&lt;/span&gt;;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  96:  &lt;/span&gt;                }&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  97:  &lt;/span&gt;                tasks = &lt;span class="kwrd"&gt;null&lt;/span&gt;;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  98:  &lt;/span&gt;                pages = &lt;span class="kwrd"&gt;null&lt;/span&gt;;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  99:  &lt;/span&gt;            }&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 100:  &lt;/span&gt;        }&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 101:  &lt;/span&gt;    }&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 102:  &lt;/span&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/tejasr/WindowsLiveWriter/CodesnippettocreateaTaskslistandassociat_A689/image_4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/tejasr/WindowsLiveWriter/CodesnippettocreateaTaskslistandassociat_A689/image_thumb_1.png" width="695" height="440" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="1" face="Tahoma"&gt;:: Please note that I would have just uploaded my initial code and you might want to consider proper optimization of the code and disposal of objects properly. I might not have updated the latest code here.&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9974005" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Code+Samples/">Code Samples</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Snippets/">Snippets</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/How+To/">How To</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/MOSS+2007/">MOSS 2007</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Workflow/">Workflow</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Object+Model/">Object Model</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Custom+Solutions/">Custom Solutions</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Publishing+features/">Publishing features</category></item><item><title>Event handler code to add incoming emails with subject “Discussion [ID]” as replies</title><link>http://blogs.msdn.com/b/tejasr/archive/2010/03/06/event-handler-code-to-add-incoming-emails-with-subject-discussion-id-as-replies.aspx</link><pubDate>Sat, 06 Mar 2010 05:59:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9973999</guid><dc:creator>-Tejas</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/tejasr/rsscomments.aspx?WeblogPostID=9973999</wfw:commentRss><comments>http://blogs.msdn.com/b/tejasr/archive/2010/03/06/event-handler-code-to-add-incoming-emails-with-subject-discussion-id-as-replies.aspx#comments</comments><description>&lt;p&gt;Here the users will send emails with subject “DiscussionTitle [Discussion ID]” format. If there is a discussion thread present with specified “[Discussion ID]” then it will add the incoming email as a reply in that thread. If ID is not supplied and if there is no discussion thread present with “DiscussionTitle” then it will create a new discussion but if there is any discussion already available then it will ignore that incoming mail.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div class="csharpcode"&gt;   &lt;pre&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; EmailReceived(SPList list, Microsoft.SharePoint.Utilities.SPEmailMessage emailMessage, &lt;span class="kwrd"&gt;string&lt;/span&gt; receiverData)&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;            {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;            &lt;span class="kwrd"&gt;base&lt;/span&gt;.EmailReceived(list, emailMessage, receiverData);&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;            &lt;span class="kwrd"&gt;bool&lt;/span&gt; flag = &lt;span class="kwrd"&gt;false&lt;/span&gt;;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;            &lt;span class="kwrd"&gt;int&lt;/span&gt; id = -1;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;            &lt;span class="kwrd"&gt;string&lt;/span&gt; subject = emailMessage.Headers[&lt;span class="str"&gt;&amp;quot;Subject&amp;quot;&lt;/span&gt;].ToString();&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;            SPUser ous = list.ParentWeb.AllUsers.GetByEmail(emailMessage.Sender);&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;            SPListItemCollection viewColl = list.GetItems(list.Views[&lt;span class="str"&gt;&amp;quot;Subject&amp;quot;&lt;/span&gt;]);&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;            &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (SPListItem item1 &lt;span class="kwrd"&gt;in&lt;/span&gt; viewColl)&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;            {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;                SPListItem item2 = list.GetItemById(item1.ID);&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;                &lt;span class="kwrd"&gt;if&lt;/span&gt; ((item2[&lt;span class="str"&gt;&amp;quot;Subject&amp;quot;&lt;/span&gt;].Equals(subject.Substring(subject.IndexOf(&lt;span class="str"&gt;&amp;quot;:&amp;quot;&lt;/span&gt;) + 2))) || (item2[&lt;span class="str"&gt;&amp;quot;Subject&amp;quot;&lt;/span&gt;].Equals(subject)))&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;                {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;                    flag = &lt;span class="kwrd"&gt;true&lt;/span&gt;;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt;                    &lt;span class="kwrd"&gt;break&lt;/span&gt;;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;                }&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt;            }&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  18:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  19:  &lt;/span&gt;            &lt;span class="kwrd"&gt;if&lt;/span&gt; (subject.IndexOf(&lt;span class="str"&gt;&amp;quot;-[&amp;quot;&lt;/span&gt;) &amp;gt;= 0)&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  20:  &lt;/span&gt;            {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  21:  &lt;/span&gt;                &lt;span class="rem"&gt;//if ((item2[&amp;quot;Subject&amp;quot;].Equals(subject.Substring(subject.IndexOf(&amp;quot;:&amp;quot;) + 2, subject.IndexOf(&amp;quot;-[&amp;quot;))))&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  22:  &lt;/span&gt; &lt;span class="rem"&gt;//|| (item2[&amp;quot;Subject&amp;quot;].Equals(subject.Substring(0, subject.IndexOf(&amp;quot;-[&amp;quot;)))))&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  23:  &lt;/span&gt;                {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  24:  &lt;/span&gt;                    id = Convert.ToInt32(subject.Substring(subject.IndexOf(&lt;span class="str"&gt;&amp;quot;[&amp;quot;&lt;/span&gt;) + 1, (subject.IndexOf(&lt;span class="str"&gt;&amp;quot;]&amp;quot;&lt;/span&gt;) - subject.IndexOf(&lt;span class="str"&gt;&amp;quot;[&amp;quot;&lt;/span&gt;) - 1)));&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  25:  &lt;/span&gt;                    SPListItem item2 = list.GetItemById(id);&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  26:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  27:  &lt;/span&gt;                    SPListItem disc = SPUtility.CreateNewDiscussionReply(item2);&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  28:  &lt;/span&gt;                    disc[&lt;span class="str"&gt;&amp;quot;Body&amp;quot;&lt;/span&gt;] = emailMessage.HtmlBody;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  29:  &lt;/span&gt;                    disc[&lt;span class="str"&gt;&amp;quot;TrimmedBody&amp;quot;&lt;/span&gt;] = emailMessage.HtmlBody;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  30:  &lt;/span&gt;                    disc[&lt;span class="str"&gt;&amp;quot;Editor&amp;quot;&lt;/span&gt;] = ous;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  31:  &lt;/span&gt;                    disc[&lt;span class="str"&gt;&amp;quot;Author&amp;quot;&lt;/span&gt;] = ous;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  32:  &lt;/span&gt;                    disc[&lt;span class="str"&gt;&amp;quot;E-Mail Subject&amp;quot;&lt;/span&gt;] = emailMessage.Headers[&lt;span class="str"&gt;&amp;quot;Subject&amp;quot;&lt;/span&gt;].ToString();&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  33:  &lt;/span&gt;                    disc.Update();&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  34:  &lt;/span&gt;                    flag = &lt;span class="kwrd"&gt;true&lt;/span&gt;;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  35:  &lt;/span&gt;                }&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  36:  &lt;/span&gt;            }&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  37:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  38:  &lt;/span&gt;            &lt;span class="kwrd"&gt;if&lt;/span&gt; (!flag)&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  39:  &lt;/span&gt;            {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  40:  &lt;/span&gt;                SPListItem disc = SPUtility.CreateNewDiscussion(list.Items, emailMessage.Headers[&lt;span class="str"&gt;&amp;quot;Subject&amp;quot;&lt;/span&gt;].ToString());&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  41:  &lt;/span&gt;                disc[&lt;span class="str"&gt;&amp;quot;Body&amp;quot;&lt;/span&gt;] = emailMessage.HtmlBody;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  42:  &lt;/span&gt;                disc[&lt;span class="str"&gt;&amp;quot;TrimmedBody&amp;quot;&lt;/span&gt;] = emailMessage.HtmlBody;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  43:  &lt;/span&gt;                disc[&lt;span class="str"&gt;&amp;quot;Editor&amp;quot;&lt;/span&gt;] = ous;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  44:  &lt;/span&gt;                disc[&lt;span class="str"&gt;&amp;quot;Author&amp;quot;&lt;/span&gt;] = ous;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  45:  &lt;/span&gt;                disc[&lt;span class="str"&gt;&amp;quot;E-Mail Subject&amp;quot;&lt;/span&gt;] = emailMessage.Headers[&lt;span class="str"&gt;&amp;quot;Subject&amp;quot;&lt;/span&gt;].ToString();&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  46:  &lt;/span&gt;                disc.Update();&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  47:  &lt;/span&gt;            }&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  48:  &lt;/span&gt;        }&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  49:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;&lt;font size="1" face="Tahoma"&gt;:: Please note that I would have just uploaded my initial code and you might want to consider proper optimization of the code and disposal of objects properly. I might not have updated the latest code here.&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9973999" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Code+Samples/">Code Samples</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Coding+Tips/">Coding Tips</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/MOSS+2007/">MOSS 2007</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Object+Model/">Object Model</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Custom+Solutions/">Custom Solutions</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Discussion+list/">Discussion list</category><category domain="http://blogs.msdn.com/b/tejasr/archive/tags/Event+Handler/">Event Handler</category></item></channel></rss>