<?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>Kirk Evans Blog</title><link>http://blogs.msdn.com/b/kaevans/</link><description>.NET From a Markup Perspective</description><dc:language>en-US</dc:language><generator>Telligent Community 5.6.583.20496 (Build: 5.6.583.20496)</generator><item><title>SharePoint Error 6398 - You do not have permission to run 'SP_TRACE_CREATE'</title><link>http://blogs.msdn.com/b/kaevans/archive/2012/02/09/sharepoint-error-6398-you-do-not-have-permission-to-run-sp-trace-create.aspx</link><pubDate>Thu, 09 Feb 2012 17:45:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10266003</guid><dc:creator>Kirk Evans[MSFT]</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/kaevans/rsscomments.aspx?WeblogPostID=10266003</wfw:commentRss><comments>http://blogs.msdn.com/b/kaevans/archive/2012/02/09/sharepoint-error-6398-you-do-not-have-permission-to-run-sp-trace-create.aspx#comments</comments><description>&lt;p&gt;Working with a customer, we noticed a large number of errors in the Windows Application event log for error 6398.&amp;#160; The errors look like:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;The Execute method of job definition Microsoft.SharePoint.Diagnostics.SPSqlDeadlockDiagnosticProvider (ID c020fbe2-7771-495c-95dd-ad7fb680e2e5) threw an exception. More information is included below.&lt;/p&gt;    &lt;p&gt;You do not have permission to run 'SP_TRACE_CREATE'.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;and&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;The Execute method of job definition Microsoft.SharePoint.Diagnostics.SPIOIntensiveQueryDiagnosticProvider (ID 85c74911-f645-4c61-977b-81914d9eb69b) threw an exception. More information is included below.&lt;/p&gt;    &lt;p&gt;You do not have permission to run 'SP_TRACE_CREATE'.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;SharePoint 2010 introduced the Health and Usage Data Collection component.&amp;#160; One of the (if not the most) definitive sources for understanding this capability is by reading the blog series that Todd Carter did on &lt;a href="http://todd-carter.com/category/Health-Usage.aspx"&gt;Extending the SharePoint 2010 Health &amp;amp; Usage&lt;/a&gt;.&amp;#160; The errors above mention a diagnostic provider that is attempting to perform an unauthorized action.&lt;/p&gt;  &lt;p&gt;Start by looking at the diagnostic providers in your farm.&amp;#160; When you install the &lt;a href="http://technet.microsoft.com/en-us/library/cc508851.aspx"&gt;SharePoint 2010 Administration Toolkit&lt;/a&gt;, it includes a fantastic component called &lt;a href="http://technet.microsoft.com/en-us/library/hh144782.aspx"&gt;SharePoint Diagnostic Studio&lt;/a&gt; (SPDIAG).&amp;#160; This component is able to query the usage data store and provide reports that help you manage the health and performance of your SharePoint 2010 environment.&amp;#160; When you create a new project, it will install the diagnostic providers and start collecting health data.&lt;/p&gt;  &lt;p&gt;SPDIAG will install several diagnostic providers that collect additional data.&amp;#160; You can view these in the Central Administration web UI, but PowerShell makes this task simple using Get-SPDiagnosticsProvider.&lt;/p&gt;  &lt;pre class="csharpcode"&gt;PS C:\Windows\system32&amp;gt; Get-SPDiagnosticsProvider

Name                                                    Retention  MaxTotalSi Enabled   
                                                                   zeInBytes            
----                                                    ---------  ---------- -------   
job-diagnostics-blocking-query-provider                 14         6200000000 False     
job-diagnostics-sql-dmv-provider                        14         1000000... True      
job-diagnostics-uls-provider                            14         1000000... True      
job-diagnostics-performance-counter-sql-provider        14         6200000000 True      
job-diagnostics-performance-counter-wfe-provider        14         1000000... True      
job-diagnostics-event-log-provider                      14         6200000000 True      
job-diagnostics-changed-objects-provider                14         6200000000 True      
job-diagnostics-sql-blocking-report-provider            14         6200000000 True      
Search Health Monitoring - Trace Events                 14         1290000... True      
job-diagnostics-io-intensive-query-provider             14         1000000... True      
job-diagnostics-change-types-provider                   14         6200000000 True      
job-diagnostics-sql-memory-provider                     14         1000000... False     
job-diagnostics-sprequestusage-provider                 14         6200000000 True      
job-diagnostics-sql-deadlock-provider                   14         6200000000 True    &lt;/pre&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Compare this to the results of an out-of-box installation without SPDIAG, and you can see that SPDIAG adds several diagnostic providers.&amp;#160; The ones that are throwing the 6398 are the three jobs that are trying to collect information about SQL.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;job-diagnostics-sql-deadlock-provider&lt;/li&gt;

  &lt;li&gt;job-diagnostics-sql-blocking-report-provider&lt;/li&gt;

  &lt;li&gt;job-diagnostics-io-intensive-query-provider &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These diagnostics providers use SP_TRACE_CREATE and RECONFIGURE to gather data needed to support several reports in SPDIAG.&lt;/p&gt;

&lt;p&gt;From &lt;a href="http://technet.microsoft.com/en-us/library/hh144782.aspx"&gt;http://technet.microsoft.com/en-us/library/hh144782.aspx&lt;/a&gt;: &lt;/p&gt;

&lt;p&gt;&lt;b&gt;Some SPDiag diagnostic timer jobs require sysadmin or sqladmin privileges&lt;/b&gt;&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Some SPDiag 3.0 diagnostics jobs require that the farm account has the sysadmin or sqladmin role assigned on the SQL Server instance where the SharePoint 2010 Products databases are located. If the farm account does not have these roles assigned, it will have insufficient privileges to run diagnostic jobs that are required for certain reports to gather data.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;SP_TRACE_CREATE and RECONFIGURE are available to the sysadmin and serveradmin fixed server roles implicitly.&amp;#160; These permissions are not available to the db_owner database role.&amp;#160; The account that is trying to create the trace is the SharePoint farm account.&amp;#160; By default, this account has db_owner database permissions, but it does not have server permissions and is not included in a fixed server role.&amp;#160; That’s why you see the error above.&lt;/p&gt;

&lt;p&gt;At this point, you have a few choices:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;If you find value in the blocking, IO, and deadlock reports for proactively managing your environment, then add the farm account to the fixed sysadmin or sqladmin role.&lt;/li&gt;

  &lt;li&gt;If you want to use SPDIAG but do not want to grant that level of permission to the SharePoint farm account, you can still use it without those diagnostic providers, you just won’t get the database specific reports (blocking, IO, deadlocks).&amp;#160; &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To disable these providers, you can run the following PowerShell script.&amp;#160; Remove the line breaks in the IF statement below.&amp;#160; &lt;/p&gt;

&lt;pre class="csharpcode"&gt;$providers = Get-SPDiagnosticsProvider
&lt;span class="kwrd"&gt;foreach&lt;/span&gt;($provider &lt;span class="kwrd"&gt;in&lt;/span&gt; $providers)
{
   &lt;span class="kwrd"&gt;if&lt;/span&gt;(($provider.Name -eq &lt;span class="str"&gt;&amp;quot;job-diagnostics-sql-blocking-report-provider&amp;quot;&lt;/span&gt;) 
-or ($provider.Name -eq &lt;span class="str"&gt;&amp;quot;job-diagnostics-io-intensive-query-provider&amp;quot;&lt;/span&gt;) 
-or ($provider.Name -eq &lt;span class="str"&gt;&amp;quot;job-diagnostics-sql-deadlock-provider&amp;quot;&lt;/span&gt;))
    {
        $provider.IsDisabled = $&lt;span class="kwrd"&gt;true&lt;/span&gt;;
        $provider.Update();
    }
}&lt;/pre&gt;

&lt;p&gt;We run the Get-SPDiagnosticsProvider PowerShell script again to confirm our changes.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;PS C:\Windows\system32&amp;gt; Get-SPDiagnosticsProvider

Name                                                    Retention  MaxTotalSi Enabled   
                                                                   zeInBytes            
----                                                    ---------  ---------- -------   
job-diagnostics-blocking-query-provider                 14         6200000000 False     
job-diagnostics-sql-dmv-provider                        14         1000000... True      
job-diagnostics-uls-provider                            14         1000000... True      
job-diagnostics-performance-counter-sql-provider        14         6200000000 True      
job-diagnostics-performance-counter-wfe-provider        14         1000000... True      
job-diagnostics-event-log-provider                      14         6200000000 True      
job-diagnostics-changed-objects-provider                14         6200000000 True      
&lt;font style="background-color: #ffff00"&gt;job-diagnostics-sql-blocking-report-provider            14         6200000000 False     
&lt;/font&gt;Search Health Monitoring - Trace Events                 14         1290000... True      
&lt;font style="background-color: #ffff00"&gt;job-diagnostics-io-intensive-query-provider             14         1000000... False     
&lt;/font&gt;job-diagnostics-change-types-provider                   14         6200000000 True      
job-diagnostics-sql-memory-provider                     14         1000000... False     
job-diagnostics-sprequestusage-provider                 14         6200000000 True      
&lt;font style="background-color: #ffff00"&gt;job-diagnostics-sql-deadlock-provider                   14         6200000000 &lt;font style=""&gt;False&lt;/font&gt;   &lt;/font&gt;&lt;/pre&gt;




&lt;p&gt;Note that there have been other cases where error 6398 is thrown because of SQL aliases (see the For More Information section below).&amp;#160; &lt;/p&gt;

&lt;h1&gt;For More Information&lt;/h1&gt;

&lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/library/cc508851.aspx"&gt;SharePoint 2010 Administration Toolkit&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/library/hh144782.aspx"&gt;SharePoint 2010 Diagnostics Studio&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://todd-carter.com/category/Health-Usage.aspx"&gt;Extending the SharePoint 2010 Health &amp;amp; Usage&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a title="http://msdn.microsoft.com/en-us/library/ie/microsoft.sharepoint.diagnostics.spdiagnosticsprovider.aspx" href="http://msdn.microsoft.com/en-us/library/ie/microsoft.sharepoint.diagnostics.spdiagnosticsprovider.aspx"&gt;SPDiagnosticsProvider Class&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a title="http://social.technet.microsoft.com/Forums/en-CA/sharepoint2010setup/thread/4b397f6c-249a-43f0-aa91-ff210e4e132b" href="http://social.technet.microsoft.com/Forums/en-CA/sharepoint2010setup/thread/4b397f6c-249a-43f0-aa91-ff210e4e132b"&gt;Timer Event 6398 – SPDatabaseServerDiagnosticsPerformanceCounter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a title="http://kb4sp.wordpress.com/2011/05/24/sql-aliases-and-sp_trace_create-errors-on-sharepoint-2010/" href="http://kb4sp.wordpress.com/2011/05/24/sql-aliases-and-sp_trace_create-errors-on-sharepoint-2010/"&gt;SQL Aliases and SP_TRACE_CREATE errors on SharePoint 2010&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=10266003" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/SharePoint/">SharePoint</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/PowerShell/">PowerShell</category></item><item><title>Moving From Heroes to Mentors</title><link>http://blogs.msdn.com/b/kaevans/archive/2012/02/04/moving-from-heroes-to-mentors.aspx</link><pubDate>Sat, 04 Feb 2012 14:59:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10264023</guid><dc:creator>Kirk Evans[MSFT]</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/kaevans/rsscomments.aspx?WeblogPostID=10264023</wfw:commentRss><comments>http://blogs.msdn.com/b/kaevans/archive/2012/02/04/moving-from-heroes-to-mentors.aspx#comments</comments><description>&lt;p&gt;In July 2010, I switched roles from Developer Platform Evangelism to &lt;a href="http://blogs.msdn.com/b/kaevans/archive/2010/07/20/my-new-job-now-with-more-sharepoint.aspx"&gt;become a Premier Field Engineer for SharePoint&lt;/a&gt;.&amp;#160; My role in DPE was amazing as it afforded me time for activities that I love, like participating in user groups, speaking at conferences, writing blogs, and sometimes posting videos to Channel9.&amp;#160; After joining PFE, I largely stopped those activities because I wanted to focus on the technology, immersing myself to succeed in my new role.&amp;#160; Occasionally I will still squeak a blog post out, maybe speak at a conference or two, but I am nowhere near as engaged with the community as I had been previously.&lt;/p&gt;  &lt;h2&gt;Going Through The Change&lt;/h2&gt;  &lt;p&gt;Our mission is to show our customers how to improve the health of their environment proactively, teaching them how to better manage and operate their environment.&amp;#160; We joke that the most successful PFE will work themselves out of a job, but that’s the whole point… if our customers don’t need our services any longer, we’ve succeeded.&amp;#160; Unfortunately, the technologies we work with are incredibly complex and provide many variations in the way our customers implement them.&amp;#160; Heck, SharePoint is a booming business for just that very reason.&lt;/p&gt;  &lt;p&gt;PFE has some of the brightest minds in the industry within its group. These are people with deep troubleshooting skills, people who routinely work with customers to improve their experience with Microsoft products.&amp;#160; When your SharePoint farm goes down, SQL crashes, Exchange becomes unavailable, whatever the problem, these are the people who you work with to fix the issue and help prevent the issue from ever occurring again.&amp;#160; These are people who are very deep with the technology but don’t have experience with writing or public speaking.&amp;#160; Wouldn’t it be great to learn from someone with that depth of experience?&lt;/p&gt;  &lt;p&gt;This past fall, Premier Field Engineering held a series of internal conferences called GeekReady. At this event, the General Manager for PFE, Shannan Collins, unveiled a new direction for PFE called “Heroes to Mentors”. There wasn’t much tactical information announced, it was very much a vision for where PFE is headed, in fact it was intentionally vague to tell the field to pick up the ball and run with it. Heroes to Mentors means changing the culture of PFE, something that is much more than an exec issuing an edict.&amp;#160; Heroes to Mentors implies change at every level within PFE, from the execs to the Directors to Managers to the engineers themselves.&amp;#160; It implies that engineers should work harder to share knowledge internally and continue to raise the technical capabilities of our team.&amp;#160; It implies that we work to share that knowledge externally with our customers and partners.&amp;#160; It means that we are given leeway to start doing many of the things that I loved so much from my days in DPE.&lt;/p&gt;  &lt;h2&gt;What’s In It For You&lt;/h2&gt;  &lt;p&gt;I hear regularly from user group leaders across the country asking for me to participate in events like SharePoint Saturday, speaking at a user group event, even speaking at conferences.&amp;#160; Often I have to decline since I don’t have a business reason to travel and afford the T&amp;amp;E.&amp;#160; The unfortunate part is that I don’t often pass that opportunity or introduction on to another PFE in that area to see if they might be interested.&amp;#160; I am changing that, and will be encouraging my peers to reach out to their local user group leaders to see how they can contribute.&amp;#160; I am also personally going to make an effort to participate in user group and SharePoint Saturday events more frequently.&amp;#160; While I still am not able to travel to as many events as I would like (I’m not flying to Antarctica, for instance), I am going to say no a whole lot less often.&amp;#160; And I am going to make sure to introduce other PFE folks in the area that will want to participate as well.&lt;/p&gt;  &lt;p&gt;Another initiative that I am resurrecting is my Channel9 video blog.&amp;#160; No, there’s no new content there yet… I am working on the recordings to make sure that they are much more than marketing introductions.&amp;#160; I want to introduce you to some of the brightest folks in the industry, but also have them show you something valuable.&amp;#160; Just watch &lt;a href="http://twitter.com/kaevans"&gt;http://twitter.com/kaevans&lt;/a&gt; or this blog for announcements.&amp;#160; And if there are PFE that are reading this, look for announcements about opportunities to fulfill your Heroes to Mentors commitments &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-00-25-31-metablogapi/1055.wlEmoticon_2D00_smile_5F00_67E7DA9F.png" /&gt;&lt;/p&gt;  &lt;p&gt;It’s not just me.&amp;#160; There are some PFE that are already heavily engaged in the community. This includes folks like &lt;a href="http://www.spfoxhole.com/Blog/default.aspx"&gt;Bob Fox&lt;/a&gt;, &lt;a href="http://blogs.technet.com/b/rycampbe/"&gt;Ryan Campbell&lt;/a&gt;, &lt;a href="https://twitter.com/#!/PrincetonSUG"&gt;Jason Gallicchio&lt;/a&gt;, &lt;a href="http://blogs.msdn.com/b/besidethepoint/"&gt;Josh Gavant&lt;/a&gt;, &lt;a href="http://www.ericharlan.com/Blogs"&gt;Eric Harlan&lt;/a&gt;.&amp;#160; These guys are also working to draw some of our colleagues out of their hiding spaces.&amp;#160; We will be working to find better ways to make ourselves more accessible.&amp;#160; We are working internally to help folks get started, trying to find ways to better engage our colleagues, and working on ways that we can be more effective in creating content and sharing it with the rest of the community.&amp;#160; I have a few more things that I am not yet ready to share, but watch this space as we continue to make announcements.&lt;/p&gt;  &lt;p&gt;There are many other projects that PFE works on that you are familiar with that have made amazing contributions to the community.&amp;#160; The &lt;a href="http://pal.codeplex.com/"&gt;PAL tool&lt;/a&gt; written by &lt;a href="http://blogs.technet.com/b/clinth/"&gt;Clint Huffman&lt;/a&gt; is a great example of a tool that PFE regularly uses for troubleshooting but some of our customers are not yet familiar with how to use the tool.&amp;#160; Folks like &lt;a href="http://www.samuraiprogrammer.com/blog/default.aspx"&gt;Greg Varveris&lt;/a&gt;, who worked on the &lt;a href="http://archive.msdn.microsoft.com/SPDisposeCheck"&gt;SPDisposeCheck&lt;/a&gt; tool, are working on some fantastic new initiatives that our customers &lt;em&gt;need&lt;/em&gt; to see.&amp;#160; I can’t wait to show you what Greg is working on with fellow PFE Tom Fuller.&amp;#160; I am making the commitment to break out of my SharePoint shell and to start finding ways to show you what the rest of PFE is doing.&lt;/p&gt;  &lt;h2&gt;Looking Forward&lt;/h2&gt;  &lt;p&gt;This is just the beginning.&amp;#160; I am incredibly excited about this change. Admittedly, culture change is very difficult, and it will be slow as we move our colleagues from the mindset of being a hero to becoming a mentor both internally at Microsoft and externally with our customers, partners, and community.&amp;#160; &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10264023" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Life+at+Microsoft/">Life at Microsoft</category></item><item><title>Creating SharePoint Folders and Items with PowerShell</title><link>http://blogs.msdn.com/b/kaevans/archive/2012/01/24/creating-sharepoint-folders-and-items-with-powershell.aspx</link><pubDate>Tue, 24 Jan 2012 15:04:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10259998</guid><dc:creator>Kirk Evans[MSFT]</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/kaevans/rsscomments.aspx?WeblogPostID=10259998</wfw:commentRss><comments>http://blogs.msdn.com/b/kaevans/archive/2012/01/24/creating-sharepoint-folders-and-items-with-powershell.aspx#comments</comments><description>&lt;p&gt;I was working on a customer problem and needed a very large list to try to reproduce a problem.&amp;#160; I typically fire up Visual Studio and create Yet Another Console App.&amp;#160; You know, one of the hundred or so “ConsoleApplication1” projects that litter your My Documents/Visual Studio/Projects folder?&amp;#160; I decided to force myself to do this with PowerShell instead, and the result was not only quick, but also something I could do on a machine that doesn’t have Visual Studio installed.&lt;/p&gt;  &lt;p&gt;Not only did I need many items in the list, I also needed a weird structure… 10 folders, each having 10 folders, each having 10 folders, each having 50 items.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/7823.image_5F00_214B5DDE.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 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-00-25-31-metablogapi/4276.image_5F00_thumb_5F00_1C68AA22.png" width="204" height="156" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Creating a folder in SharePoint is easy, but not straightforward.&amp;#160; You have to use the SPFileSystemObjectType.Folder enumeration value when creating a list item.&amp;#160; You can see the syntax for that below.&amp;#160; Since we want to create nested folders, you can see how we use the relative URL to accomplish that as well.&lt;/p&gt;  &lt;p&gt;Here is the script I came up with.&amp;#160; Note!&amp;#160; Before you run this in your environment, understand that it creates 50,000 items!&amp;#160; You might want to change the number of loops to reduce the number of items being created, or better yet, just read the code and adapt it for your situation.&amp;#160; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;pre class="csharpcode"&gt;$spAssignment = Start-SPAssignment
$mylist = (Get-SPWeb -identity http://portal.sharepoint.com -AssignmentCollection $spAssignment).Lists[&lt;span class="str"&gt;&amp;quot;LargeList&amp;quot;&lt;/span&gt;]

&lt;span class="kwrd"&gt;for&lt;/span&gt;($i=1; $i &lt;span class="preproc"&gt;-le&lt;/span&gt; 10; $i++)
{
    $folder = $mylist.AddItem(&lt;span class="str"&gt;&amp;quot;&amp;quot;&lt;/span&gt;, [Microsoft.SharePoint.SPFileSystemObjectType]::Folder)
    $folder[&lt;span class="str"&gt;&amp;quot;Title&amp;quot;&lt;/span&gt;] = &lt;span class="str"&gt;&amp;quot;folder$i&amp;quot;&lt;/span&gt;
    $folder.Update();
    &lt;span class="kwrd"&gt;for&lt;/span&gt;($j=1; $j &lt;span class="preproc"&gt;-le&lt;/span&gt; 10; $j++)
    {
        $s1folder = $mylist.AddItem($folder.Folder.ServerRelativeUrl, 
[Microsoft.SharePoint.SPFileSystemObjectType]::Folder)
        $s1folder[&lt;span class="str"&gt;&amp;quot;Title&amp;quot;&lt;/span&gt;] = &lt;span class="str"&gt;&amp;quot;subfolder$j&amp;quot;&lt;/span&gt;
        $s1folder.Update();
         &lt;span class="kwrd"&gt;for&lt;/span&gt;($k=1; $k &lt;span class="preproc"&gt;-le&lt;/span&gt; 10; $k++)
        {
            $s2folder = $mylist.AddItem($s1folder.Folder.ServerRelativeUrl, 
[Microsoft.SharePoint.SPFileSystemObjectType]::Folder)
            $s2folder[&lt;span class="str"&gt;&amp;quot;Title&amp;quot;&lt;/span&gt;] = &lt;span class="str"&gt;&amp;quot;subsubfolder$k&amp;quot;&lt;/span&gt;
            $s2folder.Update();
                        
            &lt;span class="kwrd"&gt;for&lt;/span&gt;($l=1; $l &lt;span class="preproc"&gt;-le&lt;/span&gt; 50; $l++)
            {
                
                &lt;span class="rem"&gt;#Create item&lt;/span&gt;
                
                $newItem = $mylist.AddItem($s2folder.Folder.ServerRelativeUrl,
[Microsoft.SharePoint.SPFileSystemObjectType]::File, $null)
                $newItem[&lt;span class="str"&gt;&amp;quot;Title&amp;quot;&lt;/span&gt;] = &lt;span class="str"&gt;&amp;quot;Item $i $j $k $l&amp;quot;&lt;/span&gt;
                $newItem[&lt;span class="str"&gt;&amp;quot;FirstName&amp;quot;&lt;/span&gt;] = &lt;span class="str"&gt;&amp;quot;FirstName $i $j $k $l&amp;quot;&lt;/span&gt;
                $newItem[&lt;span class="str"&gt;&amp;quot;LastName&amp;quot;&lt;/span&gt;] = &lt;span class="str"&gt;&amp;quot;LastName $i $j $k $l&amp;quot;&lt;/span&gt;
                $newItem[&lt;span class="str"&gt;&amp;quot;Company&amp;quot;&lt;/span&gt;] = &lt;span class="str"&gt;&amp;quot;Company $i $j $k $l&amp;quot;&lt;/span&gt;
                $newItem.Update()
            }
        }   
    }
}
Stop-SPAssignment $spAssignment&lt;/pre&gt;


&lt;p&gt;That’s it, once you read the code you can see there’s not much to it.&amp;#160; And now you’ll be able to get rid of all those throw-away ConsoleApplication1 projects in your My Documents folder!&lt;/p&gt;

&lt;h1&gt;For More Information&lt;/h1&gt;

&lt;p&gt;&lt;a title="http://blogs.msdn.com/b/besidethepoint/archive/2012/02/08/better-sharepoint-lists-and-list-items-in-powershell.aspx" href="http://blogs.msdn.com/b/besidethepoint/archive/2012/02/08/better-sharepoint-lists-and-list-items-in-powershell.aspx"&gt;Creating SharePoint Folders and Items with PowerShell&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=10259998" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/SharePoint/">SharePoint</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/PowerShell/">PowerShell</category></item><item><title>SharePoint 2010 CAML List Joins</title><link>http://blogs.msdn.com/b/kaevans/archive/2012/01/20/sharepoint-2010-caml-list-joins.aspx</link><pubDate>Sat, 21 Jan 2012 00:26:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10259083</guid><dc:creator>Kirk Evans[MSFT]</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/kaevans/rsscomments.aspx?WeblogPostID=10259083</wfw:commentRss><comments>http://blogs.msdn.com/b/kaevans/archive/2012/01/20/sharepoint-2010-caml-list-joins.aspx#comments</comments><description>&lt;p&gt;This post demonstrates how to use the JOIN syntax in CAML.&lt;/p&gt;  &lt;p&gt;A customer pinged me asking about how to write a JOIN query in CAML.&amp;#160; Honestly, I haven’t done this since in a long time, so it took awhile to shake off the cobwebs.&amp;#160; I tried to make things explicit and easy to reproduce in your environment, please let me know in the comments of this post if something is unclear.&lt;/p&gt;  &lt;p&gt;SharePoint 2010 adds the ability to create relational lists.&amp;#160; To use the JOIN operator in CAML, your lists must have a defined relation.&amp;#160; Let’s start by creating the lists and their relationships.&lt;/p&gt;  &lt;h2&gt;Creating the Lists&lt;/h2&gt;  &lt;p&gt;I first add a standard Contacts list named “DSE” and populate it with some data.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/7823.image_5F00_1AAE4E7C.png"&gt;&lt;img style="margin: 0px; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/2438.image_5F00_thumb_5F00_482F6E3F.png" width="244" height="77" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Go to the list settings for your new contact list and hover over the column names.&amp;#160; Many SharePoint developers forget this, the name you see in the web UI is the .Title property, which may be different than the internal name that SharePoint uses (the .InternalName property of the SPField object).&amp;#160; For a quick way to see what the actual field name is, hover over the column name and look in the address bar in your browser, and we see that the “Last Name” column is actually the “Title” field.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/1440.image_5F00_79BADBD4.png"&gt;&lt;img style="margin: 0px; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/7416.image_5F00_thumb_5F00_2B46496A.png" width="244" height="91" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Next, I create a custom list named “Projects” and add a column named “Manager”.&amp;#160; The type is a lookup column.&amp;#160; Note the name “Manager”, we’ll refer to this name in our code.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/6646.image_5F00_18914FB3.png"&gt;&lt;img style="margin: 0px; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/1537.image_5F00_thumb_5F00_3120ED03.png" width="244" height="112" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In the additional column settings section for the “Manager” column, I set the lookup to the ID column for the DSE list, and additionally show the First Name and Last Name.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/6648.image_5F00_5782D04E.png"&gt;&lt;img style="margin: 0px; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/1440.image_5F00_thumb_5F00_57169D59.png" width="244" height="206" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;When I add a new item to the Projects list, I get a drop-down that lets me select a value from the lookup column.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/5340.image_5F00_7D7880A4.png"&gt;&lt;img style="margin: 0px; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/6232.image_5F00_thumb_5F00_47FFBE7F.png" width="244" height="133" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The result looks like this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/7801.image_5F00_0E7CAE88.png"&gt;&lt;img style="margin: 0px; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/5340.image_5F00_thumb_5F00_54F99E90.png" width="244" height="64" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now that we have the lists, a lookup field, and some data, let’s query it.&lt;/p&gt;  &lt;h2&gt;Querying Using JOINS and SPQuery&lt;/h2&gt;  &lt;p&gt;Nothing speaks louder than a code sample.&amp;#160; At the top of my code, I add a few using directives.&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.Linq;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.SharePoint;&lt;/pre&gt;


&lt;p&gt;Next, the code to query the list.&amp;#160; &lt;/p&gt;

&lt;p&gt;The first thing to notice is the SPQuery.Joins property which lets me provide 1 or more joins for the list.&amp;#160; The list must already have a lookup column and a relation defined to the list being joined to.&amp;#160; Notice in the Joins property that we refer to the name that we provided when we created the lookup column, “Manager”.&amp;#160; &lt;/p&gt;

&lt;p&gt;The second thing to notice is the ProjectedFields property.&amp;#160; This is where we tell SharePoint how to project the lookup columns into the result.&amp;#160; In a contacts list, the “First Name” column has an internal name of “FirstName”.&amp;#160; The “Last Name” column is actually the Title column (see above for how to determine the .InternalName of a field).&amp;#160; &lt;/p&gt;

&lt;p&gt;Finally, the ViewFields property lets us define which fields are included in the result.&amp;#160; We use the same name that we used in the ProjectedFields property.&amp;#160; This name could be anything, so long as the name in ProjectedFields and the name in ViewFields match. &lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;class&lt;/span&gt; Program
{
&lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Main(&lt;span class="kwrd"&gt;string&lt;/span&gt;[] args)
{
&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://spstc.sharepoint.com&amp;quot;&lt;/span&gt;))
{
    SPWeb web = site.RootWeb;

    SPQuery query = &lt;span class="kwrd"&gt;new&lt;/span&gt; SPQuery();

    query.Joins = &lt;span class="str"&gt;&amp;quot;&amp;lt;Join Type='INNER' ListAlias='DSE'&amp;gt;&amp;quot;&lt;/span&gt; +
                    &lt;span class="str"&gt;&amp;quot;&amp;lt;Eq&amp;gt;&amp;quot;&lt;/span&gt; +
                        &lt;span class="str"&gt;&amp;quot;&amp;lt;FieldRef Name='&lt;font style="background-color: rgb(255, 255, 0);"&gt;Manager&lt;/font&gt;' RefType='Id'/&amp;gt;&amp;quot;&lt;/span&gt; +
                        &lt;span class="str"&gt;&amp;quot;&amp;lt;FieldRef List='DSE' Name='ID'/&amp;gt;&amp;quot;&lt;/span&gt; +
                    &lt;span class="str"&gt;&amp;quot;&amp;lt;/Eq&amp;gt;&amp;quot;&lt;/span&gt; +
                    &lt;span class="str"&gt;&amp;quot;&amp;lt;/Join&amp;gt;&amp;quot;&lt;/span&gt;;
    query.ProjectedFields =
        &lt;span class="str"&gt;&amp;quot;&amp;lt;Field Name='&lt;font style="background-color: rgb(0, 255, 0);"&gt;DSEFirstName&lt;/font&gt;' Type='Lookup' &amp;quot;&lt;/span&gt; +
                &lt;span class="str"&gt;&amp;quot;List='DSE' ShowField='&lt;font style="background-color: rgb(0, 255, 0);"&gt;FirstName&lt;/font&gt;'/&amp;gt;&amp;quot;&lt;/span&gt; +
        &lt;span class="str"&gt;&amp;quot;&amp;lt;Field Name=&lt;font style=""&gt;'DSELastName'&lt;/font&gt; Type='Lookup' &amp;quot;&lt;/span&gt; +
                &lt;span class="str"&gt;&amp;quot;List='DSE' ShowField='Title'/&amp;gt;&amp;quot;&lt;/span&gt;;

    query.ViewFields = &lt;span class="str"&gt;&amp;quot;&amp;lt;FieldRef Name='Title'/&amp;gt;&amp;quot;&lt;/span&gt; +
                        &lt;span class="str"&gt;&amp;quot;&amp;lt;FieldRef Name='DSEFirstName'/&amp;gt;&amp;quot;&lt;/span&gt; +
                        &lt;span class="str"&gt;&amp;quot;&amp;lt;FieldRef Name='DSELastName'/&amp;gt;&amp;quot;&lt;/span&gt;;
    SPList customerList = web.Lists[&lt;span class="str"&gt;&amp;quot;Projects&amp;quot;&lt;/span&gt;];
    SPListItemCollection items = customerList.GetItems(query);
    &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (SPListItem item &lt;span class="kwrd"&gt;in&lt;/span&gt; items)
    {
        SPFieldLookupValue dseLastName =
            &lt;span class="kwrd"&gt;new&lt;/span&gt; SPFieldLookupValue(item[&lt;span class="str"&gt;&amp;quot;DSELastName&amp;quot;&lt;/span&gt;].ToString());
        SPFieldLookupValue dseFirstName =
            &lt;span class="kwrd"&gt;new&lt;/span&gt; SPFieldLookupValue(item[&lt;span class="str"&gt;&amp;quot;DSEFirstName&amp;quot;&lt;/span&gt;].ToString());

        Console.WriteLine(&lt;span class="str"&gt;&amp;quot;{0}  {1}   {2}&amp;quot;&lt;/span&gt;,
                item.Title,
                dseLastName.LookupValue,
                dseFirstName.LookupValue);
    }
}
}
}
}
&lt;/pre&gt;


&lt;p&gt;The results are pretty unimpressive, but it proves that our CAML query works.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/1856.image_5F00_26A018E3.png"&gt;&lt;img style="margin: 0px; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/6242.image_5F00_thumb_5F00_6D1D08EB.png" width="244" height="58" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And there you have it, your first CAML JOIN query.&amp;#160; &lt;/p&gt;

&lt;h2&gt;Querying Using LINQ&lt;/h2&gt;

&lt;p&gt;Just for kicks, I will throw in a LINQ sample, too.&amp;#160; LINQ doesn’t support the JOIN operator, nor does it support a projection to a referenced entity.&amp;#160; What you can do, though, is just reference the entity in the results.&amp;#160; &lt;/p&gt;

&lt;p&gt;I opened the Visual Studio 2010 Tools command window and ran the following command:&lt;/p&gt;

&lt;p&gt;
  &lt;pre class="csharpcode"&gt;spmetal /web:http://spstc.sharepoint.com /namespace:Microsoft.PFE.DSE.Samples /code:PFE.cs
  &lt;/pre&gt;
  This generates the strongly-typed entities for me behind the scenes with metadata that tells LINQ how to query the results.&amp;#160; I include the result, PFE.cs, in my Visual Studio project and run the following code.&amp;#160; Notice I add the ctx.Log setting to log output to the Console window.&amp;#160; That lets me include a picture of a WHOLE BUNCH of CAML in the screen shot below.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; (PFEDataContext ctx = &lt;span class="kwrd"&gt;new&lt;/span&gt; PFEDataContext(&lt;span class="str"&gt;&amp;quot;http://spstc.sharepoint.com&amp;quot;&lt;/span&gt;))
{
    ctx.Log = Console.Out;
    var results = from c &lt;span class="kwrd"&gt;in&lt;/span&gt; ctx.Customers
                  select c;
    &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (var item &lt;span class="kwrd"&gt;in&lt;/span&gt; results)
    {
        Console.WriteLine(&lt;span class="str"&gt;&amp;quot;{0}  {1}   {2}&amp;quot;&lt;/span&gt;,
        item.Title,
        item.DSE.LastName,
        item.DSE.FirstName);
    }
}&lt;/pre&gt;


&lt;p&gt;Just to show the results… &lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/7220.image_5F00_3399F8F4.png"&gt;&lt;img style="margin: 0px; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/3681.image_5F00_thumb_5F00_39E0CF82.png" width="217" height="244" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Using your own JOIN operation can be more efficient, but test the results to be sure.&amp;#160; Often times LINQ will generate more efficient queries, but not always.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10259083" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/-NET+Programming/">.NET Programming</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/SharePoint/">SharePoint</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/LINQ/">LINQ</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Visual+Studio+2010/">Visual Studio 2010</category></item><item><title>Consolidate SharePoint 2010 Application Pools</title><link>http://blogs.msdn.com/b/kaevans/archive/2011/12/19/consolidate-sharepoint-2010-application-pools.aspx</link><pubDate>Mon, 19 Dec 2011 16:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10248294</guid><dc:creator>Kirk Evans[MSFT]</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/kaevans/rsscomments.aspx?WeblogPostID=10248294</wfw:commentRss><comments>http://blogs.msdn.com/b/kaevans/archive/2011/12/19/consolidate-sharepoint-2010-application-pools.aspx#comments</comments><description>&lt;p&gt;Working with a customer, we saw that they had 20 or so web application pools, each with 1 web application each.&amp;#160; The software boundary for SharePoint 2010 is to have &lt;a href="http://technet.microsoft.com/en-us/library/cc262787.aspx#WebserverAppServer"&gt;no more than 10 web application pools&lt;/a&gt;.&amp;#160; Because each application pool can have multiple web applications assigned to it, and easy fix is to just move the web applications to new application pools.&lt;/p&gt;  &lt;p&gt;I have seen several blogs and even forum posts that indicate you can just change the application pool in IIS.&amp;#160; This is not sufficient, because SharePoint maintains a reference to the application pool and the managed account assigned to the application pool.&amp;#160; If you change it in IIS without telling SharePoint, you can cause orphaned configuration data which may prevent you from being able to apply updates or upgrades.&lt;/p&gt;  &lt;p&gt;There’s no UI to change the application pool in Central Administration, the only way to change this is through the object model.&amp;#160; Luckily this is pretty simple to do using PowerShell.&lt;/p&gt;  &lt;pre class="csharpcode"&gt;$webService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService 
$pool = $webService.ApplicationPools[&lt;span class="str"&gt;&amp;quot;SharePoint - AuthTest80&amp;quot;&lt;/span&gt;] 
$app = Get-SPWebApplication  http://teamsapp
$app.ApplicationPool = $pool
$app.Update()
$app.ProvisionGlobally()&lt;/pre&gt;


&lt;p&gt;The trick here is to use the ProvisionGlobally method.&amp;#160; If you leave this out, it changes the setting in SharePoint’s configuration data, but does not make a change in IIS.&amp;#160; ProvisionGlobally will make the change in IIS as well, and will do this for every server in your farm… another huge benefit for doing this through the object model instead of manually updating the setting in IIS for every server in your farm!&lt;/p&gt;

&lt;h2&gt;For More Information&lt;/h2&gt;

&lt;p&gt;&lt;a title="http://technet.microsoft.com/en-us/library/cc262787.aspx#WebserverAppServer" href="http://technet.microsoft.com/en-us/library/cc262787.aspx#WebserverAppServer"&gt;SharePoint Server 2010 capacity management: Software boundaries and limits&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a title="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spwebapplication.provisionglobally.aspx" href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spwebapplication.provisionglobally.aspx"&gt;SPWebApplication.ProvisionGlobally Method&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=10248294" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/SharePoint/">SharePoint</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/IIS7/">IIS7</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/PowerShell/">PowerShell</category></item><item><title>Extract a WSP Solution from SharePoint 2010</title><link>http://blogs.msdn.com/b/kaevans/archive/2011/12/05/extract-a-wsp-solution-from-sharepoint-2010.aspx</link><pubDate>Mon, 05 Dec 2011 16:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10244035</guid><dc:creator>Kirk Evans[MSFT]</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/kaevans/rsscomments.aspx?WeblogPostID=10244035</wfw:commentRss><comments>http://blogs.msdn.com/b/kaevans/archive/2011/12/05/extract-a-wsp-solution-from-sharepoint-2010.aspx#comments</comments><description>&lt;p&gt;This post shows how to download a WSP from SharePoint 2010 using PowerShell.&lt;/p&gt;  &lt;h2&gt;Background&lt;/h2&gt;  &lt;p&gt;A customer of mine had a scenario where they needed to download a WSP from SharePoint 2010.&amp;#160; In the Central Administration screen, a link is not available for you to download the WSP solution.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/0268.image_5F00_761AE6BC.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 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-00-25-31-metablogapi/8512.image_5F00_thumb_5F00_350C6758.png" width="244" height="146" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Likewise, with stsadm, there’s not a command to download a solution.&amp;#160; &lt;/p&gt;  &lt;h2&gt;Implementation&lt;/h2&gt;  &lt;p&gt;I could have written this with a C# console application, but I’ve been playing with PowerShell and found that the 3 lines of PowerShell code that it takes is much easier than trying to deploy a binary to a customer’s environment.&amp;#160; &lt;/p&gt;  &lt;pre class="csharpcode"&gt;$farm = Get-SPFarm
$file = $farm.Solutions.Item(&lt;span class="str"&gt;&amp;quot;extendeddiagnosticproviders.wsp&amp;quot;&lt;/span&gt;).SolutionFile
$file.SaveAs(&lt;span class="str"&gt;&amp;quot;c:\temp\extendeddiagnosticproviders.wsp&amp;quot;&lt;/span&gt;)&lt;/pre&gt;


&lt;p&gt;Note that in order to run this command, you need to be a member of the Farm Administrators group and have permission to the configuration database.&amp;#160; To configure the permissions for SQL, I recommend using &lt;a href="http://technet.microsoft.com/en-us/library/ff607596.aspx"&gt;Add-SPShellAdmin&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;For More Information&lt;/h2&gt;

&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms457257.aspx"&gt;SPSolutionCollection&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms456877.aspx"&gt;SPSolution class&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/library/ff607596.aspx"&gt;Add-SPShellAdmin&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=10244035" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/SharePoint/">SharePoint</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/PowerShell/">PowerShell</category></item><item><title>Playing with SharePoint 2010 MUI</title><link>http://blogs.msdn.com/b/kaevans/archive/2011/11/28/playing-with-sharepoint-2010-mui.aspx</link><pubDate>Mon, 28 Nov 2011 16:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10241556</guid><dc:creator>Kirk Evans[MSFT]</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/kaevans/rsscomments.aspx?WeblogPostID=10241556</wfw:commentRss><comments>http://blogs.msdn.com/b/kaevans/archive/2011/11/28/playing-with-sharepoint-2010-mui.aspx#comments</comments><description>&lt;p&gt;This post shows how to set up a SharePoint environment to explore the multilingual user interface (MUI).&amp;#160; &lt;/p&gt;  &lt;h2&gt;Background&lt;/h2&gt;  &lt;p&gt;&lt;img style="float: right; display: inline;" align="right" src="http://jse.blogg.no/images/world_map_g_1153237884.jpg" width="400" height="295" /&gt;I admit to being a typical American.&amp;#160; When I write applications, I hardly ever use resource files to support any language other than English.&amp;#160; My friend Derek Noonan sent me this map that makes me laugh (“Here be dragons!”) because it is painfully true… most Americans don’t speak a second language aside from knowing how to ask for another beer or directions to the bathroom.&lt;/p&gt;  &lt;p&gt;I have seen demos of the SharePoint 2010 Multilingual User Interface, but I haven’t ever tried to make it work in my environment.&amp;#160; I decided to configure it, document the installation process, and show some of the capabilities.&amp;#160; If you are interested in learning more, see the For More Information section at the bottom of this post.&lt;/p&gt;  &lt;p&gt;Even if you aren’t currently supporting multiple languages, I encourage you to understand the MUI and its capabilities.&amp;#160; Some day you may find yourself with a task of supporting multiple languages, understanding the out of box capabilities can save you many hours of work.&lt;/p&gt;  &lt;h2&gt;Setup&lt;/h2&gt;  &lt;p&gt;I was a complete MUI novice, I wasn’t even sure what to install to make it work.&amp;#160; It turns out to be pretty easy (albeit a bit time consuming) to set up MUI in SharePoint 2010.&amp;#160; You do not need to install language packs for the operating system, you only need to install the SharePoint language pack for each language you want to support and SP1 for each language pack (and the latest CU).&amp;#160; &lt;/p&gt;  &lt;p&gt;To start with, my laptop probably looks just like yours.&amp;#160; Its display language is English with no other display languages installed, and I installed SharePoint 2010 using the downloaded media from MSDN.&amp;#160; I applied the latest updates (at the time of this writing, the latest service pack is SP1, and the latest Cumulative Update is August 2011 CU) and ran PSConfig.&amp;#160; This is a typical developer machine that supports exactly 1 language: English.&amp;#160; The steps are: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Install the Language Packs&lt;/li&gt;    &lt;li&gt;Install Service Pack 1 for Server Language Pack 2010 for each language pack&lt;/li&gt;    &lt;li&gt;Apply the latest cumulative update&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;For 4 languages, that’s a total of 9 installations.&amp;#160; Here is what my download folder looks like:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/6318.image_5F00_0B15B0D0.png"&gt;&lt;img style="margin: 0px; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/0636.image_5F00_thumb_5F00_739AFC9E.png" width="244" height="153" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Install the Language Packs&lt;/h3&gt;  &lt;p&gt;The first step is to download the &lt;a href="http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;amp;id=3411"&gt;language pack(s) for SharePoint 2010&lt;/a&gt;.&amp;#160; The first time I tried this, I ended up installing the English language pack.&amp;#160; Showing how typical of an American I am, a friend (thanks, Mads!) pointed out there is a drop-down that doesn’t just change the language of the web page you are looking at, but also changes which language pack you are going to download.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/4834.image_5F00_3FF29040.png"&gt;&lt;img style="margin: 0px; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/3364.image_5F00_thumb_5F00_112CD79E.png" width="244" height="178" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Once you select a language, download and install each language pack that you want to use.&amp;#160; I chose French, German, Japanese, and Spanish language packs.&amp;#160; When a language pack is completed, there is a checkbox asking you if you want to run the SharePoint Product Configuration Wizard (PSConfig).&amp;#160; Uncheck this… we will run PSConfig later.&lt;/p&gt;  &lt;h3&gt;Install Service Pack 1 for Server Language Pack 2010 for Each Language Pack&lt;/h3&gt;  &lt;p&gt;Once you install a language pack, you need to also install &lt;a href="http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;amp;id=26621"&gt;Service Pack 1 for Server Language Pack 2010&lt;/a&gt; for each language pack that you installed.&amp;#160; Just like with the previous download screen, you need to change the drop-down to the language that you want to download.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/7870.image_5F00_24D9C132.png"&gt;&lt;img style="margin: 0px; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/8156.image_5F00_thumb_5F00_56652EC7.png" width="244" height="82" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Apply the Latest Cumulative Update&lt;/h3&gt;  &lt;p&gt;I already have August CU applied to my environment, but you should reapply the latest CU again after installing the language packs.&amp;#160; When I tried to run the August CU again on my machine, the installer reported the hotfix was already installed.&amp;#160; It can’t hurt to be thorough.&amp;#160; &lt;/p&gt;  &lt;h3&gt;Run PSConfig&lt;/h3&gt;  &lt;p&gt;Notice how we didn’t say to run PSConfig yet?&amp;#160; Thankfully, you can do all 9 installations first, and after all the installations are complete run PSConfig on each server in your farm.&amp;#160; &lt;/p&gt;  &lt;h2&gt;Playing with MUI&lt;/h2&gt;  &lt;p&gt;To get started, create a site and access its site settings page.&amp;#160; Choose Language Settings, and select which languages you want to allow the users to switch to.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/6406.image_5F00_63CB41CD.png"&gt;&lt;img style="display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/1220.image_5F00_thumb_5F00_22BCC269.png" width="244" height="200" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Once you enable alternate languages, users will now have the option to change the display language.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/8561.image_5F00_6624C3CB.png"&gt;&lt;img style="margin: 0px; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/3660.image_5F00_thumb_5F00_25164467.png" width="244" height="235" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I selected German, and the site changed to the following:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/8154.image_5F00_72463DF2.png"&gt;&lt;img style="margin: 0px; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/8463.image_5F00_thumb_5F00_2220DFB4.png" width="244" height="158" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Let’s poke around and see what else is localized.&lt;/p&gt;  &lt;p&gt;Reports:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/2210.image_5F00_565508FA.png"&gt;&lt;img style="margin: 0px; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/1205.image_5F00_thumb_5F00_5BC3799E.png" width="244" height="242" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Site columns:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/1205.image_5F00_1F2B7B01.png"&gt;&lt;img style="margin: 0px; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/7080.image_5F00_thumb_5F00_7DCBD564.png" width="244" height="242" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Content types:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/7571.image_5F00_0412ABF3.png"&gt;&lt;img style="margin: 0px; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/7080.image_5F00_thumb_5F00_37023C5A.png" width="244" height="242" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Very cool!&amp;#160; &lt;/p&gt;  &lt;h2&gt;What About Content and Code?&lt;/h2&gt;  &lt;p&gt;Now, you might be asking yourself, “what about &lt;em&gt;content&lt;/em&gt;?”&amp;#160; If a user types something in a wiki page, is that automatically translated?&amp;#160; The answer here is no.&amp;#160; You can experiment by creating a new site page and then editing it with some text.&amp;#160; Change the site language, and the text remains the same.&amp;#160; OK, understandable.&amp;#160; &lt;/p&gt;  &lt;p&gt;What about my code that displays strings, can it be localized?&amp;#160; The answer here is a resounding yes.&amp;#160; The .NET Framework provides extensive support for localization, as does SharePoint, but only when you leverage it.&amp;#160; The code is very simple:&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.ComponentModel;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web.UI;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web.UI.WebControls;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web.UI.WebControls.WebParts;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.SharePoint;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.SharePoint.WebControls;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Globalization;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.SharePoint.Utilities;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; MUIDemo.HelloMUIWebPart
{
    [ToolboxItemAttribute(&lt;span class="kwrd"&gt;false&lt;/span&gt;)]
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; HelloMUIWebPart : WebPart
    {
        &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()
        {
            Label hello = &lt;span class="kwrd"&gt;new&lt;/span&gt; Label();
            hello.Text = &lt;span class="str"&gt;&amp;quot;Hello&amp;quot;&lt;/span&gt;;
            Controls.Add(hello);

            Controls.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; System.Web.UI.HtmlControls.HtmlGenericControl(&lt;span class="str"&gt;&amp;quot;br&amp;quot;&lt;/span&gt;));

            Label localGreeting = &lt;span class="kwrd"&gt;new&lt;/span&gt; Label();
            localGreeting.Text = Properties.Resources.Greeting;
            Controls.Add(localGreeting);

            Controls.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; System.Web.UI.HtmlControls.HtmlGenericControl(&lt;span class="str"&gt;&amp;quot;br&amp;quot;&lt;/span&gt;));

            Label currentUIculture = &lt;span class="kwrd"&gt;new&lt;/span&gt; Label();
            currentUIculture.Text = &lt;span class="str"&gt;&amp;quot;Current UI Culture: &amp;quot;&lt;/span&gt; + CultureInfo.CurrentUICulture;
            Controls.Add(currentUIculture);

            Controls.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; System.Web.UI.HtmlControls.HtmlGenericControl(&lt;span class="str"&gt;&amp;quot;br&amp;quot;&lt;/span&gt;));

            Label date = &lt;span class="kwrd"&gt;new&lt;/span&gt; Label();
            date.Text = &lt;span class="str"&gt;&amp;quot;Date: &amp;quot;&lt;/span&gt; + System.DateTime.Now.ToString(&lt;span class="str"&gt;&amp;quot;d&amp;quot;&lt;/span&gt;, CultureInfo.CurrentUICulture);
            Controls.Add(date);

            Controls.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; System.Web.UI.HtmlControls.HtmlGenericControl(&lt;span class="str"&gt;&amp;quot;br&amp;quot;&lt;/span&gt;));

            Label time = &lt;span class="kwrd"&gt;new&lt;/span&gt; Label();
            time.Text = &lt;span class="str"&gt;&amp;quot;Time: &amp;quot;&lt;/span&gt; + System.DateTime.Now.ToString(&lt;span class="str"&gt;&amp;quot;t&amp;quot;&lt;/span&gt;, CultureInfo.CurrentUICulture);
            Controls.Add(time);                    
        }
    }
}
&lt;/pre&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;The trick here is deploying the satellite assemblies.&amp;#160; Build your project with your new resource files and add them to your Visual Studio 2010 project, following the steps in &lt;a title="http://msdn.microsoft.com/en-us/library/gg615453.aspx" href="http://msdn.microsoft.com/en-us/library/gg615453.aspx"&gt;How to: Deploy Localized Sandboxed Solutions by Using Satellite Assemblies&lt;/a&gt;.&amp;#160; &lt;/p&gt;

&lt;p&gt;The English version of our page:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/2260.image_5F00_1FA4ACCC.png"&gt;&lt;img style="margin: 0px; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/6708.image_5F00_thumb_5F00_687B1ED2.png" width="244" height="214" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Change the site language to French, and compare the changes.&amp;#160; The static string “Hello” remains un-localized, and the text that the user entered into the wiki page remains unaffected.&amp;#160; However, the Greeting resource string is localized as are the date and time, according to the current UI culture.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/4718.image_5F00_55C6251B.png"&gt;&lt;img style="margin: 0px; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/8030.image_5F00_thumb_5F00_6017497B.png" width="244" height="219" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Just for good measure, let’s change the site language to German to compare the changes.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/1007.image_5F00_5F3EE391.png"&gt;&lt;img style="margin: 0px; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/6864.image_5F00_thumb_5F00_6585BA1F.png" width="244" height="228" /&gt;&lt;/a&gt;&lt;/p&gt;



&lt;h2&gt;For More Information&lt;/h2&gt;

&lt;p&gt;&lt;a title="http://msdn.microsoft.com/en-us/library/gg615453.aspx" href="http://msdn.microsoft.com/en-us/library/gg615453.aspx"&gt;How to: Deploy Localized Sandboxed Solutions by Using Satellite Assemblies&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a title="http://msdn.microsoft.com/en-us/library/gg491702.aspx" href="http://msdn.microsoft.com/en-us/library/gg491702.aspx"&gt;Walkthrough: Localizing a Web Part&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ff800886.aspx"&gt;Understanding the Multilingual User Interface (MUI)&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=10241556" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/SharePoint/">SharePoint</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Visual+Studio+2010/">Visual Studio 2010</category></item><item><title>Add Microsoft.SharePoint.PowerShell Snap-In to All PowerShell Windows</title><link>http://blogs.msdn.com/b/kaevans/archive/2011/11/14/add-microsoft-sharepoint-powershell-snap-in-to-all-powershell-windows.aspx</link><pubDate>Mon, 14 Nov 2011 14:46:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10236810</guid><dc:creator>Kirk Evans[MSFT]</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/kaevans/rsscomments.aspx?WeblogPostID=10236810</wfw:commentRss><comments>http://blogs.msdn.com/b/kaevans/archive/2011/11/14/add-microsoft-sharepoint-powershell-snap-in-to-all-powershell-windows.aspx#comments</comments><description>&lt;p&gt;This post will show you how to ensure Add-PSSnapin &amp;quot;Microsoft.SharePoint.PowerShell&amp;quot; has been executed in all PowerShell windows.&lt;/p&gt;  &lt;h2&gt;Background&lt;/h2&gt;  &lt;p&gt;I have been doing a lot of work in PowerShell lately, and found myself frequently in the PowerShell ISE window writing scripts.&amp;#160; I was constantly adding the line Add-PSSnapin &amp;quot;Microsoft.SharePoint.PowerShell&amp;quot; at the top of every script I wrote, and I wanted it to just already be there like it is when I run the SharePoint 2010 Management Shell.&amp;#160; You can add the SharePoint snap-in to all PowerShell windows, so it will be available when you run PowerShell ISE and you don't have to remember to add the snap-in to every script you run.&lt;/p&gt;  &lt;p&gt;    &lt;/p&gt;  &lt;h2&gt;Implementation&lt;/h2&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Credit goes to SharePoint and PowerShell guru &lt;a href="http://blog.falchionconsulting.com"&gt;Gary Lapointe&lt;/a&gt; for this tip.&amp;#160; Open up PowerShell ISE and run the following to create a profile script if one doesn’t exist and edit it in the ISE:&lt;/p&gt;  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;if&lt;/span&gt; (!(test-path $profile.AllUsersAllHosts)) {new-item -type file -path $profile.AllUsersAllHosts –force}
powershell_ise $profile.AllUsersAllHosts&lt;/pre&gt;

&lt;p&gt;That will open a new tab in PowerShell ISE allowing you to edit profile.ps1.&amp;#160; If you simply execute $profile.AllUsersAllHosts, you will see the path where this file is stored (be default it is C:\Windows\System32\WindowsPowerShell\v1.0).&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/6648.image_5F00_5BDD1C1B.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/4276.image_5F00_thumb_5F00_0FA5126D.png" width="244" height="148" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In PowerShell ISE, you will now have a new tab where you can edit this file.&amp;#160; In that new tab, add the following code and then save the file.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;$ver = $host | select version
&lt;span class="kwrd"&gt;if&lt;/span&gt; ($ver.Version.Major -gt 1) {$host.Runspace.ThreadOptions = &lt;span class="str"&gt;&amp;quot;ReuseThread&amp;quot;&lt;/span&gt;} 
&lt;span class="kwrd"&gt;if&lt;/span&gt; ((Get-PSSnapin &lt;span class="str"&gt;&amp;quot;Microsoft.SharePoint.PowerShell&amp;quot;&lt;/span&gt; -ErrorAction SilentlyContinue) -eq $&lt;span class="kwrd"&gt;null&lt;/span&gt;) 
{
    Add-PSSnapin &lt;span class="str"&gt;&amp;quot;Microsoft.SharePoint.PowerShell&amp;quot;&lt;/span&gt;
}&lt;/pre&gt;


&lt;p&gt;The edit window looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/5661.image_5F00_00FA6688.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/6242.image_5F00_thumb_5F00_4E2A6013.png" width="244" height="156" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, close PowerShell ISE and then open it again.&amp;#160; It will take a little longer than usual to open the window because it is executing the code from Profile.ps1 and adding the Microsoft.SharePoint.PowerShell snap-in.&amp;#160; To test it, run a command such as Get-SPFarm.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/4505.image_5F00_0D8813A4.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/5672.image_5F00_thumb_5F00_65E19779.png" width="244" height="155" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That simple little trick has saved me hours of frustration while editing scripts, and has enabled me to really start leveraging PowerShell ISE.&amp;#160; Thanks to Gary for his great insight at: &lt;a href="http://social.technet.microsoft.com/Forums/en/sharepoint2010setup/thread/fcb77654-0f13-42e0-b181-6e52242fe9d6"&gt;http://social.technet.microsoft.com/Forums/en/sharepoint2010setup/thread/fcb77654-0f13-42e0-b181-6e52242fe9d6&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you are interested in PowerShell and SharePoint and haven’t visited Gary’s blog, do so immediately… it is a great resource.&amp;#160; &lt;a href="http://blog.falchionconsulting.com"&gt;http://blog.falchionconsulting.com&lt;/a&gt;.&amp;#160; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update: &lt;/strong&gt;Spence Harbar let me know that he has a post doing something very similar, executing the same script that the SharePoint 2010 Management Shell executes.&amp;#160; &lt;a title="http://www.harbar.net/archive/2010/05/03/adding-sharepoint-2010-poweshell-cmdlets-to-your-powershell-ise.aspx" href="http://www.harbar.net/archive/2010/05/03/adding-sharepoint-2010-poweshell-cmdlets-to-your-powershell-ise.aspx"&gt;http://www.harbar.net/archive/2010/05/03/adding-sharepoint-2010-poweshell-cmdlets-to-your-powershell-ise.aspx&lt;/a&gt; &lt;/p&gt;

&lt;h2&gt;For More Information&lt;/h2&gt;

&lt;p&gt;&lt;a href="http://social.technet.microsoft.com/Forums/en/sharepoint2010setup/thread/fcb77654-0f13-42e0-b181-6e52242fe9d6"&gt;http://social.technet.microsoft.com/Forums/en/sharepoint2010setup/thread/fcb77654-0f13-42e0-b181-6e52242fe9d6&lt;/a&gt;&lt;/p&gt;





&lt;p&gt;&lt;a title="http://www.harbar.net/archive/2010/05/03/adding-sharepoint-2010-poweshell-cmdlets-to-your-powershell-ise.aspx" href="http://www.harbar.net/archive/2010/05/03/adding-sharepoint-2010-poweshell-cmdlets-to-your-powershell-ise.aspx"&gt;Adding SharePoint 2010 PoweShell cmdlets to your PowerShell ISE&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/library/dd347601.aspx"&gt;Add-PSSnapIn&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a title="http://technet.microsoft.com/en-us/library/ee806878.aspx" href="http://technet.microsoft.com/en-us/library/ee806878.aspx"&gt;SharePoint 2010 Products administration by using Windows PowerShell&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/b/jorman/archive/2011/04/12/add-pssnapin-microsoft-sharepoint-powershell-failing-after-sharepoint-install.aspx"&gt;Add-PSSnapIn Microsoft.SharePoint.PowerShell Failing after SharePoint Install&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=10236810" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/SharePoint/">SharePoint</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/PowerShell/">PowerShell</category></item><item><title>Create DNS Entries From a File</title><link>http://blogs.msdn.com/b/kaevans/archive/2011/11/02/create-dns-entries-from-a-file.aspx</link><pubDate>Wed, 02 Nov 2011 21:55:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10233108</guid><dc:creator>Kirk Evans[MSFT]</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/kaevans/rsscomments.aspx?WeblogPostID=10233108</wfw:commentRss><comments>http://blogs.msdn.com/b/kaevans/archive/2011/11/02/create-dns-entries-from-a-file.aspx#comments</comments><description>&lt;p&gt;This post will show how to create DNS entries from a file using the DNSCmd.exe tool.&lt;/p&gt;  &lt;h2&gt;Background&lt;/h2&gt;  &lt;p&gt;I have a kind of edge case that I am trying to troubleshoot for my customer.&amp;#160; They have a lot of sub-companies, and they created a web application per company.&amp;#160; Fast forward a few years, they now have 143 web applications.&amp;#160; For those keeping score, that’s 44 more than the maximum supported limit for SharePoint.&amp;#160; We are working to collapse those web applications to host-named site collections.&amp;#160; In order to test the process, I needed to implement a tool where I could create that many web applications in my environment.&amp;#160; The first challenge was creating that many DNS A records.&lt;/p&gt;  &lt;h2&gt;Implementation&lt;/h2&gt;  &lt;p&gt;After searching the web and coming up fairly empty on doing this with WMI or other technologies, I decided to take the hack way out and use DNSCmd.exe.&amp;#160; This utility is present on the server when DNS is installed on the server.&amp;#160; It becomes a pretty trivial exercise, then, to write a program that runs DNSCmd.exe, provides the necessary command line arguments, and generates the DNS entries.&lt;/p&gt;  &lt;p&gt;I put all of my new DNS entries into a file, with each new host name on a single line:&lt;/p&gt;  &lt;blockquote&gt;   &lt;pre class="csharpcode"&gt;CompanyA
CompanyB
CompanyC
CompanyD&lt;/pre&gt;
  &lt;/blockquote&gt;

&lt;p&gt;Then, it’s just a matter of reading the file and using the System.Diagnostics.Process.Start() method, providing the right command line arguments.&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.Text;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.IO;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Diagnostics;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; CreateDNSEntries
{
    &lt;span class="kwrd"&gt;class&lt;/span&gt; Program
    {
        &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Main(&lt;span class="kwrd"&gt;string&lt;/span&gt;[] args)
        {
            CreateDNSENtries();
        }

        &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; CreateDNSENtries()
        {
            &lt;span class="kwrd"&gt;string&lt;/span&gt;[] sites = File.ReadAllLines(&lt;span class="str"&gt;&amp;quot;C:\\temp\\dnsnames.txt&amp;quot;&lt;/span&gt;);
            &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (&lt;span class="kwrd"&gt;string&lt;/span&gt; site &lt;span class="kwrd"&gt;in&lt;/span&gt; sites)
            {         
                &lt;span class="kwrd"&gt;string&lt;/span&gt; passRaw = &lt;span class="str"&gt;&amp;quot;YourPasswordGoesHere&amp;quot;&lt;/span&gt;;

                System.Security.SecureString pass = &lt;span class="kwrd"&gt;new&lt;/span&gt; System.Security.SecureString();
                &lt;span class="kwrd"&gt;for&lt;/span&gt; (&lt;span class="kwrd"&gt;int&lt;/span&gt; i = 0; i &amp;lt; passRaw.Length; i++)
                {
                    pass.AppendChar(passRaw[i]);
                }

                Process.Start(&lt;span class="str"&gt;&amp;quot;dnscmd.exe&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;/recordadd sharepoint.com &amp;quot;&lt;/span&gt; 
                    + site + &lt;span class="str"&gt;&amp;quot; A 192.168.2.5&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;administrator&amp;quot;&lt;/span&gt;, pass, &lt;span class="str"&gt;&amp;quot;sharepoint&amp;quot;&lt;/span&gt;);                
            }
        }
    }
}&lt;/pre&gt;


&lt;p&gt;The command that we are running uses the /recordadd command line argument, this is the stuff you will probably want to change.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Domain: sharepoint.com&lt;/li&gt;

  &lt;li&gt;Host: site&lt;/li&gt;

  &lt;li&gt;Record type: A&lt;/li&gt;

  &lt;li&gt;IP address: 192.168.2.5&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We also use the domain administrator’s credentials to run the utility, using the System.Security.SecureString class to provide the password.&lt;/p&gt;

&lt;p&gt;Run your new command line utility on your DNS server to add the entries.&amp;#160; Simple, huh?&amp;#160; It took me longer to fail searching for an answer than it did to whip together a hack solution.&amp;#160; Sometimes it’s faster to just roll up your sleeves.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;For More Information&lt;/h2&gt;

&lt;p&gt;&lt;a title="http://technet.microsoft.com/en-us/library/cc756116(WS.10).aspx" href="http://technet.microsoft.com/en-us/library/cc756116(WS.10).aspx"&gt;DNSCmd Syntax&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a title="http://msdn.microsoft.com/en-us/library/system.security.securestring.aspx" href="http://msdn.microsoft.com/en-us/library/system.security.securestring.aspx"&gt;SecureString Class&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.diagnostics.process.start.aspx"&gt;Process.Start Method&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=10233108" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/-NET+Programming/">.NET Programming</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/SharePoint/">SharePoint</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Security/">Security</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Visual+Studio+2008/">Visual Studio 2008</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Windows+Server+2008/">Windows Server 2008</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Visual+Studio+2010/">Visual Studio 2010</category></item><item><title>Set IIS Log Fields with C#</title><link>http://blogs.msdn.com/b/kaevans/archive/2011/11/02/set-iis-log-fields-with-c.aspx</link><pubDate>Wed, 02 Nov 2011 17:29:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10232571</guid><dc:creator>Kirk Evans[MSFT]</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/kaevans/rsscomments.aspx?WeblogPostID=10232571</wfw:commentRss><comments>http://blogs.msdn.com/b/kaevans/archive/2011/11/02/set-iis-log-fields-with-c.aspx#comments</comments><description>&lt;p&gt;This post shows how to set the log fields for IIS web sites programmatically.&amp;nbsp; Code is attached at the end of the post.&lt;/p&gt;
&lt;h2&gt;Background&lt;/h2&gt;
&lt;p&gt;I have a customer that has many web applications, and we need to set the IIS log fields to do some investigation.&amp;nbsp; James Blackwell posted a great sample of how to do this using VBScript (&lt;a title="http://blogs.msdn.com/b/jb/archive/2008/02/03/script-for-enabling-full-iis-logging.aspx" href="http://blogs.msdn.com/b/jb/archive/2008/02/03/script-for-enabling-full-iis-logging.aspx"&gt;http://blogs.msdn.com/b/jb/archive/2008/02/03/script-for-enabling-full-iis-logging.aspx&lt;/a&gt;).&amp;nbsp; I had a need to do this via C#, and most of the work was simply converting James&amp;rsquo; sample to use the System.DirectoryServices.DirectoryEntry class to manipulate the sites.&amp;nbsp; The reason I chose to use this instead of &lt;a href="http://learn.iis.net/page.aspx/165/how-to-use-microsoftwebadministration/"&gt;IIS7&amp;rsquo;s new Microsoft.Web.Administration namespace&lt;/a&gt; is because I am working with an IIS6 web server, however the code below works with both IIS6 and IIS7.&lt;/p&gt;
&lt;h2&gt;The Value of IIS Logs&lt;/h2&gt;
&lt;p&gt;I see a lot of customers who have IIS logging enabled but don&amp;rsquo;t do anything with the data.&amp;nbsp; The IIS logs can be invaluable to tell you what&amp;rsquo;s going on with your server at a particular time.&amp;nbsp; For instance, the operations team gets a call that their web site is slow.&amp;nbsp; We look, and don&amp;rsquo;t see anything wrong with the site.&amp;nbsp; We look at the IIS logs and see that the particular page in question is rendering very quickly.&amp;nbsp; We compare this against Fiddler and see that the customer introduced a ton of JavaScript that is slowing down the &lt;em&gt;rendering&lt;/em&gt; of the page in the browser.&amp;nbsp; SharePoint is doing its job just fine.&amp;nbsp; Using IIS logs can considerably reduce the amount of time spent finding the needle that is poking the haystack.&lt;/p&gt;
&lt;p&gt;A fantastic resource for measuring your site&amp;rsquo;s performance is the whitepaper, &amp;ldquo;&lt;a href="http://www.microsoft.com/download/en/details.aspx?id=4616"&gt;Analyzing Microsoft SharePoint Products and Technologies Usage&lt;/a&gt;&amp;rdquo;.&amp;nbsp; It covers how to use tools like LogParser to get a better understanding of how your servers are performing.&amp;nbsp; Of course, to process the data means that your server needs to log the data in the first place.&lt;/p&gt;
&lt;h2&gt;The Implementation&lt;/h2&gt;
&lt;p&gt;We will create a .NET 2.0 console application and reference the System.DirectoryServices assembly.&amp;nbsp; You can query more than just Active Directory using the DirectoryEntry class, as we will see in this post.&amp;nbsp; We need to set the LogExtFiles property for a web site, which expects a DWORD, which is a 32-bit integer.&amp;nbsp; To set the flags, we first need to determine what the values are by looking them up in the &lt;a title="http://msdn.microsoft.com/en-us/library/ms524906" href="http://msdn.microsoft.com/en-us/library/ms524906"&gt;LogExtFileFlags&lt;/a&gt; documentation.&amp;nbsp; That is where I got the values for the LogExt* constants below.&lt;/p&gt;
&lt;p&gt;The rest is simple, just choose which fields you want to set and add them together to form the value.&amp;nbsp; For instance, if you only want to set LogExtFileDate and LogExtFileTime, the value is 1 + 2 = 3.&amp;nbsp; In my example below, I set all values except LogExtFileCookie because this field can cause your log files to grow considerably.&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.Text;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.DirectoryServices;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; SetWebSiteLoggingFields
{
    &lt;span class="kwrd"&gt;class&lt;/span&gt; Program
    {
        &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; LogExtFileDate            = 1;        
        &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; LogExtFileTime            = 2;
        &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; LogExtFileClientIp        = 4;     
        &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; LogExtFileUserName        = 8;    
        &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; LogExtFileSiteName        = 16;
        &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; LogExtFileComputerName    = 32;
        &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; LogExtFileServerIp        = 64;
        &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; LogExtFileMethod          = 128;
        &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; LogExtFileUriStem         = 256;
        &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; LogExtFileUriQuery        = 512;
        &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; LogExtFileHttpStatus      = 1024;
        &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; LogExtFileWin32Status     = 2048;
        &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; LogExtFileBytesSent       = 4096;
        &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; LogExtFileBytesRecv       = 8192;
        &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; LogExtFileTimeTaken       = 16384;
        &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; LogExtFileServerPort      = 32768;        
        &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; LogExtFileUserAgent       = 65536;
        &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; LogExtFileCookie          = 131072;
        &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; LogExtFileReferer         = 262144;        
        &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; LogExtFileProtocolVersion = 524288;
        &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; LogExtFileHost            = 1048576;
        &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; LogExtFileHttpSubStatus   = 2097152;  


        &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Main(&lt;span class="kwrd"&gt;string&lt;/span&gt;[] args)
        {
            &lt;span class="kwrd"&gt;try&lt;/span&gt;
            {
                &lt;span class="kwrd"&gt;string&lt;/span&gt; serverName = args[0];
                SetLogFields(serverName);
            }
            &lt;span class="kwrd"&gt;catch&lt;/span&gt;(Exception oops)
            {
                Console.WriteLine(oops.Message);
                Console.WriteLine();
                DisplayUsage();
            }
        }

        &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; DisplayUsage()
        {
            Console.WriteLine(&lt;span class="str"&gt;"Enables all logging fields on all web sites."&lt;/span&gt;);
            Console.WriteLine(&lt;span class="str"&gt;"Usage:"&lt;/span&gt;);
            Console.WriteLine(&lt;span class="str"&gt;"\tSetWebSiteLoggingFields &amp;lt;serverName&amp;gt;"&lt;/span&gt;);
            Console.WriteLine();
            Console.WriteLine(&lt;span class="str"&gt;"Example:"&lt;/span&gt;);
            Console.WriteLine(&lt;span class="str"&gt;"\tSetWebSiteLoggingFields WFE1"&lt;/span&gt;);
            Console.WriteLine();

        }

        
        &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; SetLogFields(&lt;span class="kwrd"&gt;string&lt;/span&gt; serverName)
        {            
            DirectoryEntry w3svc = &lt;span class="kwrd"&gt;new&lt;/span&gt; DirectoryEntry(
                                &lt;span class="kwrd"&gt;string&lt;/span&gt;.Format(&lt;span class="str"&gt;"IIS://{0}/w3svc"&lt;/span&gt;, serverName));

            &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (DirectoryEntry site &lt;span class="kwrd"&gt;in&lt;/span&gt; w3svc.Children)
            {
                Console.WriteLine(&lt;span class="str"&gt;"Site ID: "&lt;/span&gt; + site.Name);

                &lt;span class="kwrd"&gt;if&lt;/span&gt; (&lt;span class="kwrd"&gt;null&lt;/span&gt; != site.Properties[&lt;span class="str"&gt;"LogExtFileFlags"&lt;/span&gt;].Value)
                {
                    Console.WriteLine(&lt;span class="str"&gt;"Setting log fields for Site ID: "&lt;/span&gt; + site.Name);

                    site.Properties[&lt;span class="str"&gt;"LogExtFileFlags"&lt;/span&gt;][0] =
                        LogExtFileDate +
                        LogExtFileTime +
                        LogExtFileClientIp +
                        LogExtFileUserName +
                        LogExtFileSiteName +
                        LogExtFileComputerName +
                        LogExtFileServerIp +
                        LogExtFileMethod +
                        LogExtFileUriStem +
                        LogExtFileUriQuery +
                        LogExtFileHttpStatus +
                        LogExtFileWin32Status +
                        LogExtFileBytesSent +
                        LogExtFileBytesRecv +
                        LogExtFileTimeTaken +
                        LogExtFileServerPort +
                        LogExtFileUserAgent +
                        LogExtFileReferer +
                        LogExtFileProtocolVersion +
                        LogExtFileHost +
                        LogExtFileHttpSubStatus;
                    site.CommitChanges();

                }
            }  
        } 
    }
}&lt;/pre&gt;
&lt;h2&gt;&amp;nbsp;&lt;/h2&gt;
&lt;h2&gt;For More Information&lt;/h2&gt;
&lt;p&gt;&lt;a title="http://blogs.msdn.com/b/jb/archive/2008/02/03/script-for-enabling-full-iis-logging.aspx" href="http://blogs.msdn.com/b/jb/archive/2008/02/03/script-for-enabling-full-iis-logging.aspx"&gt;Script for enabling full IIS logging&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://learn.iis.net/page.aspx/165/how-to-use-microsoftwebadministration/"&gt;How to Use Microsoft.Web.Administration&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a title="http://msdn.microsoft.com/en-us/library/ms524906" href="http://msdn.microsoft.com/en-us/library/ms524906"&gt;LogExtFileFlags&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a title="http://www.microsoft.com/download/en/details.aspx?id=4616" href="http://www.microsoft.com/download/en/details.aspx?id=4616"&gt;Analyzing Microsoft SharePoint Products and Technologies Usage&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=10232571" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-23-25-71/SetWebSiteLoggingFields.zip" length="20346" type="application/zip" /><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/-NET+Programming/">.NET Programming</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/SharePoint/">SharePoint</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/ASP-NET/">ASP.NET</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Visual+Studio+2008/">Visual Studio 2008</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/IIS7/">IIS7</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Windows+Server+2008/">Windows Server 2008</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Visual+Studio+2010/">Visual Studio 2010</category></item><item><title>Making The Case for Async Web Parts</title><link>http://blogs.msdn.com/b/kaevans/archive/2011/10/24/making-the-case-for-async-web-parts.aspx</link><pubDate>Mon, 24 Oct 2011 15:22:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10229046</guid><dc:creator>Kirk Evans[MSFT]</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/kaevans/rsscomments.aspx?WeblogPostID=10229046</wfw:commentRss><comments>http://blogs.msdn.com/b/kaevans/archive/2011/10/24/making-the-case-for-async-web-parts.aspx#comments</comments><description>&lt;p&gt;This post will show how to make a call to HttpWebRequest asynchronously from a web part and wait on the result or time out.&lt;/p&gt;
&lt;p&gt;Years ago, I was fortunate to &lt;a href="http://blogs.msdn.com/b/kaevans/archive/2006/03/04/543848.aspx"&gt;meet Jeff Richter and attend a session he gave on .NET performance&lt;/a&gt;.&amp;nbsp; He discussed I/O completion ports and showed why any calls from an ASP.NET page to a web service or another page absolutely must be done asynchronously.&amp;nbsp; In short, when you make a call such as HttpWebRequest.GetResponse from an ASP.NET page, you are blocking the thread.&amp;nbsp; Instead, replacing it with an asynchronous pattern such as HttpWebRequest.BeginGetResponse will use an I/O completion port to wait for the response, freeing the processing thread to do more work.&lt;/p&gt;
&lt;p&gt;I recently worked with a customer that wrote a web part that uses HttpWebRequest to make calls to a backend service to obtain some data.&amp;nbsp; Remember that an ASP.NET page invokes its child controls synchronously, calling methods on your controls like CreateChildControls and Render, and this is true for web parts as well.&amp;nbsp; If your web part performs work that can take a few seconds (such as calling another web page), then consider what happens if you place 3 of those web parts on a page.&amp;nbsp; If you use HttpWebRequest.GetResponse (the synchronous call), then each web part will be invoked serially.&amp;nbsp; As a more concrete example, if your web part takes 5 seconds to make an HttpWebRequest call, placing 3 of those controls on your page makes the total page render time 15 seconds.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/3225.image_5F00_5244B1AB.png"&gt;&lt;img style="margin: 0px; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/8182.image_5F00_thumb_5F00_28ED69AD.png" width="244" height="221" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Confirming That Web Parts Are Synchronous&lt;/h2&gt;
&lt;p&gt;While I was working on a solution, a colleague indicated he thought that web parts would be invoked asynchronously.&amp;nbsp; That&amp;rsquo;s not true, but let&amp;rsquo;s test that theory by writing some code and measuring.&amp;nbsp; I created a class called Helper with a method GetWebPageSource.&lt;/p&gt;
&lt;pre class="csharpcode"&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; GetWebPageSource(&lt;span class="kwrd"&gt;string&lt;/span&gt; url)
        {
            HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
            request.Method = &lt;span class="str"&gt;"GET"&lt;/span&gt;;
            WebResponse response = request.GetResponse();

            &lt;span class="kwrd"&gt;using&lt;/span&gt; (Stream receiveStream = response.GetResponseStream())
            {
                Encoding encode = System.Text.Encoding.GetEncoding(&lt;span class="str"&gt;"utf-8"&lt;/span&gt;);
                StreamReader readStream = &lt;span class="kwrd"&gt;new&lt;/span&gt; StreamReader(receiveStream, encode);
                Result = readStream.ReadToEnd();
            }
            response.Close();
            &lt;span class="kwrd"&gt;return&lt;/span&gt; Result;
        }&lt;/pre&gt;
&lt;p&gt;My web part will call this method in its OnPreRender method.&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.ComponentModel;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web.UI;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web.UI.WebControls;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web.UI.WebControls.WebParts;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.SharePoint;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.SharePoint.WebControls;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Threading;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.SharePoint.Utilities;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; Microsoft.PFE.DSE.Samples.Async.WebPageSourceWebPart
{
    
    [ToolboxItemAttribute(&lt;span class="kwrd"&gt;false&lt;/span&gt;)]
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; WebPageSourceWebPart : WebPart
    {
        [WebBrowsable]
        [WebDisplayName(&lt;span class="str"&gt;"Url"&lt;/span&gt;)]
        [WebDescription(&lt;span class="str"&gt;"The URL to obtain the source from"&lt;/span&gt;)]
        [Category(&lt;span class="str"&gt;"Web Page Source Settings"&lt;/span&gt;)]
        [Personalizable(PersonalizationScope.Shared)]
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Url { get; set; }


        Helper _helper;
        &lt;span class="kwrd"&gt;string&lt;/span&gt; _pageSource = &lt;span class="kwrd"&gt;string&lt;/span&gt;.Empty;


        &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; OnPreRender(EventArgs e)
        {
            &lt;span class="kwrd"&gt;using&lt;/span&gt; (SPMonitoredScope monitoredScope = &lt;span class="kwrd"&gt;new&lt;/span&gt; SPMonitoredScope(&lt;span class="str"&gt;"OnPreRender to "&lt;/span&gt; + Url)) 
            {

                &lt;span class="kwrd"&gt;if&lt;/span&gt; ((!&lt;span class="kwrd"&gt;string&lt;/span&gt;.IsNullOrEmpty(Url)) &amp;amp;&amp;amp; 
                  (WebPartManager.DisplayMode == WebPartManager.BrowseDisplayMode))
                {
                    
                    _helper = &lt;span class="kwrd"&gt;new&lt;/span&gt; Helper();
                    _pageSource = _helper.GetWebPageSource(Url);
                    
                }
            }
        }


        &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)
        {
            
            writer.AddAttribute(HtmlTextWriterAttribute.Class, &lt;span class="str"&gt;"WePageSourcePart"&lt;/span&gt;);
            writer.RenderBeginTag(HtmlTextWriterTag.Div);
            writer.WriteEncodedText(_pageSource);
            writer.RenderEndTag();
        }
    }
}
&lt;/pre&gt;
&lt;p&gt;What would be a good way to measure the performance?&amp;nbsp; The easiest way is to use the Developer Dashboard in SharePoint 2010.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/2235.DevDashboardNOAsync_5F00_4F4F4CF8.png"&gt;&lt;img style="display: inline; background-image: none;" title="DevDashboardNOAsync" border="0" alt="DevDashboardNOAsync" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/5554.DevDashboardNOAsync_5F00_thumb_5F00_45A6DEC2.png" width="244" height="180" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Just to exaggerate the problem, I added 8 web parts to the page that obtain data from various web sites (Microsoft.com, MSN.com, MSDN.Microsoft.com, etc).&amp;nbsp; The part to pay special attention to here is that 3 of the calls are to a page that I created that takes 5 seconds to render.&amp;nbsp; Total page rendering time is 17917.48 ms, or nearly 18 seconds to render my page.&amp;nbsp; Clearly the web parts are processed serially and calls to CreateChildControls, Render, etc are done synchronously.&lt;/p&gt;
&lt;p&gt;We know that users are impatient and won&amp;rsquo;t put up with a page that takes 18 seconds to render.&amp;nbsp; Think about the performance impact&amp;hellip; while you tie up the thread in ASP.NET, it is not available to service additional calls.&amp;nbsp; If 100 users access this page, you have 100 ASP.NET threads tied up for 18 seconds.&amp;nbsp; What do you think will eventually happen as these users get impatient and hit F5?&amp;nbsp; More requests, more threads tied up, and soon your server will become unresponsive because there are no threads available to service requests.&amp;nbsp; Instead of slow pages, your users will see error pages, and now you have a huge perception problem on your hands because the users are unhappy that you spent all this time and money building a solution and the site can&amp;rsquo;t handle even a few hundred users.&lt;/p&gt;
&lt;h2&gt;Making It Async&lt;/h2&gt;
&lt;p&gt;While it sounds like a dire situation (it is in its current state), the good news is that it can easily be fixed.&amp;nbsp; For instance, ASP.NET provides an incredibly handy mechanism for asynchronous pages, which is about as simple as adding an Async=True page directive.&amp;nbsp; The problem in my case was that I am using a SharePoint publishing page, and &lt;a href="http://jurgenasselman.blogspot.com/2009/05/parser-error-async-attribute-on-page.html"&gt;the SPPageParserFilter class does not allow the Async=True page directive&lt;/a&gt;.&amp;nbsp; We can still achieve the same effect, though, by directly using the same APIs in the same manner.&amp;nbsp; We already know that many of the APIs that make remote calls, such as HttpWebRequest, provide an asynchronous call mechanism.&amp;nbsp; It turns out to be very straightforward to change our web part code to call the asynchronous API and wait on the result.&amp;nbsp; First, let&amp;rsquo;s change the Helper class to expose the asynchronous methods.&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; System.Net;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.IO;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; Microsoft.PFE.DSE.Samples.Async
{
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; Helper
    {
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Result { get; set; }

        &lt;span class="kwrd"&gt;public&lt;/span&gt; IAsyncResult BeginGetWebPageSource(&lt;span class="kwrd"&gt;string&lt;/span&gt; url)
        {
                        
            HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
            request.Method = &lt;span class="str"&gt;"GET"&lt;/span&gt;;
            &lt;span class="kwrd"&gt;return&lt;/span&gt; request.BeginGetResponse(&lt;span class="kwrd"&gt;null&lt;/span&gt;, request);            
        }

        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; EndGetWebPageSource(IAsyncResult iar)
        {
            HttpWebRequest request = iar.AsyncState &lt;span class="kwrd"&gt;as&lt;/span&gt; HttpWebRequest;
            WebResponse response = request.EndGetResponse(iar);
            
            &lt;span class="kwrd"&gt;using&lt;/span&gt; (Stream receiveStream = response.GetResponseStream())
            {
                Encoding encode = System.Text.Encoding.GetEncoding(&lt;span class="str"&gt;"utf-8"&lt;/span&gt;);                
                StreamReader readStream = &lt;span class="kwrd"&gt;new&lt;/span&gt; StreamReader(receiveStream, encode);
                Result = readStream.ReadToEnd();                
            }
            response.Close();
        }

        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; GetWebPageSource(&lt;span class="kwrd"&gt;string&lt;/span&gt; url)
        {
            HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
            request.Method = &lt;span class="str"&gt;"GET"&lt;/span&gt;;
            WebResponse response = request.GetResponse();

            &lt;span class="kwrd"&gt;using&lt;/span&gt; (Stream receiveStream = response.GetResponseStream())
            {
                Encoding encode = System.Text.Encoding.GetEncoding(&lt;span class="str"&gt;"utf-8"&lt;/span&gt;);
                StreamReader readStream = &lt;span class="kwrd"&gt;new&lt;/span&gt; StreamReader(receiveStream, encode);
                Result = readStream.ReadToEnd();
            }
            response.Close();
            &lt;span class="kwrd"&gt;return&lt;/span&gt; Result;
        }
    }
}
&lt;/pre&gt;
&lt;p&gt;This should be familiar, we are just using the asynchronous API.&amp;nbsp; The interesting part to point out is that we return an IAsyncResult from BeginGetWebPageSource.&amp;nbsp; Additionally, we provide a null as the first argument to BeginGetResponse, indicating we do not have a callback method.&amp;nbsp; We&amp;rsquo;ll point this out again in just a moment.&lt;/p&gt;
&lt;p&gt;The next part that we need to change is that we need to invoke our new asynchronous calls.&amp;nbsp; We will do this on a background thread, so we don&amp;rsquo;t want ASP.NET to continue processing&amp;hellip; we need to wait until the response is received, otherwise our control would complete rendering before the HttpWebRequest ever returns, so we would not see any data.&amp;nbsp; There are a few ways to achieve this, but the easiest for our purposes is to use a WaitHandle.&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.ComponentModel;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web.UI;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web.UI.WebControls;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web.UI.WebControls.WebParts;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.SharePoint;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.SharePoint.WebControls;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Threading;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.SharePoint.Utilities;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; Microsoft.PFE.DSE.Samples.Async.WebPageSourceWebPart
{
    

    [ToolboxItemAttribute(&lt;span class="kwrd"&gt;false&lt;/span&gt;)]
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; WebPageSourceWebPart : WebPart
    {
        [WebBrowsable]
        [WebDisplayName(&lt;span class="str"&gt;"Url"&lt;/span&gt;)]
        [WebDescription(&lt;span class="str"&gt;"The URL to obtain the source from"&lt;/span&gt;)]
        [Category(&lt;span class="str"&gt;"Web Page Source Settings"&lt;/span&gt;)]
        [Personalizable(PersonalizationScope.Shared)]
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Url { get; set; }


        [WebBrowsable]
        [WebDisplayName(&lt;span class="str"&gt;"IsAsync"&lt;/span&gt;)]
        [WebDescription(&lt;span class="str"&gt;"Specifies if the control should be process asynchronously"&lt;/span&gt;)]
        [Category(&lt;span class="str"&gt;"Web Page Source Settings"&lt;/span&gt;)]
        [Personalizable(PersonalizationScope.Shared)]
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;bool&lt;/span&gt; IsAsync { get; set; }

        IAsyncResult _result;
        Helper _helper;
        &lt;span class="kwrd"&gt;string&lt;/span&gt; _pageSource = &lt;span class="kwrd"&gt;string&lt;/span&gt;.Empty;

        &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; OnLoad(EventArgs e)
        {            
            &lt;span class="kwrd"&gt;if&lt;/span&gt; ((!&lt;span class="kwrd"&gt;string&lt;/span&gt;.IsNullOrEmpty(Url)) &amp;amp;&amp;amp; 
                (WebPartManager.DisplayMode == WebPartManager.BrowseDisplayMode))
            {
                _helper = &lt;span class="kwrd"&gt;new&lt;/span&gt; Helper();
                &lt;span class="kwrd"&gt;if&lt;/span&gt; (IsAsync)
                {
                    _result = _helper.BeginGetWebPageSource(Url);
                }
                
            }
        }

        &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; OnPreRender(EventArgs e)
        {
            &lt;span class="kwrd"&gt;using&lt;/span&gt; (SPMonitoredScope monitoredScope = &lt;span class="kwrd"&gt;new&lt;/span&gt; SPMonitoredScope(&lt;span class="str"&gt;"OnPreRender to "&lt;/span&gt; + Url)) 
            {

                &lt;span class="kwrd"&gt;if&lt;/span&gt; ((!&lt;span class="kwrd"&gt;string&lt;/span&gt;.IsNullOrEmpty(Url)) &amp;amp;&amp;amp; 
                    (WebPartManager.DisplayMode == WebPartManager.BrowseDisplayMode))
                {
                    &lt;span class="kwrd"&gt;if&lt;/span&gt; (IsAsync)
                    {
                        &lt;span class="kwrd"&gt;if&lt;/span&gt; (&lt;span class="kwrd"&gt;null&lt;/span&gt; != _result)
                        {
                            WaitHandle[] handles = &lt;span class="kwrd"&gt;new&lt;/span&gt; WaitHandle[1];
                            handles[0] = _result.AsyncWaitHandle;

                            &lt;span class="rem"&gt;//Wait for 5 seconds or until the result is returned&lt;/span&gt;
                            &lt;span class="kwrd"&gt;int&lt;/span&gt; index = WaitHandle.WaitAny(handles, 10000);
                            &lt;span class="kwrd"&gt;if&lt;/span&gt; (index == WaitHandle.WaitTimeout)
                            {
                                &lt;span class="rem"&gt;//The page timed out before we got a result&lt;/span&gt;
                                _pageSource = &lt;span class="str"&gt;"Timeout before the result was returned"&lt;/span&gt;;
                            }
                            &lt;span class="kwrd"&gt;else&lt;/span&gt;
                            {
                                _helper.EndGetWebPageSource(_result);
                                _pageSource = _helper.Result;
                            }
                        }
                    }
                    &lt;span class="kwrd"&gt;else&lt;/span&gt;
                    {
                        _helper = &lt;span class="kwrd"&gt;new&lt;/span&gt; Helper();
                        _pageSource = _helper.GetWebPageSource(Url);
                    }
                }
            }
        }


        &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)
        {
            
            writer.AddAttribute(HtmlTextWriterAttribute.Class, &lt;span class="str"&gt;"WePageSourcePart"&lt;/span&gt;);
            writer.RenderBeginTag(HtmlTextWriterTag.Div);
            writer.WriteEncodedText(_pageSource);
            writer.RenderEndTag();
        }
    }
}
&lt;/pre&gt;
&lt;p&gt;In the OnLoad method, we check to see if the user indicated the web part should be processed asynchronously or not (so that we can easily compare the performance of synchronous versus asynchronous just by checking a checkbox).&amp;nbsp; If it is asynchronous, then the page starts accessing the backend data asynchronously.&amp;nbsp; In the OnPreRender method, we check again to see if this should be processed asynchronously or not.&amp;nbsp; If it is async, then we use the IAsyncResult returned from the HttpWebRequest.BeginGetResponse method to access its AsyncWaitHandle property.&amp;nbsp; This is how we will know when the external call is completed.&amp;nbsp; Further, we can provide a 10 second timeout to stop processing in case the page we are getting data from takes too long to respond.&lt;/p&gt;
&lt;p&gt;To test this, I added 8 web parts to the page and checked the IsAsync property in the web part settings.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/3302.WebPartSettings_5F00_64E98595.png"&gt;&lt;img style="display: inline; background-image: none;" title="WebPartSettings" border="0" alt="WebPartSettings" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/4073.WebPartSettings_5F00_thumb_5F00_0B4B68E1.png" width="107" height="244" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The nice thing is that the web requests are not issued unless the page is in BrowseDisplayMode, allowing you to make changes to multiple web parts while in EditDisplayMode.&amp;nbsp; If you just press the apply button to make changes, the page stays in edit mode, allowing you to change other web parts.&amp;nbsp; Once you hit OK, the page goes back to BrowseDisplayMode, and you have to wait for all of your HttpWebRequests to complete.&lt;/p&gt;
&lt;p&gt;Now that we set each web part&amp;rsquo;s IsAsync property to true, let&amp;rsquo;s see if that changed things.&amp;nbsp; We again turn to the developer dashboard.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/7026.DevDashboardWithAsync_5F00_4AA91C71.png"&gt;&lt;img style="display: inline; background-image: none;" title="DevDashboardWithAsync" border="0" alt="DevDashboardWithAsync" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/1830.DevDashboardWithAsync_5F00_thumb_5F00_6187EDED.png" width="244" height="166" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Wow!&amp;nbsp; What a difference, our page makes the same number of calls using HttpWebRequest, but they are done in parallel instead of serially.&amp;nbsp; &lt;strong&gt;Our page that used to take nearly 18 seconds to render now takes just over 5 seconds (5447.34 ms) to render!&lt;/strong&gt;&amp;nbsp; Our users are happy, our boss gives us a much needed day off, we can eat a home cooked meal for once instead of cheap pizza during yet another late night at the office.&amp;nbsp; This happens because the requests are processed in parallel.&lt;/p&gt;
&lt;h2&gt;The Alternatives&lt;/h2&gt;
&lt;p&gt;Now that I&amp;rsquo;ve got you interested to learn more, read the material in the For More Information section, particularly the two posts in Tess&amp;rsquo; blog.&amp;nbsp; Make sure that you catch exceptions and tune your environment&amp;rsquo;s maxConnections property if you intend on making a lot of calls from the server.&lt;/p&gt;
&lt;p&gt;However, you very much need to think about why you are making calls from the server in the first place.&amp;nbsp; Even though we significantly increased our page performance, it still takes a minimum of 5 seconds to render.&amp;nbsp; Frankly, that&amp;rsquo;s horrible and should be avoided at all costs.&amp;nbsp; Remember that your primary job as a developer is to make web pages as fast as possible, and taking a dependency on a system out of your control is just asking for problems.&amp;nbsp; A good alternative here would be to add some script to the page that makes the call from the client side, completely relieving the server of that job.&amp;nbsp; Think carefully if that work can be pushed to the client and off the server, because you would much rather 100 client machines take that load than your web server.&lt;/p&gt;
&lt;h2&gt;For More Information&lt;/h2&gt;
&lt;p&gt;&lt;a title="http://msdn.microsoft.com/en-us/library/yws6262h(VS.80).aspx" href="http://msdn.microsoft.com/en-us/library/yws6262h(VS.80).aspx"&gt;Creating ASP.NET Applications Using Wait Handles&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/b/tess/archive/2006/02/23/537681.aspx"&gt;ASP.NET Performance Case Study: Web Service Calls Taking Forever&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/b/tess/archive/2008/03/12/asp-net-case-study-hang-on-waitone-waitany-or-waitmultiple.aspx"&gt;ASP.NET Case Study: Hang on WaitOne, WaitAny or WaitMultiple&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=10229046" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-22-90-46/Microsoft.PFE.DSE.Samples.Async.zip" length="104560" type="application/zip" /><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/-NET+Programming/">.NET Programming</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/XML/">XML</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/SharePoint/">SharePoint</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/XML+Web+Services/">XML Web Services</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/ASP-NET/">ASP.NET</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Architecture/">Architecture</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Visual+Studio+2008/">Visual Studio 2008</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/IIS7/">IIS7</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Windows+Server+2008/">Windows Server 2008</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Internet+Explorer/">Internet Explorer</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Visual+Studio+2010/">Visual Studio 2010</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Windows/">Windows</category></item><item><title>Capturing a Memory Dump Using DebugDiag 1.2</title><link>http://blogs.msdn.com/b/kaevans/archive/2011/09/06/capturing-a-memory-dump-using-debugdiag-1-2.aspx</link><pubDate>Tue, 06 Sep 2011 20:54:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10206923</guid><dc:creator>Kirk Evans[MSFT]</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/kaevans/rsscomments.aspx?WeblogPostID=10206923</wfw:commentRss><comments>http://blogs.msdn.com/b/kaevans/archive/2011/09/06/capturing-a-memory-dump-using-debugdiag-1-2.aspx#comments</comments><description>&lt;p&gt;In previous posts, I talked about using WinDBG to debug.&amp;#160; Another incredibly handy tool to have at your disposal is the &lt;a href="http://www.microsoft.com/download/en/details.aspx?id=26798"&gt;Debug Diagnostic Tool, or DebugDiag 1.2&lt;/a&gt;.&amp;#160; This tool can be used to automatically capture a memory dump when an exception occurs.&amp;#160; To understand some of the tools at your disposal to troubleshoot issues, see my previous posts:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a title="http://blogs.msdn.com/b/kaevans/archive/2011/04/11/intro-to-windbg-for-net-developers.aspx" href="http://blogs.msdn.com/b/kaevans/archive/2011/04/11/intro-to-windbg-for-net-developers.aspx"&gt;Intro to WinDBG for .NET Developers&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a title="http://blogs.msdn.com/b/kaevans/archive/2011/04/13/windbg-and-psscor2-for-sharepoint-developers.aspx" href="http://blogs.msdn.com/b/kaevans/archive/2011/04/13/windbg-and-psscor2-for-sharepoint-developers.aspx"&gt;WinDBG and PssCor2 for SharePoint Developers&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Those posts show how to read a dump file, but don’t go into how to capture a dump file.&amp;#160; I want to write a dump file when an exception occurs so I can see what the stacktrace for it is, the state of local variables, and what modules were loaded.&amp;#160; For instance, I am seeing a System.ArithmeticException in my logs, but I can’t seem to figure out where it is coming from.&amp;#160; It would be nice to capture a full memory dump when the problem occurs.&amp;#160; DebugDiag does just that.&lt;/p&gt;  &lt;p&gt;Open the tool and click the Add Rule button and create a new Crash rule.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/7367.image_5F00_6C003BB1.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/8357.image_5F00_thumb_5F00_160039DA.png" width="244" height="150" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Next, select the target type.&amp;#160; Since I am debugging a SharePoint application, I know it is occurring in a single web application, so I choose “A specific IIS web application pool”.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/4628.image_5F00_7C2C03AA.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/8360.image_5F00_thumb_5F00_0272DA39.png" width="244" height="212" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I know that my SharePoint application uses the “SharePoint – 80” web application pool, so I choose that one.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/3051.image_5F00_53AD2196.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/3554.image_5F00_thumb_5F00_2C06A56C.png" width="244" height="213" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In the next window, choose “Exceptions” from the Advanced Settings panel at the bottom of the window.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/6607.image_5F00_401FC1F5.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/2577.image_5F00_thumb_5F00_2506F2E7.png" width="244" height="213" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;After you click the Exceptions button, you can configure a new Exception.&amp;#160; We want to capture a dump whenever a System.ArithmeticException occurs, so we choose Exception Code E0434F4D – CLR (.NET) 1.0 – 3.5 Exception from the list, and type System.ArithmeticException in the .NET Exception Type text box.&amp;#160; Finally, change the Action Type to Full Userdump so that a memory dump is created when the condition is met.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/1401.image_5F00_2F581747.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/1004.image_5F00_thumb_5F00_67968E5F.png" width="244" height="202" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The next window allows you to name the rule and to configure the location where the userdump file is created.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/7752.image_5F00_62B3DAA3.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/6114.image_5F00_thumb_5F00_6D04FF03.png" width="244" height="212" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The last window asks you if you want to activate the rule.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/6685.image_5F00_2139284A.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/1004.image_5F00_thumb_5F00_04BC366A.png" width="244" height="212" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Once we configure the rule, you can see the rule and the number of userdumps that have been generated by the rule.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/1805.image_5F00_72073CB2.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/5127.image_5F00_thumb_5F00_3164F043.png" width="244" height="150" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;To test this, I created a very simple application page that throws a new System.ArithmeticException.&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; Microsoft.SharePoint;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.SharePoint.WebControls;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; ArithmeticExceptionPage.Layouts.ArithmeticExceptionPage
{
    &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; ApplicationPage1 : LayoutsPageBase
    {
        &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Page_Load(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, EventArgs e)
        {
            &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; System.ArithmeticException(&lt;span class="str"&gt;&amp;quot;oops&amp;quot;&lt;/span&gt;);
        }
    }
}&lt;/pre&gt;


&lt;p&gt;When I browse to the page, the exception is thrown, and DebugDiag sees the exception.&amp;#160; The Userdump Count column is incremented to 2 and the .DMP file is written to the directory that I configured.&amp;#160; Be mindful that the length of time required to create the dump depends on a few factors, including how much memory your process is consuming and how fast your disk is.&amp;#160; &lt;/p&gt;

&lt;p&gt;Looking at the directory, I can right-click on the file and see a new shell extension to Analyze Crash/Hang Issue.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/0841.image_5F00_296D4DE1.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/2477.image_5F00_thumb_5F00_01C6D1B7.png" width="244" height="192" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;DebugDiag runs for awhile, and generates a nice report letting me know what happened.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/5102.image_5F00_2EDBBE85.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/4213.image_5F00_thumb_5F00_4692F5EB.png" width="244" height="52" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Of course, we already knew that the problem was a System.ArithmeticException, but the resulting stack information can often give us a better idea of what is going on with the process.&amp;#160; And if we don’t see our problem in the generated report, we know how to open WinDBG and take a look ourselves.&lt;/p&gt;

&lt;h2&gt;For More Information&lt;/h2&gt;

&lt;p&gt;&lt;a title="http://blogs.msdn.com/b/kaevans/archive/2011/04/11/intro-to-windbg-for-net-developers.aspx" href="http://blogs.msdn.com/b/kaevans/archive/2011/04/11/intro-to-windbg-for-net-developers.aspx"&gt;Intro to WinDBG for .NET Developers&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a title="http://blogs.msdn.com/b/kaevans/archive/2011/04/13/windbg-and-psscor2-for-sharepoint-developers.aspx" href="http://blogs.msdn.com/b/kaevans/archive/2011/04/13/windbg-and-psscor2-for-sharepoint-developers.aspx"&gt;WinDBG and PssCor2 for SharePoint Developers&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=10206923" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/SharePoint/">SharePoint</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/ASP-NET/">ASP.NET</category></item><item><title>Get Social Data from SharePoint via Web Service</title><link>http://blogs.msdn.com/b/kaevans/archive/2011/07/29/get-social-data-from-sharepoint-via-web-service.aspx</link><pubDate>Fri, 29 Jul 2011 15:16:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10191136</guid><dc:creator>Kirk Evans[MSFT]</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/kaevans/rsscomments.aspx?WeblogPostID=10191136</wfw:commentRss><comments>http://blogs.msdn.com/b/kaevans/archive/2011/07/29/get-social-data-from-sharepoint-via-web-service.aspx#comments</comments><description>&lt;p&gt;I am working on a project to create newsletters to send to my customers, and experimenting with a few ways to collect the information so that I can easily author the newsletter later.&amp;#160; &lt;/p&gt;  &lt;p&gt;One way that I am experimenting with is to use the Tagging feature of SharePoint 2010.&amp;#160; As I visit different web sites that are external to my farm, I can tag that site with my own URL, which saves the tag and the URL in my profile.&amp;#160; Later, I can view the tags and notes that I have applied.&lt;/p&gt;  &lt;p&gt;My idea was to add the Tags and Noteboard shortcut to my favorites bar in IE, making it easy to just click the link to save it to my profile.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/1768.image_5F00_5A0A470C.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/4011.image_5F00_thumb_5F00_78E0BAEA.png" width="244" height="43" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;When I click the link, I get the following window popup:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/8712.image_5F00_1F429E36.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/3823.image_5F00_thumb_5F00_17B72EC9.png" width="244" height="108" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Later, I can visit my MySite and see the items that I have tagged.&amp;#160; But how can I use this to possibly automate the generation of a newsletter?&amp;#160; I really don’t want to go back to my MySite and copy and paste everything I tagged.&amp;#160; &lt;/p&gt;  &lt;p&gt;One way is to use the SocialData web service in SharePoint 2010.&amp;#160; This service is located at:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;http://&amp;lt;host&amp;gt;/&amp;lt;site&amp;gt;/_vti_bin/SocialDataService.asmx&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;For my MySite, this means the URL would be:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;a href="http://my/sites/kirkevans/_vti_bin/SocialDataService.asmx"&gt;http://my/sites/kirkevans/_vti_bin/SocialDataService.asmx&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;There are methods such as GetTagUrlsOfUser, GetTagsOfUser, and GetTagUrlsOfUserByKeyword that we can use to retrieve data.&amp;#160; This makes obtaining the data a simple WCF call.&amp;#160; In Visual Studio 2010, add a service reference to the SocialDataService.asmx endpoint, and then edit the app.config:&lt;/p&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;configuration&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;system.serviceModel&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;behaviors&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;endpointBehaviors&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;behavior&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;allowImpersonationBehavior&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;clientCredentials&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;windows&lt;/span&gt; &lt;span class="attr"&gt;allowedImpersonationLevel&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Impersonation&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;clientCredentials&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;behavior&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;endpointBehaviors&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;behaviors&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;bindings&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;basicHttpBinding&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;binding&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;SocialDataServiceSoap&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;security&lt;/span&gt; &lt;span class="attr"&gt;mode&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;TransportCredentialOnly&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;transport&lt;/span&gt; &lt;span class="attr"&gt;clientCredentialType&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Ntlm&amp;quot;&lt;/span&gt;
                       &lt;span class="attr"&gt;proxyCredentialType&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Ntlm&amp;quot;&lt;/span&gt;
                       &lt;span class="attr"&gt;realm&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;&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;security&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;binding&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;basicHttpBinding&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;bindings&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;client&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;endpoint&lt;/span&gt; &lt;span class="attr"&gt;address&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://my/sites/kirkevans/_vti_bin/socialdataservice.asmx&amp;quot;&lt;/span&gt;
                &lt;span class="attr"&gt;binding&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;basicHttpBinding&amp;quot;&lt;/span&gt;
                &lt;span class="attr"&gt;bindingConfiguration&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;SocialDataServiceSoap&amp;quot;&lt;/span&gt;
                &lt;span class="attr"&gt;contract&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;MySiteSocialData.SocialDataServiceSoap&amp;quot;&lt;/span&gt;
                &lt;span class="attr"&gt;behaviorConfiguration&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;allowImpersonationBehavior&amp;quot;&lt;/span&gt;
                &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;SocialDataServiceSoap&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;client&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;system.serviceModel&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;configuration&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;


&lt;p&gt;WCF is talking to an ASMX service, so there are certain aspects of communication that it guesses at.&amp;#160; It correctly guesses that we are using basic HTTP communication, but it cannot infer the details of authentication, we have to provide those details.&amp;#160; &lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;WCF has to be told to use impersonation to use the current user’s credentials to access the backend service.&amp;#160; We do this by creating the endpointBehavior.&amp;#160; &lt;/li&gt;

  &lt;li&gt;Our SharePoint site uses NTLM for authentication.&amp;#160; We tell WCF to use NTLM by configuring the HTTP binding.&amp;#160; I also cleaned up the binding configuration a bit to make it easier to read.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now that we have configured how to talk to the service endpoint and provided security details, the last thing is the easy part… writing the code to call the service.&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;namespace&lt;/span&gt; ConsoleApplication2
{
    &lt;span class="kwrd"&gt;class&lt;/span&gt; Program
    {
        &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Main(&lt;span class="kwrd"&gt;string&lt;/span&gt;[] args)
        {
            MySiteSocialData.SocialDataServiceSoapClient proxy = 
                &lt;span class="kwrd"&gt;new&lt;/span&gt; MySiteSocialData.SocialDataServiceSoapClient();            
            proxy.ChannelFactory.Credentials.Windows.ClientCredential = 
                System.Net.CredentialCache.DefaultNetworkCredentials;

            &lt;span class="kwrd"&gt;string&lt;/span&gt;[] taggedItems =  
                proxy.GetTagUrlsOfUserByKeyword(&lt;span class="str"&gt;&amp;quot;Newsletter&amp;quot;&lt;/span&gt;,&lt;span class="str"&gt;&amp;quot;sharepoint\\kirkevans&amp;quot;&lt;/span&gt;);
            &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (var item &lt;span class="kwrd"&gt;in&lt;/span&gt; taggedItems)
            {
                Console.WriteLine(item);                
            }
        }
    }
}&lt;/pre&gt;


&lt;p&gt;The result is a list of URLs that I have tagged with the term “Newsletter”:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/2364.image_5F00_3E191214.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/5504.image_5F00_thumb_5F00_284F29B7.png" width="244" height="126" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Summary&lt;/h2&gt;

&lt;p&gt;I am still looking for an easy way to collect URLs and some text about them, and to be able to collect that data to generate a newsletter later.&amp;#160; I am not sure if I will end up using tags and notes or if there is some other way to achieve this, but you’ve got to admit that it’s pretty cool to be able to tag various URLs and retrieve them later!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10191136" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/-NET+Programming/">.NET Programming</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/SharePoint/">SharePoint</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/XML+Web+Services/">XML Web Services</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/WCF/">WCF</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Visual+Studio+2010/">Visual Studio 2010</category></item><item><title>STSADM Crashes After In-Place Upgrade to SharePoint 2010</title><link>http://blogs.msdn.com/b/kaevans/archive/2011/07/20/stsadm-crashes-after-in-place-upgrade-to-sharepoint-2010.aspx</link><pubDate>Wed, 20 Jul 2011 16:28:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10188249</guid><dc:creator>Kirk Evans[MSFT]</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/kaevans/rsscomments.aspx?WeblogPostID=10188249</wfw:commentRss><comments>http://blogs.msdn.com/b/kaevans/archive/2011/07/20/stsadm-crashes-after-in-place-upgrade-to-sharepoint-2010.aspx#comments</comments><description>&lt;p&gt;I recently performed an in-place upgrade of SharePoint 2007 to SharePoint 2010, and the upgrade appeared successful.&amp;#160; I tried to run a few STSADM commands and got the following:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;System.MissingMethodException: Method not found: 'Void Microsoft.SharePoint.SPRequestManager.Dispose()'. &lt;/p&gt;    &lt;p&gt;at Microsoft.SharePoint.StsAdmin.SPStsAdmin.Main(String[] args)&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;After a few moments of panic and a quick search, I found a &lt;a href="http://serverfault.com/questions/144013/stsadm-crash-after-sps07-to-sps10-upgrade"&gt;post&lt;/a&gt; that gave me a hint at the cause.&amp;#160; To make it easier to run STSADM commands on my server, I had added the path to the BIN directory to the %PATH% environment variable:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/0172.image_5F00_658E9FA1.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/1346.image_5F00_thumb_5F00_72887FB2.png" width="212" height="244" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;When I opened a command window and ran STSADM, it was trying to run the SharePoint 2007 version of STSADM.&amp;#160; The fix was simple, change the path variable to point to the SharePoint 2010 version:&lt;/p&gt;  &lt;p&gt;If you want to confirm this on your SharePoint 2010 server, you can either use the System Properties that I showed above, or &lt;a href="http://technet.microsoft.com/en-us/library/ff730964.aspx"&gt;use PowerShell to see your environment variables&lt;/a&gt;:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/8686.image_5F00_0AABEA0E.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/5875.image_5F00_thumb_5F00_5E8EED1C.png" width="244" height="157" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Once I was running the correct version of STSADM, everything worked as expected.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10188249" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/SharePoint/">SharePoint</category></item><item><title>Control Access to SharePoint Designer</title><link>http://blogs.msdn.com/b/kaevans/archive/2011/07/11/test-permissions-grid.aspx</link><pubDate>Mon, 11 Jul 2011 12:41:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10185162</guid><dc:creator>Kirk Evans[MSFT]</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/kaevans/rsscomments.aspx?WeblogPostID=10185162</wfw:commentRss><comments>http://blogs.msdn.com/b/kaevans/archive/2011/07/11/test-permissions-grid.aspx#comments</comments><description>&lt;div&gt;   &lt;p&gt;You will often want to control who has access to use SharePoint Designer on your site.&amp;#160; There are a number of ways to control who has permission, you will need to determine the combination that applies to your intended use of the site and your governance policy.&lt;/p&gt;    &lt;h2&gt;Determine Your Information Architecture&lt;/h2&gt;    &lt;p&gt;Inside Microsoft’s intranet, there are a huge number of SharePoint sites available for just about everything I could ever need.&amp;#160; There are sites to access my HR information, fill out expense reports, schedule vacation, log my billable hours, read news about the company, participate in discussion boards, learn about upcoming product releases, and a slew of other sites.&amp;#160; Some, such as the HR and corporate intranet news site, are completely read-only to me.&amp;#160; I have no ability to contribute information, I can only read what’s available.&amp;#160; On others, I might be part of a select group that is able to write information, such as participate in discussion lists or enter timecard and vacation information.&amp;#160; Still others, I might own a web site and control who has access to the web site, but I do not control other sites within the same site collection.&amp;#160; And the last scenario is similar to a MySite where I own the entire site collection and everything in it. &lt;/p&gt;    &lt;p&gt;In this example, there is a defined information architecture.&amp;#160; I do not universally have permissions to edit any site that I visit within the farm.&amp;#160; Many sites are read-only to me.&amp;#160; On sites where I am allowed to write information, I am typically restricted to write information only in certain areas of the site, for instance a particular list, I am not allowed to change the look and feel or grant others permissions to the site.&amp;#160; As a concrete example, the Premier organization of which I am a part of has a number of different sites within a site collection.&amp;#160; I can fill out a form on one site, but otherwise the site is read-only to me.&amp;#160; My team has another site where we can add documents and links and sample code, but otherwise the site is read-only to me. The point is that your information architecture should help structure appropriate use and govern who has access to various capabilities and features depending on business need.&amp;#160; This is not a blanket decision across the board, users are granted access and various permissions based on what they need to do with the site.&lt;/p&gt;    &lt;h3&gt;How Microsoft’s Internal Information Architecture Implies Governance&lt;/h3&gt;    &lt;p&gt;The policy within Microsoft’s intranet is pretty simple: some sites are managed, and some are not.&amp;#160; &lt;/p&gt;    &lt;p&gt;There is an HR site, for example, that tens of thousands of people access regularly.&amp;#160; This site is on dedicated hardware and isolated from the shared resources farm.&amp;#160; Only a handful of people have write permissions, while tens of thousands of people have read access and visit the site regularly.&amp;#160; This site is business critical to the entire organization and was purposefully architected due to its importance.&amp;#160; This wasn’t support by accident, but rather its storage and isolation was carefully planned when the site was being created.&amp;#160; The site is architected to handle the number of users that access the site, including peak periods such as open enrollment, and is architected with high availability in mind.&amp;#160; To get a site like this means I have to pay for it because it requires dedicated resources (SQL storage, disks, backups, etc).&amp;#160; Since I am paying for a dedicated environment, I get to do pretty much whatever I want with it, such as deploy server-side custom code.&amp;#160; The main point to note is that it is critical to the business and therefore budget is applied to ensure it is available.&amp;#160; &lt;/p&gt;    &lt;p&gt;On the other side are the unmanaged resources.&amp;#160; I can request a team site in a shared resources farm, and I will be the site collection owner.&amp;#160; There are a number of things that aren’t available to me in the shared resources farm.&amp;#160; I cannot add custom code, and a number of services are unavailable to me such as analytics and PerformancePoint.&amp;#160; While there are a few limitations, generally it’s pretty open, and I am able to use SharePoint Designer and grant others permission to use SPD.&amp;#160; I can create workflows and lookup lists and a whole bunch of stuff that makes SharePoint admins typically shudder.&amp;#160; The reason that I can do this is because it was planned and architected to allow self-service creation.&amp;#160; The environment has disk space allocated to accommodate the growth, and not everything is lumped into one giant database.&amp;#160; Site quotas are strictly enforced: if you need more than what is provided in the shared resources farm, then you need to purchase a managed solution from the IT group.&amp;#160; Large list throttling is strictly enforced, and a number of other checks and balances are enforced that limit what I can do.&amp;#160; If my site is unused for a period of time I have to renew it before it is deleted.&amp;#160; If my site in the shared resources farm uses too many resources, the IT group will make me purchase a managed solution.&lt;/p&gt;    &lt;p&gt;You can use this to your benefit in choosing whether to allow SharePoint Designer or not.&amp;#160; In one part of your farm, you probably don’t want to enable it, while in another part (where everyone keeps their team sites), you want to let the site collection owner decide if they want to use it or not.&amp;#160; Further, it’s not an all-or-nothing scenario, you can selectively choose what users can do with SPD if they have access to a particular site.&lt;/p&gt;    &lt;h2&gt;Control Access to SharePoint Designer&lt;/h2&gt;    &lt;p&gt;A nice feature in SharePoint 2010 is the ability to limit where SharePoint Designer can be used.&amp;#160; Open Central Administration and go to General Application Settings / SharePoint Designer Settings.&amp;#160; Here you can configure SharePoint Designer settings for an entire web application.&lt;/p&gt;    &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/7215.image_5F00_1A7030F7.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/1348.image_5F00_thumb_5F00_3946A4D5.png" width="244" height="165" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;You may have a site that is highly branded, and all branding and configuration is created through Visual Studio and managed through code releases.&amp;#160; In this case, you might want to completely disable SharePoint Designer for the web application.&amp;#160; You might use this in a publishing scenario where nobody has access to use SPD in the production farm.&amp;#160; Content is created in an authoring farm, possibly using SharePoint Designer, and then pushed to the production farm using content publishing.&amp;#160; What may not be immediately evident is that you can use this same approach within the same farm and publish content from one web application to another.&amp;#160;&amp;#160; &lt;/p&gt;    &lt;p&gt;The settings above apply to the entire web application.&amp;#160; If we disable SharePoint Designer, we will see the following when we try to open the site in SPD:&lt;/p&gt;    &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/4578.image_5F00_6D7ACE1B.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/3326.image_5F00_thumb_5F00_060A6B6C.png" width="244" height="65" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;If you have multiple site collections within a web application, you may want to choose whether to allow SPD for each site collection.&amp;#160; Go to the Site Settings page at the root site of the site collection and you will find the link for SharePoint Designer settings for each site collection.&lt;/p&gt;    &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/1832.image_5F00_7E7EFBFE.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/3326.image_5F00_thumb_5F00_52CE3202.png" width="244" height="221" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;If SPD were enabled at the web application level, then we would have a screen that looks very similar to the page above.&amp;#160; However, since we disabled SPD at the web application level, here is what it looks like if we try to override the settings at the site collection level.&amp;#160; You’ll see that the web application settings overrule any settings at the site collection level, and use of SPD is disabled for all site collections in the web application.&lt;/p&gt;    &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/7711.image_5F00_5D1F5662.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/3482.image_5F00_thumb_5F00_713872EB.png" width="244" height="158" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;Notice there are additional options besides turning SPD on or off.&amp;#160; A common issue that customers have with SPD is that a user can detach a page from its definition and completely customize the page.&amp;#160; Clearing the checkbox removes that permission, so users will not be able to detach from the site definition.&amp;#160; Another common request is to restrict users from being able to make changes to master pages.&amp;#160; By clearing the option, you can restrict if users can change master pages using SPD.&amp;#160; &lt;/p&gt;    &lt;p&gt;What if you want something more granular other than turning features of SPD on or off for everyone in a web application, or everyone in a site collection?&amp;#160; SharePoint 2010 provides a more granular permissions model that lets you restrict what users can or cannot do.&lt;/p&gt;    &lt;h2&gt;Control Permissions to SharePoint Designer Features&lt;/h2&gt;    &lt;p&gt;By default, SharePoint 2010 provides 33 permission levels and six default groups.&amp;#160; They are provided in the following table.&lt;/p&gt; &lt;/div&gt;  &lt;div&gt;   &lt;table style="border-collapse: collapse" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 217px" /&gt;&lt;col style="width: 98px" /&gt;&lt;col style="width: 85px" /&gt;&lt;col style="width: 80px" /&gt;&lt;col style="width: 90px" /&gt;&lt;col style="width: 84px" /&gt;&lt;col style="width: 78px" /&gt;&lt;/colgroup&gt;&lt;tbody valign="top"&gt;       &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;&amp;nbsp;&lt;/td&gt;          &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&lt;strong&gt;Limited Access&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&lt;strong&gt;View Only&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&lt;strong&gt;Read&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&lt;strong&gt;Contribute&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&lt;strong&gt;Design&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&lt;strong&gt;Full Control&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom-style: none; border-left: 0.5pt solid; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&lt;strong&gt;List Permissions&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&lt;strong&gt;&amp;#160;&lt;/strong&gt;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&lt;strong&gt;&amp;#160;&lt;/strong&gt;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&lt;strong&gt;&amp;#160;&lt;/strong&gt;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&lt;strong&gt;&amp;#160;&lt;/strong&gt;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&lt;strong&gt;&amp;#160;&lt;/strong&gt;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right: 0.5pt solid" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&lt;strong&gt;&amp;#160;&lt;/strong&gt;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom-style: none; border-left: 0.5pt solid; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;Manage Lists&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right: 0.5pt solid" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom-style: none; border-left: 0.5pt solid; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;Override Check Out&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right: 0.5pt solid" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom-style: none; border-left: 0.5pt solid; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;Add Items&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right: 0.5pt solid" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom-style: none; border-left: 0.5pt solid; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;Edit Items&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right: 0.5pt solid" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom-style: none; border-left: 0.5pt solid; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;Delete Items&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right: 0.5pt solid" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom-style: none; border-left: 0.5pt solid; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;View Items&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right: 0.5pt solid" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom-style: none; border-left: 0.5pt solid; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;Approve Items&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right: 0.5pt solid" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom-style: none; border-left: 0.5pt solid; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;Open Items&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right: 0.5pt solid" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom-style: none; border-left: 0.5pt solid; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;View Versions&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right: 0.5pt solid" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom-style: none; border-left: 0.5pt solid; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;Delete Versions&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right: 0.5pt solid" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom-style: none; border-left: 0.5pt solid; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;Create Alerts&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right: 0.5pt solid" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom: 0.5pt solid; border-left: 0.5pt solid; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;View Application Pages&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right: 0.5pt solid" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;&amp;nbsp;&lt;/td&gt;          &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom-style: none; border-left: 0.5pt solid; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&lt;strong&gt;Site Permissions&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&lt;strong&gt;&amp;#160;&lt;/strong&gt;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&lt;strong&gt;&amp;#160;&lt;/strong&gt;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&lt;strong&gt;&amp;#160;&lt;/strong&gt;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&lt;strong&gt;&amp;#160;&lt;/strong&gt;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&lt;strong&gt;&amp;#160;&lt;/strong&gt;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right: 0.5pt solid" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&lt;strong&gt;&amp;#160;&lt;/strong&gt;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom-style: none; border-left: 0.5pt solid; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;Manage Permissions&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right: 0.5pt solid" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom-style: none; border-left: 0.5pt solid; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;View Web Analytics Data&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right: 0.5pt solid" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom-style: none; border-left: 0.5pt solid; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;Create Subsites&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right: 0.5pt solid" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom-style: none; border-left: 0.5pt solid; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;Manage Web Site&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right: 0.5pt solid" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom-style: none; border-left: 0.5pt solid; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;Add and Customize Pages&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;&amp;nbsp;&lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right: 0.5pt solid" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom-style: none; border-left: 0.5pt solid; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;Apply Themes and Borders&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;&amp;nbsp;&lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right: 0.5pt solid" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom-style: none; border-left: 0.5pt solid; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;Apply Style Sheets&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;&amp;nbsp;&lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right: 0.5pt solid" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom-style: none; border-left: 0.5pt solid; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;Create Groups&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right: 0.5pt solid" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom-style: none; border-left: 0.5pt solid; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;Browse Directories&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right: 0.5pt solid" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom-style: none; border-left: 0.5pt solid; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;Use Self-Service Site Creation&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;&amp;nbsp;&lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right: 0.5pt solid" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom-style: none; border-left: 0.5pt solid; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;View Pages&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;&amp;nbsp;&lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right: 0.5pt solid" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom-style: none; border-left: 0.5pt solid; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;Enumerate Permissions&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right: 0.5pt solid" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom-style: none; border-left: 0.5pt solid; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;Browse User Information&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right: 0.5pt solid" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom-style: none; border-left: 0.5pt solid; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;Manage Alerts&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right: 0.5pt solid" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom-style: none; border-left: 0.5pt solid; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;Use Remote Interfaces&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right: 0.5pt solid" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom-style: none; border-left: 0.5pt solid; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;Use Client Integration Features&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right: 0.5pt solid" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom-style: none; border-left: 0.5pt solid; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;Open&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right: 0.5pt solid" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom: 0.5pt solid; border-left: 0.5pt solid; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;Edit Personal User Information&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right: 0.5pt solid" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;&amp;nbsp;&lt;/td&gt;          &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom-style: none; border-left: 0.5pt solid; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&lt;strong&gt;Personal Permissions&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&lt;strong&gt;&amp;#160;&lt;/strong&gt;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&lt;strong&gt;&amp;#160;&lt;/strong&gt;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&lt;strong&gt;&amp;#160;&lt;/strong&gt;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&lt;strong&gt;&amp;#160;&lt;/strong&gt;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&lt;strong&gt;&amp;#160;&lt;/strong&gt;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right: 0.5pt solid" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&lt;strong&gt;&amp;#160;&lt;/strong&gt;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom-style: none; border-left: 0.5pt solid; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;Manage Personal Views&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right: 0.5pt solid" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom-style: none; border-left: 0.5pt solid; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;Add/Remove Personal Web Parts&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom-style: none; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right: 0.5pt solid" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="height: 20px"&gt;         &lt;td style="border-bottom: 0.5pt solid; border-left: 0.5pt solid; padding-left: 7px; padding-right: 7px; border-top-style: none; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;Update Personal Web Parts&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&gt;&lt;span style="color: black"&gt;&amp;#160;&lt;/span&gt;&amp;#160;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #eeece1; border-right-style: none" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: 0.5pt solid; border-left-style: none; padding-left: 7px; padding-right: 7px; border-top-style: none; background: #c5d9f1; border-right: 0.5pt solid" valign="bottom"&gt;           &lt;p&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-00-25-31-metablogapi/0474.image_5F00_thumb_5F00_7C74D1E7.png" width="18" height="18" /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/div&gt;  &lt;p&gt;One of the interesting things about SharePoint is how it security trims the user interface based on what permissions you have.&amp;#160; For instance, as a site collection administrator, I have full permissions to the site.&amp;#160; The site actions menu shows all of the commands, including Edit in SharePoint Designer:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/6131.image_5F00_7B1D6456.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/4578.image_5F00_thumb_5F00_2F518D9D.png" width="136" height="244" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;To contrast, as a member of the Visitors group, I am given Read permissions.&amp;#160; The site actions menu looks very different because the UI is security trimmed based on my permissions.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/6131.image_5F00_2E7927B3.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/1854.image_5F00_thumb_5F00_32174290.png" width="233" height="244" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;A user with Contribute permissions has the ability to create and edit site pages in a team site.&amp;#160; Notice in the permissions grid above, we show that users with Contribute do not have the permission to add and customize pages, yet the UI shows that they have permission to add and edit wiki pages in the menu.&amp;#160; This permission name is a little misleading, because you can still add new &lt;em&gt;content&lt;/em&gt; in the form of new wiki pages, and can edit those pages, even add web parts to wiki pages as you see in the following screen shot:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/3808.image_5F00_7F473C1B.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/0336.image_5F00_thumb_5F00_5EBFFC69.png" width="244" height="188" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;What the Add and Customize Pages permission means is that without this permission, you cannot edit files at the root of the site (such as default.aspx in a team site) or files that reside in folders outside of lists and libraries.&lt;/p&gt;  &lt;p&gt;While I can add and edit wiki pages, notice there’s no link to Edit in SharePoint Designer as there is with a user who has Full Control.&amp;#160; I cannot add arbitrary pages (such as my own .ASPX or a new web part page).&amp;#160; Additionally, if we try to open the site in SharePoint Designer 2010, we receive the following error:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/0456.image_5F00_2BEFF5F5.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/4571.image_5F00_thumb_5F00_726CE5FD.png" width="244" height="66" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Let’s create a new permission group called Page Creators that only grants the Add and Customize Pages permission.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/0456.image_5F00_3CF423D8.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/3580.image_5F00_thumb_5F00_231FEDA9.png" width="244" height="219" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I grant this permission to a user that already has Contribute permissions.&amp;#160; The permissions are cumulative, meaning if something is checked in one permission group but unchecked in others, the user will have that permission.&amp;#160; You can see that the user retains Contribute permissions and is additionally granted Add and Customize Pages, which now lets them open in SharePoint Designer.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/5732.image_5F00_4262947C.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/4555.image_5F00_thumb_5F00_53D2F554.png" width="237" height="244" /&gt;&lt;/a&gt;&lt;/p&gt;        &lt;p&gt;Where a user with Contributor access only has the Edit Page, New Page, and View All Site Content options, a user that is granted the Add and Customize Pages now has a link to Edit in SharePoint Designer as well as access to Site Settings.&amp;#160; If we go to Site Settings, we can see that it, too, is security trimmed with only a few options available.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/4064.image_5F00_67EC11DD.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/8765.image_5F00_thumb_5F00_6E32E86B.png" width="244" height="92" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If we open the site in SharePoint Designer 2010, our options are security trimmed.&amp;#160; We cannot access the site master pages, cannot create new lists, and cannot manipulate workflows.&amp;#160; About the only thing we can do is to add a new web part page to the site.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/7608.image_5F00_7164D053.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/0456.image_5F00_thumb_5F00_50715DAC.png" width="244" height="154" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;By manipulating permissions, we can control what users are able to do with our site using SharePoint Designer and limit their capabilities to only those activities that they need to have for a particular site.&lt;/p&gt;  &lt;h2&gt;Do NOT Remove the Use Remote Interfaces Permission&lt;/h2&gt;  &lt;p&gt;Looking at the list of permissions, you may be tempted to disable the &lt;b&gt;Use Remote Interfaces&lt;/b&gt; permission because it mentions using “SharePoint Designer interfaces to access the Web site” — a reasonable conclusion, but just don’t do it! This permission has a dependent permission, &lt;b&gt;Use Client Integration Features&lt;/b&gt;, and removing this permission disables all SharePoint integration with Office programs like Word, Excel, and PowerPoint.&amp;#160; It also has the unintended effect of disabling your ability to access SharePoint’s web services.&lt;/p&gt;  &lt;p&gt;[via &lt;a title="http://blogs.msdn.com/b/sharepointdesigner/archive/2008/11/25/locking-down-sharepoint-designer.aspx" href="http://blogs.msdn.com/b/sharepointdesigner/archive/2008/11/25/locking-down-sharepoint-designer.aspx"&gt;http://blogs.msdn.com/b/sharepointdesigner/archive/2008/11/25/locking-down-sharepoint-designer.aspx&lt;/a&gt;]&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h2&gt;For More Information&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/library/cc262287.aspx"&gt;Governance features (SharePoint Server 2010)&lt;/a&gt;&lt;/p&gt;              &lt;p&gt;&lt;a href="http://blogs.msdn.com/b/sharepointdesigner/archive/2008/11/25/locking-down-sharepoint-designer.aspx"&gt;Locking Down SharePoint Designer&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=10185162" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/SharePoint/">SharePoint</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Life+at+Microsoft/">Life at Microsoft</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Security/">Security</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Architecture/">Architecture</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Enterprise+Social+Computing/">Enterprise Social Computing</category></item><item><title>Modifying the Page Layout for Enterprise Wiki Pages in SharePoint 2010</title><link>http://blogs.msdn.com/b/kaevans/archive/2011/07/07/modifying-the-page-layout-for-enterprise-wiki-pages-in-sharepoint-2010.aspx</link><pubDate>Fri, 08 Jul 2011 00:28:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10184398</guid><dc:creator>Kirk Evans[MSFT]</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/kaevans/rsscomments.aspx?WeblogPostID=10184398</wfw:commentRss><comments>http://blogs.msdn.com/b/kaevans/archive/2011/07/07/modifying-the-page-layout-for-enterprise-wiki-pages-in-sharepoint-2010.aspx#comments</comments><description>&lt;p&gt;In this post, I will show how to modify the page layout for Wiki pages in SharePoint 2010.&lt;/p&gt;  &lt;p&gt;There are many reasons you might want to edit the page layout for a Wiki page.&amp;#160; For instance, you might want to move the Modified By and Last Modified Date fields to appear below the content.&amp;#160; You might create a new content type based on the Wiki Page content type that adds a new field (such as a managed metadata field), or you might want to &lt;a href="http://blogs.msdn.com/b/kaevans/archive/2011/04/02/code-behind-page-layouts-with-visual-studio-2010.aspx"&gt;add additional functionality to the page via code behind&lt;/a&gt;.&amp;#160; &lt;/p&gt;  &lt;p&gt;It’s helpful to understand that pages in an Enterprise Wiki site use the same concepts as publishing pages.&amp;#160; That is, there is a content type that defines what columns are available, and a page layout that positions those fields on the page.&amp;#160; Here is the page at render time, we see the Last Modified Date and Modified By fields at the top of each page.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/4520.clip_5F00_image001_5F00_0D5F5FB7.jpg"&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-00-25-31-metablogapi/2134.clip_5F00_image001_5F00_thumb_5F00_5E2D741F.jpg" width="244" height="103" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The page layout defines the fields that are used when editing the page and what the page looks like in edit mode versus render mode.&amp;#160; Here, we can see the field controls change based on them being in edit mode.&amp;#160; Notice the Last Modified Date and Modified By fields are read-only.&amp;#160; We want to move those to the bottom of the page.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/2475.clip_5F00_image002_5F00_327CAA23.jpg"&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_image002" border="0" alt="clip_image002" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/0081.clip_5F00_image002_5F00_thumb_5F00_1CB2C1C6.jpg" width="244" height="111" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;We could customize the out of box Wiki page layout (EnterpriseWiki.aspx), but it’s a better idea to create a new page layout and copy the contents.&amp;#160; To create a custom layout, open the site in SharePoint Designer, go to the Page Layouts menu, and choose New Page Layout based on the Enterprise Wiki Page content type.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/8311.clip_5F00_image003_5F00_4314A511.jpg"&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_image003" border="0" alt="clip_image003" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/5277.clip_5F00_image003_5F00_thumb_5F00_4FA2522D.jpg" width="244" height="188" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I highlighted the EnterpriseWiki.aspx out of box file.&amp;#160; You can open that file, copy its contents, paste into your new CustomEnterpriseWiki.aspx page, then make your edits.&amp;#160; Here, I moved the Modified By and Last Modified Date information to appear below the Wiki text.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/8814.clip_5F00_image005_5F00_6112B305.jpg"&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_image005" border="0" alt="clip_image005" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/3443.clip_5F00_image005_5F00_thumb_5F00_3893D0F1.jpg" width="244" height="185" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Save, check in, publish, and approve changes.&amp;#160; Go to the site settings, Page Layout and Template Settings, and add the new page layout.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/1563.clip_5F00_image006_5F00_25DED73A.jpg"&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_image006" border="0" alt="clip_image006" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/3036.clip_5F00_image006_5F00_thumb_5F00_4BD48790.jpg" width="244" height="138" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Go back to the site, create a new Wiki page.&amp;#160; Notice that existing pages use the old page layout (you can edit the page and choose the page layout), but all new pages by default use the new page layout.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/2134.clip_5F00_image007_5F00_2F5795B0.jpg"&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_image007" border="0" alt="clip_image007" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/1882.clip_5F00_image007_5F00_thumb_5F00_0A59D537.jpg" width="244" height="158" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Notice that the Last modified date and modified by fields now appear below the Wiki content.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h2&gt;For More Information&lt;/h2&gt;  &lt;p&gt;&lt;a title="http://blog.henryong.com/2010/06/08/how-to-create-custom-sharepoint-2010-page-layouts-using-sharepoint-designer-2010/" href="http://blog.henryong.com/2010/06/08/how-to-create-custom-sharepoint-2010-page-layouts-using-sharepoint-designer-2010/"&gt;How to Create Custom SharePoint 2010 Page Layouts using SharePoint Designer 2010&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="http://social.technet.microsoft.com/Forums/en-ZA/sharepoint2010customization/thread/efd1505f-d4f8-4645-a0df-2e47e2dece64" href="http://social.technet.microsoft.com/Forums/en-ZA/sharepoint2010customization/thread/efd1505f-d4f8-4645-a0df-2e47e2dece64"&gt;How can I add a contact-button to a wiki homepage and page layout?&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="http://blog.mastykarz.nl/programmatically-creating-wiki-pages/" href="http://blog.mastykarz.nl/programmatically-creating-wiki-pages/"&gt;Programmatically creating Wiki Pages&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/b/kaevans/archive/2011/04/02/code-behind-page-layouts-with-visual-studio-2010.aspx"&gt;Code-Behind Page Layouts with Visual Studio 2010&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://mosshowto.blogspot.com/2010/06/sharepoint-2010-wiki-template.html"&gt;Adding a custom control to the SharePoint 2010 Team Site Wiki Page Template ( wkpstd.aspx ) programmatically&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=10184398" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/SharePoint/">SharePoint</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/ASP-NET/">ASP.NET</category></item><item><title>Querying Active Directory</title><link>http://blogs.msdn.com/b/kaevans/archive/2011/07/04/querying-active-directory.aspx</link><pubDate>Mon, 04 Jul 2011 15:26:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10182898</guid><dc:creator>Kirk Evans[MSFT]</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/kaevans/rsscomments.aspx?WeblogPostID=10182898</wfw:commentRss><comments>http://blogs.msdn.com/b/kaevans/archive/2011/07/04/querying-active-directory.aspx#comments</comments><description>&lt;p&gt;In this post, we show how to query Active Directory using out of box tools as well as custom code.&amp;#160; &lt;/p&gt;  &lt;p&gt;Since joining Premier Field Engineering, I realized that an essential part of understanding SharePoint requires an understanding of Active Directory and LDAP.&amp;#160; You need to have a decent grasp on the basics of LDAP to effectively configure and troubleshoot problems with user profile imports.&amp;#160; I’ll admit, this is an area that I used to be very weak in, but it is not at all difficult to ramp up and become proficient.&lt;/p&gt;  &lt;h2&gt;Querying Using Active Directory Tools&lt;/h2&gt;  &lt;p&gt;I set up a domain called SharePoint.com and added an Organizational Unit (OU) called “Contractors”, then added a few users using the “Active Directory Users and Computers” MMC snap-in on the domain controller.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/7455.image_5F00_0351B83A.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/5707.image_5F00_thumb_5F00_1E1DDE46.png" width="244" height="105" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Besides the MMC tools, other tools are installed when you create a domain controller.&amp;#160; Open the tool LDP.exe on the domain controller.&amp;#160; In the Connection menu, choose “Connect” and leave the Server string empty, indicating you want to connect to the local directory.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/8037.image_5F00_488A0F63.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/8015.image_5F00_thumb_5F00_759EFC31.png" width="244" height="122" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Next, in the Connection menu, choose Bind and bind as the currently logged in user.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/4214.image_5F00_46D9438F.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/7357.image_5F00_thumb_5F00_661BEA62.png" width="244" height="219" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;On the View menu, choose Tree, and navigate to an individual user.&amp;#160; This is an incredibly useful tool to see the properties for a user and their values:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/3644.image_5F00_4377ABE7.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/2642.image_5F00_thumb_5F00_42331308.png" width="244" height="174" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt; You can install LDP to another server, such as a SharePoint web front end, by adding the Active Directory Lightweight Directory Services role to a Windows Server 2008 instance.&amp;#160; This can be useful in troubleshooting connectivity from a SharePoint web front end to the domain controller, allowing you to query the DC from the web front end as the same user account that is running user profile imports.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;In the screen shot above, notice the property “cn” with value “Andrew Fuller”, and the “userPrincipalName” property with value “andrewfuller@SharePoint.Com&amp;quot;.&amp;#160; We are going to show how to query these same properties using C#.&lt;/p&gt;  &lt;h2&gt;Querying Using C#&lt;/h2&gt;  &lt;p&gt;To get started, add a reference in your project to System.DirectoryServices.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/0027.image_5F00_6F47FFD6.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-25-31-metablogapi/1581.image_5F00_thumb_5F00_6E6F99EC.png" width="244" height="201" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The code to connect to Active Directory is very simple.&amp;#160; We start by creating a new instance of the &lt;a href="http://msdn.microsoft.com/en-us/library/system.directoryservices.directoryentry.aspx"&gt;DirectoryEntry&lt;/a&gt; class.&amp;#160; Think of the Active Directory domain as a tree, the DirectoryEntry class lets us point to a specific node in the tree.&amp;#160; Referring to the screen shots above, we want to point to the Contractors node.&amp;#160; &lt;/p&gt;  &lt;pre class="csharpcode"&gt;DirectoryEntry entry = &lt;span class="kwrd"&gt;new&lt;/span&gt; DirectoryEntry(&lt;span class="str"&gt;&amp;quot;LDAP://OU=Contractors,DC=SharePoint,DC=Com&amp;quot;&lt;/span&gt;);&lt;/pre&gt;

&lt;p&gt;Just like with SQL queries, we need to tell the query engine what properties we want to include in the results. We do this by using the PropertiesToLoad.Add method. Also, just like SQL queries provide a WHERE clause to filter results, we can filter results in Active Directory to only include users with the Filter property.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;ds.PropertiesToLoad.Add(&lt;span class="str"&gt;&amp;quot;name&amp;quot;&lt;/span&gt;);                
ds.PropertiesToLoad.Add(&lt;span class="str"&gt;&amp;quot;userPrincipalName&amp;quot;&lt;/span&gt;);

ds.Filter = &lt;span class="str"&gt;&amp;quot;(&amp;amp;(objectClass=user))&amp;quot;&lt;/span&gt;;&lt;/pre&gt;

&lt;p&gt;Now that we have told the query engine where we want to connect, what we want in the results, and how we want to filter results, we execute the query using the FindAll method.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;SearchResultCollection results = ds.FindAll();&lt;/pre&gt;

&lt;p&gt;The results are returned in a SearchResultCollection, each &lt;a href="http://msdn.microsoft.com/en-us/library/system.directoryservices.searchresult.aspx"&gt;SearchResult&lt;/a&gt; object contains a hashtable of properties and values.&amp;#160; Think of each SearchResult as a single user.&amp;#160; The properties are the same properties that we included in the query.&amp;#160; Each property can have multiple values, but our results contain just a single value that we access through the 0 index:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;foreach&lt;/span&gt; (SearchResult result &lt;span class="kwrd"&gt;in&lt;/span&gt; results)
{
    Console.WriteLine(&lt;span class="str"&gt;&amp;quot;{0} - {1}&amp;quot;&lt;/span&gt;, 
        result.Properties[&lt;span class="str"&gt;&amp;quot;name&amp;quot;&lt;/span&gt;][0].ToString(),
        result.Properties[&lt;span class="str"&gt;&amp;quot;userPrincipalName&amp;quot;&lt;/span&gt;][0].ToString());
}&lt;/pre&gt;



&lt;p&gt;Part of the reason this is so cool is because it becomes incredibly handy to troubleshoot problems connecting to Active Directory and querying.&amp;#160; Knowing what is happening under the hood and how to use tools like LDP become invaluable tools in your toolbelt, especially for SharePoint developers doing things with user profiles.&lt;/p&gt;

&lt;h2&gt;The Full Code Listing&lt;/h2&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.DirectoryServices;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; SharePointConsoleApplication2
{
    &lt;span class="kwrd"&gt;class&lt;/span&gt; Program
    {
        &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Main(&lt;span class="kwrd"&gt;string&lt;/span&gt;[] args)
        {
            DirectoryEntry entry = &lt;span class="kwrd"&gt;new&lt;/span&gt; DirectoryEntry(&lt;span class="str"&gt;&amp;quot;LDAP://OU=Contractors,DC=SharePoint,DC=Com&amp;quot;&lt;/span&gt;);

            &lt;span class="kwrd"&gt;using&lt;/span&gt; (DirectorySearcher ds = &lt;span class="kwrd"&gt;new&lt;/span&gt; DirectorySearcher(entry))
            {
                ds.PropertiesToLoad.Add(&lt;span class="str"&gt;&amp;quot;name&amp;quot;&lt;/span&gt;);
                ds.PropertiesToLoad.Add(&lt;span class="str"&gt;&amp;quot;userPrincipalName&amp;quot;&lt;/span&gt;);

                ds.Filter = &lt;span class="str"&gt;&amp;quot;(&amp;amp;(objectClass=user))&amp;quot;&lt;/span&gt;;

                SearchResultCollection results = ds.FindAll();

                &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (SearchResult result &lt;span class="kwrd"&gt;in&lt;/span&gt; results)
                {
                    Console.WriteLine(&lt;span class="str"&gt;&amp;quot;{0} - {1}&amp;quot;&lt;/span&gt;,
                        result.Properties[&lt;span class="str"&gt;&amp;quot;name&amp;quot;&lt;/span&gt;][0].ToString(),
                        result.Properties[&lt;span class="str"&gt;&amp;quot;userPrincipalName&amp;quot;&lt;/span&gt;][0].ToString());
                }
            }
        }                
    }
}&lt;/pre&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;The results:&lt;/h2&gt;

&lt;p&gt;Andrew Fuller - andrewfuller@SharePoint.Com
  &lt;br /&gt;Nancy Davolio - NancyDavolio@SharePoint.Com

  &lt;br /&gt;Janet Leverling - JanetLeverling@SharePoint.Com

  &lt;br /&gt;Margaret Peacock - MargaretPeacock@SharePoint.Com&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;For More Information&lt;/h2&gt;

&lt;p&gt;&lt;a title="http://www.codeproject.com/KB/system/everythingInAD.aspx" href="http://www.codeproject.com/KB/system/everythingInAD.aspx"&gt;Howto: (Almost) Everything In Active Directory via C#&lt;/a&gt;&lt;/p&gt;



&lt;p&gt;&lt;a href="http://ondotnet.com/pub/a/dotnet/2003/08/04/activedir.html"&gt;Introduction to System.DirectoryServices, Part 2&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms180881(VS.80).aspx"&gt;Getting Search Results&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms806997.aspx"&gt;Using ADSI, LDAP, and Network Management Functions With Active Directory&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=10182898" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/-NET+Programming/">.NET Programming</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/SharePoint/">SharePoint</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Security/">Security</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Windows+Server+2008/">Windows Server 2008</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Interoperability/">Interoperability</category></item><item><title>Programmatically Creating a SharePoint Content Type</title><link>http://blogs.msdn.com/b/kaevans/archive/2011/04/29/programmatically-creating-a-sharepoint-content-type.aspx</link><pubDate>Fri, 29 Apr 2011 14:32:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10159503</guid><dc:creator>Kirk Evans[MSFT]</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/kaevans/rsscomments.aspx?WeblogPostID=10159503</wfw:commentRss><comments>http://blogs.msdn.com/b/kaevans/archive/2011/04/29/programmatically-creating-a-sharepoint-content-type.aspx#comments</comments><description>&lt;p&gt;I have been working on a project that requires creating a content type programmatically.&amp;#160; Admittedly, it took me awhile to figure it out.&amp;#160; You can create a content type for SharePoint declaratively in a feature using XML similar to the following:&lt;/p&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;Id&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;2fdb55a0-75c1-4ad4-b709-82b2e1393f34&amp;quot;&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;ContentType&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;0x010100C568DB52D9D0A14D9B2FDCC96666E9F2
007948130EC3DB064584E219954237AF39
0075425CE93BDC404F8B042629FC235785&amp;quot;&lt;/span&gt;                   
               &lt;span class="attr"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;TermsAndConditionsType&amp;quot;&lt;/span&gt;
               &lt;span class="attr"&gt;Group&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Custom Content Types&amp;quot;&lt;/span&gt;
               &lt;span class="attr"&gt;Description&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Custom Content Type for Terms and Conditions&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;FieldRefs&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;FieldRef&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{f55c4d88-1f2e-4ad9-aaa8-819af4ee7ee8}&amp;quot;&lt;/span&gt;
                &lt;span class="attr"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;PublishingPageContent&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;FieldRefs&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;ContentType&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;p&gt;That really long ID that is broken into three lines needs to be on a single line, it was formatted for readability.&amp;#160; The challenge is that when we try to delete the content type, we get an error that the content type is part of an application and cannot be deleted.&amp;#160; So, I needed to instead create the content type programmatically.&lt;/p&gt;

&lt;p&gt;The above XML works out to the following code:&lt;/p&gt;

&lt;pre class="csharpcode"&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://sp2010dev:44365&amp;quot;&lt;/span&gt;))
{
    SPWeb web = site.RootWeb;
                
    HtmlField field = (HtmlField)web.Fields[&lt;span class="str"&gt;&amp;quot;Page Content&amp;quot;&lt;/span&gt;];

    SPContentTypeId id = &lt;span class="kwrd"&gt;new&lt;/span&gt; SPContentTypeId(&lt;span class="str"&gt;&amp;quot;0x010100C568DB52D9D0A14D9B2FDCC96666E9F2
007948130EC3DB064584E219954237AF39
0075425CE93BDC404F8B042629FC235785&amp;quot;&lt;/span&gt;);
    SPContentType termsAndConditionsType = &lt;span class="kwrd"&gt;new&lt;/span&gt;
        SPContentType(
            id,            
            web.ContentTypes,
            &lt;span class="str"&gt;&amp;quot;TermsAndConditionsType&amp;quot;&lt;/span&gt;);
                
    web.ContentTypes.Add(termsAndConditionsType);
    termsAndConditionsType = web.ContentTypes[id];
    termsAndConditionsType.Group = &lt;span class="str"&gt;&amp;quot;Custom Content Types&amp;quot;&lt;/span&gt;;
    termsAndConditionsType.Description = &lt;span class="str"&gt;&amp;quot;Custom Content Type for Terms and Conditions&amp;quot;&lt;/span&gt;;
    termsAndConditionsType.Update();
    SPFieldLink l = &lt;span class="kwrd"&gt;new&lt;/span&gt; SPFieldLink(field) { DisplayName = &lt;span class="str"&gt;&amp;quot;Page Content&amp;quot;&lt;/span&gt; };
    termsAndConditionsType.FieldLinks.Add(l);
    termsAndConditionsType.Update();                
}&lt;/pre&gt;


&lt;p&gt;Again, the really long string needs to be in a single line.&amp;#160; &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10159503" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/-NET+Programming/">.NET Programming</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/XML/">XML</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/SharePoint/">SharePoint</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/ASP-NET/">ASP.NET</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Visual+Studio+2008/">Visual Studio 2008</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/VSeWSS/">VSeWSS</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Visual+Studio+2010/">Visual Studio 2010</category></item><item><title>User Controls and Server Controls in SharePoint</title><link>http://blogs.msdn.com/b/kaevans/archive/2011/04/28/user-controls-and-server-controls-in-sharepoint.aspx</link><pubDate>Thu, 28 Apr 2011 20:37:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10159282</guid><dc:creator>Kirk Evans[MSFT]</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/kaevans/rsscomments.aspx?WeblogPostID=10159282</wfw:commentRss><comments>http://blogs.msdn.com/b/kaevans/archive/2011/04/28/user-controls-and-server-controls-in-sharepoint.aspx#comments</comments><description>&lt;p&gt;ASP.NET developers have enjoyed using user controls and server controls in their development since ASP.NET was created.&amp;#160; This post talks about user controls and server controls and shows how to implement them in SharePoint.&lt;/p&gt;  &lt;h2&gt;User Controls&lt;/h2&gt;  &lt;p&gt;A user control is a control that is associated with a .ASCX extension and was originally intended for a developer to re-use within a single project.&amp;#160; ASP.NET developers know it is really easy to create a new user control, drag and drop some controls onto a visual designer, put some logic in the control’s code-behind, and re-use the control within a single project.&amp;#160; This is because the .ASCX file associated with the control enables you to create markup for your control:&lt;/p&gt;  &lt;pre class="csharpcode"&gt;&lt;span class="asp"&gt;&amp;lt;%@ Assembly Name=&amp;quot;$SharePoint.Project.AssemblyFullName$&amp;quot; %&amp;gt;&lt;/span&gt;
&lt;span class="asp"&gt;&amp;lt;%@ Control Language=&amp;quot;C#&amp;quot; 
        AutoEventWireup=&amp;quot;true&amp;quot; 
        CodeBehind=&amp;quot;EchoControl.ascx.cs&amp;quot; 
        Inherits=&amp;quot;ControlsDemo.ControlTemplates.ControlsDemo.EchoControl&amp;quot; %&amp;gt;&lt;/span&gt;


Enter some text:
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;TextBox1&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&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;asp:Button&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Button1&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Text&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Button&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;asp:Label&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Label1&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Visible&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;false&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:Label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;




&lt;p&gt;Because you can add markup for your control, you get the nice WYSIWYG designers for your control.&amp;#160; This allows you to drag items from the toolbox, such as a button, a label, and a text box.&amp;#160; &lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/2806.image_5F00_0B2FEAB3.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/3051.image_5F00_thumb_5F00_4F8FDBF2.png" width="219" height="244" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another nice feature of user controls is that you can quickly add event handlers for your control.&amp;#160; For instance, I double-click the button to add some code-behind, and Visual Studio pops up the code editor to allow me to add some code.&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.Web.UI;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web.UI.WebControls;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; ControlsDemo.ControlTemplates.ControlsDemo
{
    &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; EchoControl : UserControl
    {     
        &lt;span class="kwrd"&gt;protected&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)
        {
            Label1.Text = &lt;span class="str"&gt;&amp;quot;You entered: &amp;quot;&lt;/span&gt; + 
                TextBox1.Text + &lt;span class="str"&gt;&amp;quot; at &amp;quot;&lt;/span&gt; + 
                System.DateTime.Now.ToLongTimeString();
            Label1.Visible = &lt;span class="kwrd"&gt;true&lt;/span&gt;;
        }
    }
}&lt;/pre&gt;

&lt;p&gt;Notice that our code-behind derives from System.Web.UI.UserControl.&amp;#160; For existing ASP.NET developers, you will be happy to see that it’s the same old UserControl class that’s been there since ASP.NET was introduced.&amp;#160; By using the .ASCX, Visual Studio 2010 provides the same WYSIWYG, drag-and-drop features that you have with ASP.NET development.&amp;#160; In your SharePoint 2010 project, add a new User Control to your project, add the markup to the .ASCX file, and put some code in the code-behind.&amp;#160; The project structure will look like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/5226.image_5F00_0E815C8E.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/2818.image_5F00_thumb_5F00_2DC40361.png" width="241" height="231" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When the solution is compiled, the code (the .cs classes) are compiled into an assembly that is deployed to the GAC.&amp;#160; The ASCX file points to our assembly, which SharePoint deploys to the global assembly cache.&amp;#160; SharePoint deploys your .ASCX file to a special location:&amp;#160; &lt;/p&gt;

&lt;pre class="csharpcode"&gt;C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\CONTROLTEMPLATES&lt;/pre&gt;


&lt;p&gt;If you open that directory, you will see lots of out-of-box controls, such as Welcome.ascx, the control that is registered in the v4.master master page in SharePoint 2010.&amp;#160; Once the control is deployed to the ControlTemplates directory structure, an end user can then use the control in their master page or page.&amp;#160; For instance, we’ll use SharePoint Designer 2010 to edit a master page to use our control.&amp;#160; At the top of the file, register the control:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&amp;lt;%@ Register TagPrefix=&lt;span class="str"&gt;&amp;quot;demo&amp;quot;&lt;/span&gt; TagName=&lt;span class="str"&gt;&amp;quot;EchoControl&amp;quot;&lt;/span&gt;  
src=&lt;span class="str"&gt;&amp;quot;~/_controltemplates/ControlsDemo/EchoControl.ascx&amp;quot;&lt;/span&gt; %&amp;gt;&lt;/pre&gt;

&lt;p&gt;You can see where to do that in this screen shot:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/0246.image_5F00_6CB583FC.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/6786.image_5F00_thumb_5F00_47B7C383.png" width="244" height="81" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once our control is registered, we use it in our page, and the visual design is used in SharePoint Designer 2010 to give a WYSIWYG rendering to the end user.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/3580.image_5F00_5FDB2DDE.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/6116.image_5F00_thumb_5F00_1ECCAE7A.png" width="244" height="239" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We save the master page and then look at the final product:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/4643.image_5F00_16D50C18.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/5557.image_5F00_thumb_5F00_3617B2EB.png" width="244" height="69" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;User controls are a great way to add functionality to a SharePoint site for end users without requiring a web part.&amp;#160; You might have noticed that Visual Studio 2010 includes a new project item template called “Visual Web Part”.&amp;#160; This project simply creates a .ASCX control that is loaded by your web part.&lt;/p&gt;

&lt;h2&gt;&amp;#160;&lt;/h2&gt;

&lt;h2&gt;Server Controls&lt;/h2&gt;

&lt;p&gt;A server control is a compiled control that renders on the server.&amp;#160; Where user controls derive from System.Web.UI.UserControl, a server control (also known as a custom control) typically derives from System.Web.UI.WebControl.&amp;#160; The main difference is that server controls do not have a corresponding .ASCX control.&amp;#160; For some scenarios, this can be highly beneficial because the page parser does not need to parse the .ASCX control.&lt;/p&gt;

&lt;p&gt;Creating a server control is very easy.&amp;#160; In Visual Studio 2010, add a new ASP.NET Server Control item to your project from the Web group.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/8284.image_5F00_7575667B.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/5226.image_5F00_thumb_5F00_0679945F.png" width="244" height="138" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The generated template is just a suggestion, you can edit the class to suit your needs.&amp;#160; Here is a useful control for SharePoint developers that simply shows the name of the server that is currently processing the request.&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.Web.UI.WebControls;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web.UI;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; ControlsDemo
{
    [ToolboxData(&lt;span class="str"&gt;&amp;quot;&amp;lt;{0}:ServerNameControl runat=server&amp;gt;&amp;lt;/{0}:ServerNameControl&amp;gt;&amp;quot;&lt;/span&gt;)]
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; ServerNameControl : WebControl
    {
        &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()
        {
            Label l = &lt;span class="kwrd"&gt;new&lt;/span&gt; Label();
            l.Text = System.Environment.MachineName;
            Controls.Add(l);   
        }
    }
}&lt;/pre&gt;


&lt;p&gt;This can be useful for troubleshooting inconsistent behavior among web front end servers in a load-balanced farm.&amp;#160; When Visual Studio builds the project, the class is compiled into our assembly and deployed to the GAC.&amp;#160; Once the control is registered in the GAC, we can use it in our master page similar to our previous example.&amp;#160; The syntax is different, because before we could point the Src attribute to the .ASCX file, this time we need to register the control and import the namespace.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="asp"&gt;&amp;lt;%@ Register 
    TagPrefix=&amp;quot;demo2&amp;quot; 
    Namespace=&amp;quot;ControlsDemo&amp;quot; 
    Assembly=&amp;quot;ControlsDemo, Version=1.0.0.0, Culture=neutral, PublicKeyToken=01374ea14aa626aa&amp;quot; %&amp;gt;&lt;/span&gt;
&lt;span class="asp"&gt;&amp;lt;%@ Import Namespace=&amp;quot;ControlsDemo&amp;quot; %&amp;gt;&lt;/span&gt;&lt;/pre&gt;


&lt;p&gt;Once we register the control, we can now use it in our page.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;demo:ServerNameControl&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;serverNameControl&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;


&lt;p&gt;Only this time, instead of seeing the nice WYSIWYG UI in SharePoint Designer 2010, we see an error message, “The type is not registered as safe.”&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/7624.image_5F00_1A92B0E8.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/4064.image_5F00_thumb_5F00_4BB1EB88.png" width="244" height="171" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;WTF?!?!&lt;/p&gt;

&lt;p&gt;To understand what’s going on, you need to understand how the page is processed:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;When a page with a user control is requested, the following occurs: &lt;/p&gt;

  &lt;ul&gt;
    &lt;li&gt;The page parser parses the .ascx file specified in the &lt;b&gt;Src&lt;/b&gt; attribute in the &lt;b&gt;@ Register&lt;/b&gt; directive and generates a class that derives from the &lt;b&gt;System.Web.UI.UserControl&lt;/b&gt; class. &lt;/li&gt;

    &lt;li&gt;The parser then dynamically compiles the class into an assembly. &lt;/li&gt;

    &lt;li&gt;If you are using Visual Studio, then at design time only, Visual Studio creates a code behind file for the user control, and the file is precompiled by the designer itself. &lt;/li&gt;

    &lt;li&gt;Finally, the class for the user control, which is generated through the process of dynamic code generation and compilation, includes the code for the code behind file (.ascx.cs) as well as the code written inside the .ascx file.&lt;/li&gt;
  &lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;[via &lt;a title="http://support.microsoft.com/kb/893667" href="http://support.microsoft.com/kb/893667"&gt;http://support.microsoft.com/kb/893667&lt;/a&gt;]&lt;/p&gt;

&lt;p&gt;The page parser will parse the page and determine if the page uses code-behind or includes in-line script.&amp;#160; I have blogged about the impact of marking your controls as safe for pages &lt;a href="http://blogs.msdn.com/b/kaevans/archive/2010/06/28/creating-a-sharepoint-site-page-with-code-behind-using-visual-studio-2010.aspx"&gt;here&lt;/a&gt; and &lt;a href="http://blogs.msdn.com/b/kaevans/archive/2007/04/26/code-blocks-are-not-allowed-in-this-file-using-server-side-code-with-sharepoint.aspx"&gt;here&lt;/a&gt;, which gives some insight to the problem.&amp;#160; The reason that our user control example worked is because it was deployed to the ControlTemplates directory, an action that only a farm administrator would have privileges to do.&amp;#160; Thus, any control in the ControlTemplates directory structure is marked as safe out of the box:

  &lt;br /&gt;&lt;/p&gt;

&lt;pre class="csharpcode"&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;SafeControl&lt;/span&gt; &lt;span class="attr"&gt;Src&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;~/_controltemplates/*&amp;quot;&lt;/span&gt;
                   &lt;span class="attr"&gt;IncludeSubFolders&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;True&amp;quot;&lt;/span&gt;
                   &lt;span class="attr"&gt;Safe&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;True&amp;quot;&lt;/span&gt;
                   &lt;span class="attr"&gt;AllowRemoteDesigner&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;True&amp;quot;&lt;/span&gt;
                   &lt;span class="attr"&gt;SafeAgainstScript&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;True&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;


&lt;p&gt;The server control does not have a corresponding .ASCX file, so we need to explicitly mark it as safe.&amp;#160;&amp;#160; Visual Studio 2010 makes this very easy.&amp;#160; Add a new Module to your project and give it a name.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/7711.image_5F00_71A79BDE.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/6138.image_5F00_thumb_5F00_09CB063A.png" width="244" height="139" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click the module in the Solution Explorer pane, and edit the Safe Controls property.&amp;#160; Add a new safe control, taking care to add the right namespace.&amp;#160; You can use an asterisk for the typename if any type in the namespace is safe, or you can use the class name of a specific class that is safe as I did here:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/5732.image_5F00_21EE7095.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/7217.image_5F00_thumb_5F00_1D0BBCD9.png" width="244" height="119" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can delete the sample text file that is generated.&amp;#160; Now, when we look at the web.config file, we see a SafeControl entry for our control:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;      &amp;lt;SafeControl Assembly=&lt;span class="str"&gt;&amp;quot;ControlsDemo, Version=1.0.0.0, Culture=neutral, PublicKeyToken=01374ea14aa626aa&amp;quot;&lt;/span&gt;
                   Namespace=&lt;span class="str"&gt;&amp;quot;ControlsDemo&amp;quot;&lt;/span&gt;
                   TypeName=&lt;span class="str"&gt;&amp;quot;ServerNameControl&amp;quot;&lt;/span&gt;
                   Safe=&lt;span class="str"&gt;&amp;quot;True&amp;quot;&lt;/span&gt;
                   SafeAgainstScript=&lt;span class="str"&gt;&amp;quot;False&amp;quot;&lt;/span&gt; /&amp;gt;&lt;/pre&gt;


&lt;p&gt;Now, when we use the control in SharePoint Designer 2010, we have the markup correct but see nothing in the WYSIWYG view:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/8780.image_5F00_3C4E63AC.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/6131.image_5F00_thumb_5F00_2D3784D2.png" width="244" height="195" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If we view the page in the browser, we can see the effect of the control being rendered (highlighted in yellow to show you where the server name is rendered).&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/4186.image_5F00_3E3BB2B5.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/2844.image_5F00_thumb_5F00_3958FEF9.png" width="244" height="163" /&gt;&lt;/a&gt;

  &lt;br /&gt;&lt;/p&gt;

&lt;p&gt;You can do some amazing things with ASP.NET controls, and you can bring many of your existing controls forward so that end users can take advantage of them in their pages and master pages.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10159282" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/-NET+Programming/">.NET Programming</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/SharePoint/">SharePoint</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/ASP-NET/">ASP.NET</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Internet+Explorer/">Internet Explorer</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Microsoft+Office/">Microsoft Office</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Visual+Studio+2010/">Visual Studio 2010</category></item><item><title>Debugging JavaScript with the IE Developer Tools</title><link>http://blogs.msdn.com/b/kaevans/archive/2011/04/25/debugging-javascript-with-the-ie-developer-tools.aspx</link><pubDate>Mon, 25 Apr 2011 10:47:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10157636</guid><dc:creator>Kirk Evans[MSFT]</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/kaevans/rsscomments.aspx?WeblogPostID=10157636</wfw:commentRss><comments>http://blogs.msdn.com/b/kaevans/archive/2011/04/25/debugging-javascript-with-the-ie-developer-tools.aspx#comments</comments><description>&lt;p&gt;An interesting question was posted on one of the distribution lists today.&lt;/p&gt;  &lt;p&gt;“The client wanted to look into this MSDN drag and drop typed left navigation bar to work on Sharepoint 2010, does anyone make this work or have idea about this?”&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/0677.image_5F00_7E18DC1D.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-00-25-31-metablogapi/0184.image_5F00_thumb_5F00_46EF4E24.png" width="244" height="198" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Click the control that is circled, and the menu is expanded or contracted.&amp;#160; It’s basic JavaScript, but the more interesting part is how you can use the IE Developer Tools to inspect, format, and debug any page’s JavaScript.&amp;#160; To use the Developer Tools in IE (introduced in IE8, I am showing IE9 in this post) press F12.&amp;#160; Click the “Select element by click” icon, or press Ctrl + B.&amp;#160; Then, select the item in the page that you want to inspect.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/6445.image_5F00_33CE2178.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/7853.image_5F00_thumb_5F00_393C921C.png" width="244" height="215" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The lower pane changes to show the page source and the CSS rules that are applied, even showing which rules were overridden (very useful for figuring out CSS issues).&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/0272.image_5F00_515FFC77.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/2742.image_5F00_thumb_5F00_02130423.png" width="244" height="215" /&gt;&lt;/a&gt;&lt;/p&gt;        &lt;p&gt;When we clicked the element in the page, it highlighted the following HTML for us:&lt;/p&gt;  &lt;pre class="csharpcode"&gt;&amp;lt;img id=&lt;span class="str"&gt;&amp;quot;ResizeImageIncrease&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt;=&lt;span class="str"&gt;&amp;quot;cl_nav_resize_open&amp;quot;&lt;/span&gt; 
title=&lt;span class="str"&gt;&amp;quot;Expand&amp;quot;&lt;/span&gt; onmousedown=&lt;span class="str"&gt;&amp;quot;onIncreaseToc()&amp;quot;&lt;/span&gt; alt=&lt;span class="str"&gt;&amp;quot;Expand&amp;quot;&lt;/span&gt; src=&lt;span class="str"&gt;&amp;quot;http://i3.msdn.microsoft.com/Hash/a19e30a4020fe81d2b1209058013a360.png&amp;quot;&lt;/span&gt;&amp;gt;&lt;/pre&gt;


&lt;p&gt;Pretty easy to see the onmousedown handler calls “onIncreaseToc()”.&amp;#160; Let’s find that function.&amp;#160; In the top-right of the developer tools pane, there is a search window.&amp;#160; Switch to the Script tab and enter onIncreaseToc into the search window, and navigate through the results until you find the function declaration for onIncreaseToc.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/7041.image_5F00_611F917B.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/3821.image_5F00_thumb_5F00_195E0894.png" width="244" height="63" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can see that the script is minified and somewhat unreadable.&amp;#160; Click the Configuration toolbar item and choose “Format JavaScript”&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/0677.image_5F00_38A0AF67.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/6567.image_5F00_thumb_5F00_33BDFBAB.png" width="244" height="71" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that the page is formatted nicely, you can easily set breakpoints in the code.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/2337.image_5F00_3E0F200B.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/2251.image_5F00_thumb_5F00_041FDD1F.png" width="244" height="121" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click the Start Debugging button in the developer tools pane and watch your breakpoint get hit!&amp;#160; You can set watches, inspect locals, and inspect the call stack.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/5700.image_5F00_6A4BA6EF.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/6052.image_5F00_thumb_5F00_09221ACE.png" width="244" height="110" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/2335.image_5F00_416091E6.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/2766.image_5F00_thumb_5F00_58AB9657.png" width="244" height="117" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step through the code just like you would in Visual Studio, using F11 (step into), F10 (step over), and shift + F11 (step out).&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/6064.image_5F00_6CC4B2E0.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/0272.image_5F00_thumb_5F00_5DADD406.png" width="244" height="117" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the Console tab, you can enter script commands to inspect various elements.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/7140.image_5F00_15EC4B1F.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/2262.image_5F00_thumb_5F00_62B011B5.png" width="244" height="134" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And this is just the start of what you can do with this tool.&amp;#160; How about a great script profiling tool, built right into every instance of Internet Explorer, that profiles the performance of your script?&amp;#160; Just go to the Profiler tab and start profiling, interact with your page, and then stop profiling to see the call results.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/1273.image_5F00_4CE62958.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/2843.image_5F00_thumb_5F00_6BBC9D36.png" width="244" height="134" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And the best thing is that it’s already available with every copy of Internet Explorer 8 and above, so you don’t have to install any add-ons to debug.&amp;#160; This is extremely helpful when trying to reproduce behavior at someone’s desktop where you can’t install your favorite add-ons or debugging tools.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10157636" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/SharePoint/">SharePoint</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/ASP-NET/">ASP.NET</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/AJAX/">AJAX</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Visual+Studio+2008/">Visual Studio 2008</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/IIS7/">IIS7</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Internet+Explorer/">Internet Explorer</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Interoperability/">Interoperability</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Visual+Studio+2010/">Visual Studio 2010</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/REST/">REST</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/WinDBG/">WinDBG</category></item><item><title>TinyGet for SharePoint</title><link>http://blogs.msdn.com/b/kaevans/archive/2011/04/14/tinyget-for-sharepoint.aspx</link><pubDate>Thu, 14 Apr 2011 14:50:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10153938</guid><dc:creator>Kirk Evans[MSFT]</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/kaevans/rsscomments.aspx?WeblogPostID=10153938</wfw:commentRss><comments>http://blogs.msdn.com/b/kaevans/archive/2011/04/14/tinyget-for-sharepoint.aspx#comments</comments><description>&lt;p&gt;The &lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=56FC92EE-A71A-4C73-B628-ADE629C89499&amp;amp;displaylang=en"&gt;IIS 6 Resource Kit Tools&lt;/a&gt; includes a tool called &lt;a href="http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/993a8a36-5761-448f-889e-9ae58d072c09.mspx?mfr=true"&gt;TinyGet&lt;/a&gt; to quickly issue an HTTP request to a page from a command line, and it works with IIS6 and higher (yes, you can install the resource kit tools on an IIS7 machine without problems).&lt;/p&gt;  &lt;p&gt;Why would you want to issue HTTP GET requests from the command line?&amp;#160; I can’t tell you how many times I have written HttpWebRequest code in a .NET command-line executable to issue a request to a page just so that I could verify the output, only to throw the program away once I am done with it.&amp;#160; &lt;a href="http://technet.microsoft.com/en-us/library/cc656685.aspx"&gt;Using TinyGet and LogParser together&lt;/a&gt;, you can verify content in pages!&amp;#160; &lt;/p&gt;  &lt;h2&gt;Get a Page as the Current User&lt;/h2&gt;  &lt;p&gt;I needed this yesterday to simulate some load on my site so that I could see what happens when I call a single page many times, without having to try to refresh a bunch of browser windows quickly.&amp;#160; &lt;/p&gt;  &lt;pre class="csharpcode"&gt;tinyget -a:2 -u:CurrentUser -srv:sp2010dev.sharepoint.com -uri:/SitePages/SlowWebPart.aspx –data&lt;/pre&gt;


&lt;p&gt;This will access the URL “http://sp2010dev.sharepoint.com/SitePages/SlowWebPart.aspx” as the current user using NTLM authentication, and display the data in the command window.&amp;#160; Want to make sure that a particular string is in the output?&amp;#160; Pipe the results into the FINDSTR command.&amp;#160; For instance, we want to make sure that the string “You entered: 5” is in the output.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;tinyget -a:2 -u:CurrentUser -srv:sp2010dev.sharepoint.com -uri:/SitePages/SlowWebPart.aspx –data | FINDSTR  “You entered: 5”&lt;/pre&gt;

&lt;h2&gt;Using TinyGet to Warm Up / Verify Your Sites&lt;/h2&gt;

&lt;p&gt;Got a demo?&amp;#160; Create a script that issues a request to various pages to make sure they are JIT’d and cached in memory.&amp;#160; Besides demos, how can you use this in real life?&amp;#160; How about when you have a users reporting outages for specific sites, and you want to verify which ones are responding?&amp;#160; You could create a script that verifies what sites are running.&amp;#160; &lt;/p&gt;

&lt;p&gt;&lt;a title="http://blogs.technet.com/b/operationsguy/archive/2010/11/16/hey-dude-one-of-your-servers-is-broken-part-2.aspx" href="http://blogs.technet.com/b/operationsguy/archive/2010/11/16/hey-dude-one-of-your-servers-is-broken-part-2.aspx"&gt;http://blogs.technet.com/b/operationsguy/archive/2010/11/16/hey-dude-one-of-your-servers-is-broken-part-2.aspx&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;&amp;#160;&lt;/h2&gt;

&lt;h2&gt;Using TinyGet to Troubleshoot Memory Issues&lt;/h2&gt;

&lt;p&gt;QA or operations has reported memory issues and you want to try to reproduce it and troubleshoot it in your environment?&amp;#160; &lt;/p&gt;

&lt;p&gt;&lt;a title="http://blogs.msdn.com/b/tess/archive/2008/02/15/net-debugging-demos-lab-3-memory.aspx" href="http://blogs.msdn.com/b/tess/archive/2008/02/15/net-debugging-demos-lab-3-memory.aspx"&gt;http://blogs.msdn.com/b/tess/archive/2008/02/15/net-debugging-demos-lab-3-memory.aspx&lt;/a&gt;&amp;#160;&lt;/p&gt;


&lt;h2&gt;More TinyGet Links&lt;/h2&gt;

&lt;p&gt;&lt;a title="http://archive.msdn.microsoft.com/AsyncMvc/Wiki/View.aspx?id=11350" href="http://archive.msdn.microsoft.com/AsyncMvc/Wiki/View.aspx?id=11350"&gt;http://archive.msdn.microsoft.com/AsyncMvc/Wiki/View.aspx?id=11350&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a title="http://code.google.com/p/toolsdotnet/wiki/TinyGet" href="http://code.google.com/p/toolsdotnet/wiki/TinyGet"&gt;http://code.google.com/p/toolsdotnet/wiki/TinyGet&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=10153938" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/IIS7/">IIS7</category></item><item><title>WinDBG and PssCor2 for SharePoint Developers</title><link>http://blogs.msdn.com/b/kaevans/archive/2011/04/13/windbg-and-psscor2-for-sharepoint-developers.aspx</link><pubDate>Wed, 13 Apr 2011 18:17:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10153462</guid><dc:creator>Kirk Evans[MSFT]</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/kaevans/rsscomments.aspx?WeblogPostID=10153462</wfw:commentRss><comments>http://blogs.msdn.com/b/kaevans/archive/2011/04/13/windbg-and-psscor2-for-sharepoint-developers.aspx#comments</comments><description>&lt;p&gt;In this post, we’ll see some steps about how to troubleshoot a production SharePoint site using WinDBG and PssCor2.dll.&amp;#160; For an introduction to setting up your environment and getting started, see my blog post “&lt;a href="http://blogs.msdn.com/b/kaevans/archive/2011/04/11/intro-to-windbg-for-net-developers.aspx"&gt;Intro to WinDBG for .NET Developers&lt;/a&gt;”.&amp;#160; In this post, we’ll apply some of our WinDBG skills to a SharePoint environment and show you how you can figure out what’s going on in your site.&amp;#160; &lt;/p&gt;  &lt;p&gt;In this example, a customer has raised the issue that their SharePoint site is very slow.&amp;#160; Let’s assume that you have looked at IIS logs and notice server render times are abnormally long and you want to find out what the server is doing.&amp;#160; &lt;/p&gt;  &lt;h2&gt;Capture a Memory Dump in IIS&lt;/h2&gt;  &lt;p&gt;The first thing we need to do is figure out which process we need to capture memory for.&amp;#160; In Windows Server 2008, open a command window to “c:\windows\system32\inetsrv” and type the following command:&lt;/p&gt;  &lt;pre class="csharpcode"&gt;appcmd list wp&lt;/pre&gt;


&lt;p&gt;This will list the worker processes for IIS, showing you the process ID (aka PID) and its associated application pool.&amp;#160; Here’s the output on my machine.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/0358.image_5F00_13FA968C.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/5732.image_5F00_thumb_5F00_0A71B249.png" width="244" height="64" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you know the PID (in this screenshot, I want to troubleshoot PID 5292), open up task manager on the machine.&amp;#160; Select the checkbox “Show processes from all users” and find the W3WP.exe process with the ID you just found.&amp;#160; Right-click and choose “Create Dump File”.&amp;#160; &lt;/p&gt;



&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/7282.image_5F00_08C0E675.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/1832.image_5F00_thumb_5F00_52DBF15A.png" width="244" height="185" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note that this will pause all threads for the process while the memory dump file is created, the length of time depends on the amount of memory the process is using.&lt;/p&gt;

&lt;h2&gt;Inspect the Crash Dump in WinDBG with PssCor2&lt;/h2&gt;

&lt;p&gt;Open WinDBG (making sure that you’ve already &lt;a href="http://blogs.msdn.com/b/kaevans/archive/2011/04/11/intro-to-windbg-for-net-developers.aspx"&gt;configured your environment for PssCor2.dll and set your symbol path&lt;/a&gt;) and choose “Open Crash Dump”.&amp;#160; Open the .DMP file that task manager created for you.&amp;#160; I copied PssCor2.dll into the same directory as WinDBG.exe, so I type:&lt;/p&gt;

&lt;p&gt;.load psscor2&lt;/p&gt;

&lt;p&gt;Next, type “!help” to make sure that the psscor2.dll extension was loaded.&amp;#160; Once you see the help instructions, we can start evaluating the memory dump file.&amp;#160; &lt;/p&gt;

&lt;h2&gt;!aspxpages&lt;/h2&gt;

&lt;p&gt;So far, this is my favorite command in the psscor2.dll extension.&amp;#160; This handy little guy asks for all the .ASPX pages in memory.&amp;#160; It shows the URL to the page, how long the thread has been running, what the thread ID is, and what the HTTP verb is for the response.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/5141.image_5F00_1F9FB7F1.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/4087.image_5F00_thumb_5F00_1E5B1F12.png" width="244" height="103" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Looking at our screen shot, I can see a bunch of requests to “SlowWebPart.aspx” that have been running for 20 or more seconds.&amp;#160; Most have a thread ID of “XXX”, but a few of them have a thread ID that we can inspect (like 50 and 55).&amp;#160; One of the first things I do when trying to analyze a slow SharePoint site is to run this command to see how long things are taking.&amp;#160; If you see one page frequently at the top, it is running the longest and is the culprit for consuming resources.&amp;#160; If you see lots of different pages, you can look at the callstacks to see what everyone is doing and what they are waiting on.&lt;/p&gt;

&lt;h2&gt;~[thread]s&lt;/h2&gt;

&lt;p&gt;When you hit a breakpoint in Visual Studio, you can see the call stack, showing the chain of methods that were called up until the breakpoint was hit.&amp;#160; If you want to do something similar in WinDBG, you need to tell it thread contains the CLR stack you are interested in.&amp;#160; You can get a list of managed threads with the command:&lt;/p&gt;

&lt;p&gt;!threads&lt;/p&gt;

&lt;p&gt;In WinDBG, you need to switch to a specific thread context to see its stack.&amp;#160; In the previous !aspxpages example, we already know that there are threads 50 and 55 that we can take a look at, so we would issue the following statement:&lt;/p&gt;

&lt;p&gt;~50s&lt;/p&gt;

&lt;p&gt;The output is shown below.&amp;#160; &lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/2821.image_5F00_7D67AC6A.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/2402.image_5F00_thumb_5F00_5DA8ACD5.png" width="244" height="244" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Notice the yellow highlights in the screen shot.&amp;#160; The first:&lt;/p&gt;

&lt;p&gt;0:000&amp;gt; ~50s&lt;/p&gt;

&lt;p&gt;The command prompt is “0:000&amp;gt;”, and we issued the command to switch the thread context to thread ID 50.&amp;#160; The second:&lt;/p&gt;

&lt;p&gt;0:050&amp;gt; !clrstack&lt;/p&gt;

&lt;p&gt;Notice the command prompt has changed to “0:050&amp;gt;”.&amp;#160; This tells us that the current context is thread id 50.&amp;#160; Looking at the stack, we see that our ASPX page was loaded, the CreateChildControls method was called on an object called MyWebPart.VisualWebPart1.VisualWebPart1, and then we see “MyWebPart.ServiceReference1.ServiceClient.GetData(Int32)” called before a bunch of WCF stuff.&amp;#160; We can infer from looking at the stack that a web part or control is in the middle of calling a WCF service.&amp;#160; We also saw earlier by using !aspxpages that this thread has been running for 24 seconds.&amp;#160; &lt;/p&gt;

&lt;h2&gt;~* e !clrstack&lt;/h2&gt;

&lt;p&gt;We will follow the steps in &lt;a href="http://oredev.org/prod/oredev/site.nsf/docsbycodename/session?opendocument&amp;amp;sid=12201594012B3B23C125759200289A81&amp;amp;track=5EA1ADD99261C8A5C12575A500494952&amp;amp;day=3"&gt;Tess Ferrandez’ demo video&lt;/a&gt; (watch the entire video, but scroll to 24:48 in the video) to list the CLR stack for every thread in memory.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;~* e !clrstack&lt;/pre&gt;


&lt;p&gt;This statement says “for every thread, dump the CLR stack”.&amp;#160; The output is very long, but we see a bunch of CLR stacks that look just like the screen shot above.&amp;#160; This is our most likely suspect, a web part that is calling a web service synchronously and is waiting on a response.&lt;/p&gt;

&lt;h2&gt;!DumpStackObjects (dso) &lt;/h2&gt;

&lt;p&gt;Since we switched our context thread to thread ID 50, we want to inspect objects in the stack, kind of like looking at the Locals window in Visual Studio.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;!dso&lt;/pre&gt;


&lt;p&gt;The output looks like:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/6138.image_5F00_7BA6BAC9.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-00-25-31-metablogapi/0777.image_5F00_thumb_5F00_73AF1867.png" width="244" height="113" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I highlighted some of the results.&amp;#160; Notice that the objects are shown as they are pushed onto the stack (oldest on stack at the bottom of the page).&amp;#160; We can see our web part user control, and we can see some WCF stuff.&amp;#160; Just like you would poke around in Visual Studio locals window to inspect various objects, we can inspect objects in WinDBG.&amp;#160; &lt;/p&gt;

&lt;h2&gt;!DumpObject (do) and !DumpField&lt;/h2&gt;

&lt;p&gt;Notice the underlined item at the top of the WCF box.&amp;#160; When you use !dso to dump the stack objects, the second column has a header column that says “Object”.&amp;#160; This is actually the address for the object.&amp;#160; We can use that piece of information to inspect the objects.&amp;#160; For instance, we can inspect the ASCX user control by using its object address.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;!&lt;span class="kwrd"&gt;do&lt;/span&gt; 00000001479219e0&lt;/pre&gt;


&lt;p&gt;The output is:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/4478.image_5F00_6498398D.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/5557.image_5F00_thumb_5F00_5DD50A3D.png" width="244" height="227" /&gt;&lt;/a&gt;&amp;#160; &lt;/p&gt;

&lt;p&gt;Look at the very bottom of that output, we see that the user control contains a Label control.&amp;#160; Want to see what’s in it?&amp;#160; We can use the !dumpfield command.&amp;#160; To see how to use it, use !help dumpfield to see the syntax.&amp;#160; When we used !do, our object address was 00000001479219e0.&amp;#160; We use that to inspect specific fields on that object, like drilling down into an object in the locals window in Visual Studio.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;!dumpfield -field Label1 -string 00000001479219e0&lt;/pre&gt;


&lt;p&gt;The output shows the fields for the Label control.&amp;#160; Pretty cool!&amp;#160; We can use this trick to inspect the various objects in the stack.&amp;#160; In our screenshot above (under the !DumpStackObjects heading), I underlined a System.String object with address 0000000141389b58.&amp;#160; We can use the !dumpobject command to inspect it:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;!&lt;span class="kwrd"&gt;do&lt;/span&gt; 0000000141389b58 &lt;/pre&gt;


&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/5545.image_5F00_1C5A57E4.png"&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="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/8863.image_5F00_thumb_5F00_691E1E7A.png" width="244" height="99" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I highlighted in the result that the URI for the web service we are calling is “http://localhost:5555/service.svc”.&amp;#160; Now we not only know that we have a bunch of web parts that are waiting on a response (and have been for a long time) from a service, but we also know the URI of the service.&amp;#160; We can then do some tests to confirm that the web service is responding quite slowly!&lt;/p&gt;

&lt;p&gt;We can then use this to determine a course of action.&amp;#160; We have a web part that is blocking threads, waiting on a response from a web service that is not under our control.&amp;#160; We shouldn’t block the thread waiting on a synchronous response from a web service, instead we should use an asynchronous request with a timeout.&amp;#160; Our plan is then to change the web service call to be asynchronous, load test it using a tool like the Web Performance Test in Visual Studio 2010, and confirm that it now meets our performance expectations even when the web service we are calling is performing poorly.&amp;#160; &lt;/p&gt;

&lt;p&gt;Lest you think this example is contrived, let me assure you that it is not.&amp;#160; This same behavior happens if you use HttpWebRequest synchronously, consume an RSS feed synchronously, call a WCF service synchronously, etc.&amp;#160; I have seen a lot of people make web service calls from ASP.NET controls synchronously, this can kill your SharePoint site’s performance.&lt;/p&gt;

&lt;h2&gt;For More Information&lt;/h2&gt;

&lt;p&gt;&lt;a href="http://oredev.org/prod/oredev/site.nsf/docsbycodename/session?opendocument&amp;amp;sid=12201594012B3B23C125759200289A81&amp;amp;track=5EA1ADD99261C8A5C12575A500494952&amp;amp;day=3"&gt;Video introduction to WinDBG for .NET Developers&lt;/a&gt; by Tess Ferrandez&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/b/tess/archive/2008/02/27/net-debugging-demos-lab-4-high-cpu-hang-review.aspx"&gt;.NET Debugging Demos Lab 4: High CPU Hang – Review&lt;/a&gt; also by Tess&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/b/kaevans/archive/2011/04/11/intro-to-windbg-for-net-developers.aspx"&gt;Intro to WinDBG for .NET Developers&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/magazine/cc163791.aspx"&gt;Drill Into .NET Framework Internals to See How the CLR Creates Runtime Objects&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=10153462" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/-NET+Programming/">.NET Programming</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/SharePoint/">SharePoint</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/ASP-NET/">ASP.NET</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Visual+Studio+2008/">Visual Studio 2008</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/WCF/">WCF</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/IIS7/">IIS7</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Visual+Studio+2010/">Visual Studio 2010</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/REST/">REST</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/WinDBG/">WinDBG</category></item><item><title>Intro to WinDBG for .NET Developers</title><link>http://blogs.msdn.com/b/kaevans/archive/2011/04/11/intro-to-windbg-for-net-developers.aspx</link><pubDate>Mon, 11 Apr 2011 17:53:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10152166</guid><dc:creator>Kirk Evans[MSFT]</dc:creator><slash:comments>8</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/kaevans/rsscomments.aspx?WeblogPostID=10152166</wfw:commentRss><comments>http://blogs.msdn.com/b/kaevans/archive/2011/04/11/intro-to-windbg-for-net-developers.aspx#comments</comments><description>&lt;p&gt;When your code goes into production, you usually no longer have access to its binaries when they reach their final destination.&amp;#160; Whether that is someone’s desktop or a set of servers, you no longer have access to directly observe your code and its environment.&amp;#160; Operating system patches are applied, network policies are changed, firewall rules are restricted, disks are configured… as your code lives its life in its new home, there’s a wide range of things that may change in its environment and affect how it behaves (or rather misbehaves).&amp;#160; You liberally littered your code with lines of logging logic to learn in these lulls (long alliteration!), and that gives you an idea of where the code is not performing as expected, but you still are unaware of the exact reason (and thus, the fix) that your code is not working as expected.&lt;/p&gt;  &lt;p&gt;Your challenge now is to try to figure out what is going wrong without wasting the customer’s time doing troubleshooting, because there’s nothing that a business user loves more than being asked by a technical guy which button is he really clicking to get that error.&amp;#160; You don’t have the luxury (should have thrown that in the alliteration sentence previously) of spending days or weeks doing troubleshooting, you need to know what is happening right now.&lt;/p&gt;  &lt;p&gt;In a perfect world, you would have the stack trace, you’d be able to inspect locals, you could debug the code.&amp;#160; Well, it turns out, you can do just that… and never attach to the customer’s environment.&lt;/p&gt;  &lt;h2&gt;Download WinDbg and Get Started&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/whdc/DevTools/Debugging/default.mspx"&gt;Download the Debugging Tools for Windows&lt;/a&gt; to your local developer machine.&amp;#160; You can get them as part of the Windows SDK.&amp;#160; Choose the Debugging Tools for Windows in the Common Tools section if you only want the debugging tools for your current machine’s platform.&amp;#160; If it is an x86 machine, then only the x86 tools are installed.&amp;#160; If your machine has an Intel 64-bit processor, then only the x64 tools are installed.&amp;#160; If you choose the redistributable version, then you get all three (x86, x64, and Itanium).&amp;#160;&amp;#160; After you download, install to your local developer machine (not the customer’s machine).&lt;/p&gt;  &lt;p&gt;One tip is to change the installation path.&amp;#160; By default, windbg will be copied to the Program Files directory.&amp;#160; Instead, change the path to something like “d:\debug”. This will make it easier to add extensions.&lt;/p&gt;  &lt;p&gt;Now that you’ve installed, in the start menu you will see a new program group, “Debugging Tools for Windows (x64)”, and a new program in it called “WinDbg”.&amp;#160; &lt;/p&gt;  &lt;h2&gt;Install PssCor2&lt;/h2&gt;  &lt;p&gt;The next step is to install the extensions for managed code.&amp;#160; By default, WinDbg is a tool designed for unmanaged code debugging, but an extension ships with the .NET Framework called SOS.dll that enables managed code debugging.&amp;#160; An additional &lt;a href="http://blogs.msdn.com/b/tom/archive/2010/03/29/new-debugger-extension-for-net-psscor2-released.aspx"&gt;WinDbg extension called PssCor2&lt;/a&gt; has been created that is a superset of SOS and provides additional functionality for managed code developers.&amp;#160; This extension will allow you to inspect managed threads, the managed object heap, and inspect the CLR stack, among other things.&amp;#160; &lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=5c068e9f-ebfe-48a5-8b2f-0ad6ab454ad4"&gt;Download PssCor2&lt;/a&gt; and unzip it.&amp;#160; &lt;/p&gt;  &lt;p&gt;I unzipped PssCor2 to my “d:\debug” directory, this will make it much easier to use as you will see later in this post.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/2746.image_5F00_055B18B4.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 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-00-25-31-metablogapi/7711.image_5F00_thumb_5F00_0F5F9412.png" width="244" height="113" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Another tip: copy the psscor2.dll file and copy it to the d:\debug directory where windbg.exe resides.&amp;#160; This will make loading the extension much easier for you.&lt;/p&gt;  &lt;h2&gt;Set Your Symbol Path&lt;/h2&gt;  &lt;p&gt;Have you ever noticed the .PDB file that is generated in your program’s bin/debug folder when you compile in Visual Studio?&amp;#160; This is the file that contains debugging symbols for your assembly.&amp;#160; It does not contain instructions or executable code, but rather provides the ability for a debugger to translate your compiled code’s instructions into something you can read.&amp;#160; Microsoft provides a set of symbols on a public server for your debugger program to use.&amp;#160; These symbols are located at &lt;a href="http://msdl.microsoft.com/download/symbols"&gt;http://msdl.microsoft.com/download/symbols&lt;/a&gt;.&amp;#160; &lt;/p&gt;  &lt;p&gt;The symbols will be downloaded from Microsoft and cached locally on your machine.&amp;#160; Choose a path to store the symbols.&amp;#160; For instance, I store mine at “d:\debug\symbols”.&amp;#160; After you use WinDBG, you will see the symbols downloaded to your machine.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/7217.image_5F00_6E6C216A.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 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-00-25-31-metablogapi/1263.image_5F00_thumb_5F00_186C1F93.png" width="244" height="116" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now that you understand the symbols are downloaded and cached locally, here’s the first tricky part: setting your symbol path in WinDbg.&amp;#160; Start WinDbg, and on the File menu choose “Symbol File Path…”&amp;#160; Specify your symbol path using the following syntax:&lt;/p&gt;  &lt;pre class="csharpcode"&gt;srv*d:\debug\symbols*http://msdl.microsoft.com/download/symbols&lt;/pre&gt;

&lt;p&gt;Lest you think this is a misprint or you are having problems getting this to work, here’s exactly what’s in my symbol path.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/0876.image_5F00_736E5F19.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 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-00-25-31-metablogapi/7120.image_5F00_thumb_5F00_2BACD632.png" width="244" height="92" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I prefer to keep everything (symbols, extensions, dump files) under a single folder at the root of a drive (for instance, “d:\debug”) because it is easier to locate all the pieces when you need them.&lt;/p&gt;

&lt;h2&gt;Create a Problem&lt;/h2&gt;

&lt;p&gt;To get started, we’ll need some code to work with.&amp;#160; I’ll use a simple Console application.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; Microsoft.PFE.Samples
{
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; Program
    {
        &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Main()
        {
            Console.WriteLine(&lt;span class="str"&gt;&amp;quot;Enter a message:&amp;quot;&lt;/span&gt;);
        &lt;span class="kwrd"&gt;string&lt;/span&gt; input = Console.ReadLine();
            Data d = &lt;span class="kwrd"&gt;new&lt;/span&gt; Data
            {
                ID = 5,
                Message = input,
                CurrentDateTime = System.DateTime.Now
            };
            Console.WriteLine(&lt;span class="str"&gt;&amp;quot;You entered: &amp;quot;&lt;/span&gt; + d);
        }
    }

    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; Data
    {
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; ID {get; set;}
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Message {get; set;}
        &lt;span class="kwrd"&gt;public&lt;/span&gt; DateTime CurrentDateTime {get; set;}


        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; ToString()
        {
            Console.ReadLine();
            &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt;.Format(&lt;span class="str"&gt;&amp;quot;ID:{0} {1} at {2}&amp;quot;&lt;/span&gt;, ID, Message, 

CurrentDateTime.ToLongTimeString());
        }
    }
}&lt;/pre&gt;
You can see that this is an over-glorified “echo” program.&amp;#160; I compile the program using CSC.exe, making sure we are using the version of CSC from Windows SDK 7.0, which is the .NET Framework 3.5 version.&amp;#160; &lt;pre class="csharpcode"&gt;csc.exe Program.cs&lt;/pre&gt;

&lt;p&gt;PssCor2 works with the .NET 3.5 framework, so if you are compiling with Visual Studio, then change the framework version to 3.5 before compiling.&amp;#160; Run the program and enter a string to see the program work correctly.&amp;#160; &lt;strike&gt;There is also a PssCor4.dll, which works with .NET 4.0&lt;/strike&gt;. &lt;em&gt;[&lt;strong&gt;Update 4/13/2011&lt;/strong&gt; – thanks to an astute reader for pointing out PssCor4 is not available]&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The customer’s complaint is that they have to hit enter twice in the Console window and cannot figure out why.&amp;#160; Our program is doing something we didn’t intend, so let’s see what’s going on.&amp;#160; Of course, for our contrived example, we know that it’s because of the second Console.ReadLine that was mistakenly placed in the ToString method of the Data class, so let’s use WinDbg to find it.&amp;#160; &lt;/p&gt;

&lt;p&gt;Run the program and enter a string, but do not hit Enter at the second ReadLine prompt.&amp;#160; We are now at the point that we want to capture what’s happening, and we can do this in a dump file.&lt;/p&gt;

&lt;h2&gt;Take a Dump&lt;/h2&gt;

&lt;p&gt;Rather than try to remote desktop into a customer’s machine or worse, asking them to install Visual Studio so you can do some debugging, you can have them capture a dump of the process so that you can debug it later.&amp;#160; Windows 7 and Windows 2008 have this great feature for capturing dumps from a process using Task Manager.&amp;#160; To see what’s going on in the customer’s environment without asking them to install utilities, just have them start Task Manager (either from Control Panel or using Ctrl + Alt + Del).&amp;#160; Find the process, right-click, and choose “Create Dump File”. &lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/8787.image_5F00_5619074F.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-00-25-31-metablogapi/7612.image_5F00_thumb_5F00_7B3651BB.png" width="244" height="108" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After we create the dump file, we see the following message:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/0358.image_5F00_0F4F6E45.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 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-00-25-31-metablogapi/3010.image_5F00_thumb_5F00_2D4D7C39.png" width="244" height="108" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The dump file is just a snapshot of memory. However large the dump file is on disk is the size of the memory used for the process.&amp;#160; You can zip the file to significantly reduce its size, and download it to your machine for offline analysis.&lt;/p&gt;

&lt;p&gt;There are other ways to create a dump file.&amp;#160; The one we created is a full dump, and its size is 74.9 MB (just for our small Console application).&amp;#160; You can use other tools to create a dump.&amp;#160; For instance, I like to use &lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx"&gt;Process Explorer from SysInternals&lt;/a&gt; to capture a dump (using the Full Dump option generates the same thing as right-clicking a process in Task Manager).&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/7128.image_5F00_509A70DE.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 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-00-25-31-metablogapi/2425.image_5F00_thumb_5F00_5D9450EF.png" width="244" height="166" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Other tools used to create dumps include using ADPlus (included in the Debugging Tools for Windows), or even &lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=28bd5941-c458-46f1-b24d-f60151d875a3&amp;amp;displaylang=en"&gt;DebugDiag&lt;/a&gt;.&amp;#160; Using DebugDiag lets you create rules for when dumps are captured, such as when a particular exception is raised.&amp;#160; This can be very helpful for grabbing a snapshot of memory as the error occurs so that you can troubleshoot errors in ULS logs in SharePoint.&lt;/p&gt;

&lt;h2&gt;Start Exploring with WinDbg&lt;/h2&gt;

&lt;p&gt;Now that we have a dump file to debug, we go back to WinDbg and start exploring.&amp;#160; From the file menu, choose “File / Open Crash Dump” to open the dump file in WinDbg.&amp;#160; As soon as you open it, you should see text:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;Loading Dump File [D:\debug\program6.dmp]
User Mini Dump File: Only registers, stack and portions of memory are available

Symbol search path is: srv*d:\debug\symbols*http://msdl.microsoft.com/download/symbols
Executable search path is: 
Windows 7 Version 7600 MP (8 procs) Free x64
Product: WinNt, suite: SingleUserTS
Machine Name:
Debug session time: Sun Feb  6 10:43:57.000 2011 (GMT-6)
System Uptime: not available
Process Uptime: 0 days 1:05:48.000
.........................
ntdll!NtRequestWaitReplyPort+0xa:
00000000`76d2ff7a c3              ret&lt;/pre&gt;

&lt;p&gt;Inside that text, you can see the path for the dump file and the symbol search path.&amp;#160; At the bottom of the screen is a text box where you will enter commands.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/8371.image_5F00_6A8E3100.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-00-25-31-metablogapi/4571.image_5F00_thumb_5F00_7B262BEE.png" width="244" height="120" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;List Modules&lt;/h3&gt;

&lt;p&gt;Let’s start by listing the modules that were loaded in the process when the dump file was created.&amp;#160; In the text box at the bottom of the dump window, type “lm” to list the modules.&amp;#160; The output looks like this:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;0:000&amp;gt; lm
start             &lt;span class="kwrd"&gt;end&lt;/span&gt;                 module name
00000000`00120000 00000000`00128000   program    (deferred)             
00000000`742b0000 00000000`74379000   msvcr80    (deferred)             
00000000`76ac0000 00000000`76bba000   user32     (deferred)             
00000000`76bc0000 00000000`76cdf000   kernel32   (pdb symbols)          d:\debug\symbols\kernel32.pdb\D5E268B5DD1048A1BFB011C744DD3DFA2\kernel32.pdb
00000000`76ce0000 00000000`76e8b000   ntdll      (pdb symbols)          d:\debug\symbols\ntdll.pdb\0F7FCF88442F4B0E9FB51DC4A754D9DE2\ntdll.pdb
000007fe`f3fb0000 000007fe`f4134000   mscorjit   (deferred)             
000007fe`f5030000 000007fe`f5f0b000   mscorlib_ni   (deferred)             
000007fe`f7650000 000007fe`f7ffe000   mscorwks   (deferred)             
000007fe`f8010000 000007fe`f80a0000   mscoreei   (deferred)             
000007fe`f80a0000 000007fe`f810f000   mscoree    (deferred)             
000007fe`fcb70000 000007fe`fcb7f000   CRYPTBASE   (deferred)             
000007fe`fcc40000 000007fe`fcc4f000   profapi    (deferred)             
000007fe`fcf20000 000007fe`fcf8b000   KERNELBASE   (deferred)             
000007fe`fd0e0000 000007fe`fd2e2000   ole32      (deferred)             
000007fe`fd4d0000 000007fe`fd59a000   usp10      (deferred)             
000007fe`fd6f0000 000007fe`fe476000   shell32    (deferred)             
000007fe`fe480000 000007fe`fe4ae000   imm32      (deferred)             
000007fe`fe840000 000007fe`fe84e000   lpk        (deferred)             
000007fe`fe9d0000 000007fe`feaab000   advapi32   (deferred)             
000007fe`feb50000 000007fe`fec7e000   rpcrt4     (deferred)             
000007fe`fec80000 000007fe`fecf1000   shlwapi    (deferred)             
000007fe`fed00000 000007fe`fed67000   gdi32      (deferred)             
000007fe`fee10000 000007fe`fef19000   msctf      (deferred)             
000007fe`fef20000 000007fe`fefbf000   msvcrt     (deferred)             
000007fe`fefd0000 000007fe`fefef000   sechost    (deferred)  &lt;/pre&gt;

&lt;p&gt;The thing you are looking for here is the existence of mscorwks for a .NET 3.5 application.&amp;#160; PssCor2 works with .NET 3.5.&amp;#160; If you have a .NET 4.0 process that you want to debug, you can do this as well, but you need to use the SOS.dll extension that ships with the .NET Framework.&amp;#160; For an interesting look at changes introduced in .NET 4.0, see &lt;a title="http://debuggingblog.com/wp/2009/07/07/windbg-extension-sos-in-clr-40net-framework-40-ctp-net-runtime-dll-renamed-and-sos-commands-just-got-richer/" href="http://debuggingblog.com/wp/2009/07/07/windbg-extension-sos-in-clr-40net-framework-40-ctp-net-runtime-dll-renamed-and-sos-commands-just-got-richer/"&gt;http://debuggingblog.com/wp/2009/07/07/windbg-extension-sos-in-clr-40net-framework-40-ctp-net-runtime-dll-renamed-and-sos-commands-just-got-richer/&lt;/a&gt;.&amp;#160; &lt;/p&gt;

&lt;p&gt;For SharePoint developers, this can be an invaluable tool for debugging things like feature receivers and event handlers that never seem to fire.&amp;#160; You can list the loaded modules to see if your assembly is ever loaded into memory.&amp;#160; If it’s not, then you most likely have a configuration issue, significantly limiting the number of places to go searching for things to fix.&amp;#160; For ASP.NET developers, this can be extremely helpful in figuring out why an HttpModule is not firing, indicating the most likely problem is in the web.config file.&amp;#160; &lt;/p&gt;

&lt;h3&gt;Load PssCor2&lt;/h3&gt;

&lt;p&gt;OK, we saw the modules that are loaded, let’s dive into our code a little and see what we can discover.&amp;#160; Remember that we have an extension for WinDbg that we need to load.&amp;#160; To load PssCor2.dll as an extension into WinDbg, use the following command:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;.load d:\debug\psscor2\amd64\psscor2.dll&lt;/pre&gt;

&lt;p&gt;My machine is a 64-bit Intel machine, so I will load the AMD64 version of PssCor2.dll.&amp;#160; The version you are debugging with and the architecture of the dump that you are debugging must match.&amp;#160; If you are debugging an x86 process, you need to load the x86 version of PssCor2.dll.&amp;#160; &lt;/p&gt;

&lt;p&gt;To verify it was loaded, type the following command:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;!help&lt;/pre&gt;

&lt;p&gt;The output of this is:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;0:000&amp;gt; .load d:\debug\psscor2\amd64\psscor2.dll
0:000&amp;gt; !help
-------------------------------------------------------------------------------
PSSCOR is a debugger extension DLL designed to aid &lt;span class="kwrd"&gt;in&lt;/span&gt; the debugging of managed
programs. Functions are listed by category, then roughly &lt;span class="kwrd"&gt;in&lt;/span&gt; order of
importance. Shortcut names &lt;span class="kwrd"&gt;for&lt;/span&gt; popular functions are listed &lt;span class="kwrd"&gt;in&lt;/span&gt; parenthesis.
Type &lt;span class="str"&gt;&amp;quot;!help &amp;lt;functionname&amp;gt;&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;for&lt;/span&gt; detailed info on that &lt;span class="kwrd"&gt;function&lt;/span&gt;. 

Object Inspection                  Examining code and stacks
-----------------------------      -----------------------------
DumpObj (do)                       Threads
DumpArray (da)                     CLRStack
DumpStackObjects (dso)             IP2MD
DumpAllExceptions (dae)            BPMD
DumpHeap                           U
DumpVC                             DumpStack
GCRoot                             EEStack
ObjSize                            GCInfo
FinalizeQueue                      EHInfo
PrintException (pe)                COMState
TraverseHeap
DumpField (df)
DumpDynamicAssemblies (dda)
GCRef
DumpColumnNames (dcn)
DumpRequestQueues
DumpUMService

Examining CLR data structures      Diagnostic Utilities
-----------------------------      -----------------------------
DumpDomain                         VerifyHeap
EEHeap                             DumpLog
Name2EE                            FindAppDomain
SyncBlk                            SaveModule
DumpThreadConfig (dtc)             SaveAllModules (sam)
DumpMT                             GCHandles
DumpClass                          GCHandleLeaks
DumpMD                             VMMap
Token2EE                           VMStat
EEVersion                          ProcInfo 
DumpModule                         StopOnException (soe)
ThreadPool                         MinidumpMode 
DumpHttpRuntime                    FindDebugTrue
DumpIL                             FindDebugModules
PrintDateTime                      Analysis
DumpDataTables                     CLRUsage
DumpAssembly                       CheckCurrentException (cce)
RCWCleanupList                     CurrentExceptionName (cen)
PrintIPAddress                     VerifyObj
DumpHttpContext                    HeapStat
ASPXPages                          GCWhere
DumpASPNETCache (dac)              ListNearObj (lno)
DumpSig
DumpMethodSig                      Other
DumpRuntimeTypes                   -----------------------------
ConvertVTDateToDate (cvtdd)        FAQ
ConvertTicksToDate (ctd)
DumpRequestTable
DumpHistoryTable
DumpBuckets
GetWorkItems
DumpXmlDocument (dxd)
DumpCollection (dc)

Examining the GC history
-----------------------------
HistInit
HistStats
HistRoot
HistObj
HistObjFind
HistClear&lt;/pre&gt;

&lt;h3&gt;mscordacwks.dll&lt;/h3&gt;

&lt;p&gt;I prefer not to try to run windbg on the server with the problem.&amp;#160; Instead, we capture a dump, which creates a snapshot of memory at a moment in time, and download that file to my local Windows 7 machine.&amp;#160; If I am troubleshooting a problem on a Windows Server 2008 R2 machine, I want to capture the dump and download it to my Windows 7 machine.&amp;#160; When I try to inspect it using psscor2, I get the following error:&lt;/p&gt;

&lt;p&gt;&lt;font size="2" face="Courier New"&gt;CLRDLL: CLR DLL load disabled 
    &lt;br /&gt;Failed to load data access DLL, 0x80004005 

    &lt;br /&gt;Verify that 1) you have a recent build of the debugger (6.2.14 or newer) 

    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 2) the file mscordacwks.dll that matches your version of mscorwks.dll is 

    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; in the version directory 

    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 3) or, if you are debugging a dump file, verify that the file 

    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; mscordacwks_&amp;lt;arch&amp;gt;_&amp;lt;arch&amp;gt;_&amp;lt;version&amp;gt;.dll is on your symbol path. 

    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 4) you are debugging on the same architecture as the dump file. 

    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; For example, an IA64 dump file must be debugged on an IA64 

    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; machine.&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="2" face="Courier New"&gt;You can also run the debugger command .cordll to control the debugger's 
    &lt;br /&gt;load of mscordacwks.dll.&amp;#160; .cordll -ve -u -l will do a verbose reload. 

    &lt;br /&gt;If that succeeds, the PSSCOR command should work on retry.&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="2" face="Courier New"&gt;If you are debugging a minidump, you need to make sure that your executable 
    &lt;br /&gt;path is pointing to mscorwks.dll as well.&lt;/font&gt; 

  &lt;br /&gt;&lt;/p&gt;

&lt;p&gt;A quick Bing search yields a blog post that shows &lt;a href="http://blogs.msdn.com/b/dougste/archive/2009/02/18/failed-to-load-data-access-dll-0x80004005-or-what-is-mscordacwks-dll.aspx"&gt;how to work around the mscordacwks issue&lt;/a&gt; by copying the version of mscordacwks from the server running SharePoint and copying to the same directory where windbg is running.&amp;#160; The version on my Windows Server 2008 R2 machine is 4952, so I copy to my d:\debug directory and rename it to “mscordacwks_AMD64_AMD64_2.0.50727.4952.dll”.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/3482.image_5F00_3364A307.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 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-00-25-31-metablogapi/3005.image_5F00_thumb_5F00_523B16E5.png" width="244" height="140" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once it is copied and renamed, run the command from the error output above to do a verbose reload.&lt;/p&gt;

&lt;p&gt;&lt;font face="Courier New"&gt;.cordll -ve -u –l&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;Once you get mscordacwks loaded, everything should work out fine.&amp;#160; You will know you are successful when you see the following line in windbg:&lt;/p&gt;

&lt;p&gt;&lt;font face="Courier New"&gt;CLR DLL status: Loaded DLL mscordacwks_AMD64_AMD64_2.0.50727.4952.dll&lt;/font&gt;&lt;/p&gt;

&lt;h3&gt;Inspect the CLR Stack&lt;/h3&gt;

&lt;p&gt;Let’s look at the managed stack with the following command:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;!clrstack&lt;/pre&gt;

&lt;p&gt;That outputs the following:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;0:000&amp;gt; !clrstack
OS Thread Id: 0xa48 (0)
*** WARNING: Unable to verify checksum &lt;span class="kwrd"&gt;for&lt;/span&gt; mscorlib.ni.dll
Child-SP         RetAddr          Call Site
000000000012e910 000007fef5a910e9 DomainNeutralILStubClass.IL_STUB(Microsoft.Win32.SafeHandles.SafeFileHandle, Byte*, Int32, Int32 ByRef, IntPtr)
000000000012ea30 000007fef5a91202 System.IO.__ConsoleStream.ReadFileNative(Microsoft.Win32.SafeHandles.SafeFileHandle, Byte[], Int32, Int32, Int32, Int32 ByRef)
000000000012ea90 000007fef538065a System.IO.__ConsoleStream.Read(Byte[], Int32, Int32)
000000000012eaf0 000007fef53a28ca System.IO.StreamReader.ReadBuffer()
000000000012eb40 000007fef5a9435f System.IO.StreamReader.ReadLine()
000000000012eb90 000007ff0017015b System.IO.TextReader+SyncTextReader.ReadLine()
000000000012ebf0 000007fef791d502 Program.Main()&lt;/pre&gt;

&lt;p&gt;Very cool!&amp;#160; You now see how to inspect the stack to see what calls were pushed down onto it.&amp;#160; Immediately, we can see that inside our Program.Main function, a Console.ReadLine call was made and we are currently waiting on user input. 
  &lt;br /&gt;&lt;/p&gt;

&lt;h2&gt;Summary&lt;/h2&gt;

&lt;p&gt;This post was to help you get started with windbg.&amp;#160; For a fantastic overview of WinDbg and how to troubleshoot various types of issues, watch the video “&lt;a href="http://oredev.org/prod/oredev/site.nsf/docsbycodename/session?opendocument&amp;amp;sid=12201594012B3B23C125759200289A81&amp;amp;track=5EA1ADD99261C8A5C12575A500494952&amp;amp;day=3"&gt;Debugging .NET Applications with WinDbg&lt;/a&gt;” by Tess Ferrandez.&lt;/p&gt;

&lt;h2&gt;Acknowledgements&lt;/h2&gt;

&lt;p&gt;A huge thanks to fellow PFE Chad Ray.&amp;#160; He has helped me through many issues while I ramp up to learn how to use WinDbg more effectively.&lt;/p&gt;

&lt;h2&gt;For More Information&lt;/h2&gt;

&lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx"&gt;Process Explorer from SysInternals&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=5c068e9f-ebfe-48a5-8b2f-0ad6ab454ad4"&gt;PssCor2 Debugging Extension&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.microsoft.com/whdc/DevTools/Debugging/default.mspx"&gt;Download the Debugging Tools for Windows&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bb190764.aspx"&gt;SOS.dll (SOS Debugging Extension)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a title="http://blogs.msdn.com/b/dougste/archive/2009/02/18/failed-to-load-data-access-dll-0x80004005-or-what-is-mscordacwks-dll.aspx" href="http://blogs.msdn.com/b/dougste/archive/2009/02/18/failed-to-load-data-access-dll-0x80004005-or-what-is-mscordacwks-dll.aspx"&gt;“Failed to load data access DLL, 0x80004005” – OR – What is mscordacwks.dll?&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a title="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=28bd5941-c458-46f1-b24d-f60151d875a3&amp;amp;displaylang=en" href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=28bd5941-c458-46f1-b24d-f60151d875a3&amp;amp;displaylang=en"&gt;DebugDiag&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=10152166" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/-NET+Programming/">.NET Programming</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/SharePoint/">SharePoint</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/ASP-NET/">ASP.NET</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Visual+Studio+2008/">Visual Studio 2008</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/IIS7/">IIS7</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Visual+Studio+2010/">Visual Studio 2010</category></item><item><title>Adding jQuery to Every Page in SharePoint with Delegate Controls</title><link>http://blogs.msdn.com/b/kaevans/archive/2011/04/06/adding-jquery-to-every-page-in-sharepoint-with-delegate-controls.aspx</link><pubDate>Wed, 06 Apr 2011 22:50:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10150703</guid><dc:creator>Kirk Evans[MSFT]</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/kaevans/rsscomments.aspx?WeblogPostID=10150703</wfw:commentRss><comments>http://blogs.msdn.com/b/kaevans/archive/2011/04/06/adding-jquery-to-every-page-in-sharepoint-with-delegate-controls.aspx#comments</comments><description>&lt;p&gt;A customer asked how they could add jQuery to every page in SharePoint.&amp;nbsp; They wanted to modify core.js on the disk, but of course we all know that &lt;a href="http://support.microsoft.com/kb/898631"&gt;Microsoft does not support modifying files that reside in the _layouts folder&lt;/a&gt;.&amp;nbsp; Of course there are supported ways to do this without such hacks.&lt;/p&gt;
&lt;p&gt;All of the out-of-box SharePoint master pages (v4.master, default.master, minimal.master, and nightandday.master) include the following in the HEAD section of the HTML markup:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;SharePoint:DelegateControl&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; 
          &lt;span class="attr"&gt;ControlId&lt;/span&gt;&lt;span class="kwrd"&gt;="AdditionalPageHead"&lt;/span&gt; 
          &lt;span class="attr"&gt;AllowMultipleControls&lt;/span&gt;&lt;span class="kwrd"&gt;="true"&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;Chris O&amp;rsquo;Brien has a great write-up of &lt;a href="http://www.sharepointnutsandbolts.com/2007/06/using-delegate-control.html"&gt;Using the Delegate Control&lt;/a&gt;.&amp;nbsp; The DelegateControl provides a plugin framework for SharePoint, telling ASP.NET to find any registered delegate controls, and for each call the LoadControl method to load your control.&amp;nbsp; It&amp;rsquo;s a very slick way to add controls to pages without modifying the master page.&lt;/p&gt;
&lt;p&gt;The solution for us is to deploy the jQuery script to SharePoint, and then deploy a delegate control that references that script location.&lt;/p&gt;
&lt;h2&gt;Create the Control&lt;/h2&gt;
&lt;p&gt;This is one of those things that I think every SharePoint developer should become instantly familiar with.&amp;nbsp; You can add your own user controls to SharePoint and reference them from your pages just like you can with ASP.NET.&amp;nbsp; In Visual Studio 2010, create a new empty SharePoint project called &amp;ldquo;Microsoft.PFE.DSE.Samples&amp;rdquo; and make it a farm solution.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt; We could deploy a delegate control using the sandbox as well.&amp;nbsp; I chose to use a farm solution because I am deploying the jQuery library to the SharePoint root (aka 14 hive), which you cannot do with sandboxed solutions.&lt;/em&gt;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;In Visual Studio, click &amp;ldquo;Add New Item&amp;rdquo; and add a new User Control called jQueryControl.ascx.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/6813.image_5F00_50363632.png"&gt;&lt;img height="139" width="244" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/4341.image_5F00_thumb_5F00_4253CA6A.png" alt="image" border="0" title="image" 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" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In the source view for the control, add the following line of code:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;="text/javascript"&lt;/span&gt; 
    &lt;span class="attr"&gt;src&lt;/span&gt;&lt;span class="kwrd"&gt;="/_layouts/Microsoft.PFE.DSE.Samples/jquery-1.5.2.min.js"&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;The result looks like this:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/8551.image_5F00_489AA0F8.png"&gt;&lt;img height="88" width="244" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/6087.image_5F00_thumb_5F00_6BE7959D.png" alt="image" border="0" title="image" 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" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;That&amp;rsquo;s how easy it is to create a control and deploy it to SharePoint.&amp;nbsp; You can now use your control in your pages in SharePoint.&amp;nbsp; Now, let&amp;rsquo;s see how to register it as a delegate control.&lt;/p&gt;
&lt;h2&gt;Adding the Feature&lt;/h2&gt;
&lt;p&gt;The next step is to add a feature to the project that tells SharePoint about our control.&amp;nbsp; In Visual Studio, add a new &amp;ldquo;Empty Element&amp;rdquo; to your project named &amp;ldquo;elements&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/7077.image_5F00_0B2A3C71.png"&gt;&lt;img height="137" width="244" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/0624.image_5F00_thumb_5F00_0A51D687.png" alt="image" border="0" title="image" 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" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Change the resulting Elements.xml to the following:&lt;/p&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;="1.0"&lt;/span&gt; &lt;span class="attr"&gt;encoding&lt;/span&gt;&lt;span class="kwrd"&gt;="utf-8"&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;="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;Control&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="AdditionalPageHead"&lt;/span&gt; 
           &lt;span class="attr"&gt;Sequence&lt;/span&gt;&lt;span class="kwrd"&gt;="90"&lt;/span&gt;             
           &lt;span class="attr"&gt;ControlSrc&lt;/span&gt;&lt;span class="kwrd"&gt;="~/_CONTROLTEMPLATES/Microsoft.PFE.DSE.Samples/jQueryControl.ascx"&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;p&gt;Now that the feature element is created, we need to edit the feature that deploys it.&amp;nbsp; Open the feature in the SharePoint project and change the scope to &amp;ldquo;Web&amp;rdquo;.&amp;nbsp; Give it a title and description as well.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/3757.image_5F00_3E85FFCD.png"&gt;&lt;img height="241" width="244" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/3362.image_5F00_thumb_5F00_2FDB53E8.png" alt="image" border="0" title="image" 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" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;By deploying your feature with web scope, every page in the web where the feature is activated will include the jQuery script, including pages in the layouts directory (remember that they use master pages with AdditionalPageHead, too).&amp;nbsp; If you change the scope to &amp;ldquo;Site&amp;rdquo;, every page in your site collection will include the script, changing to WebApplication means every page in your application gets it, and Farm means every single page in the farm gets it.&amp;nbsp; &lt;/p&gt;
&lt;h2&gt;Deploying the jQuery Script File to Layouts&lt;/h2&gt;
&lt;p&gt;The last part of the puzzle is to deploy the jQuery script file to the layouts directory.&amp;nbsp; Right-click your project and add a SharePoint &amp;ldquo;Layouts&amp;rdquo; Mapped Folder.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/4353.image_5F00_7D0B4D73.png"&gt;&lt;img height="126" width="244" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/5415.image_5F00_thumb_5F00_2E96BB09.png" alt="image" border="0" title="image" 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" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In the resulting folder, add the jQuery javascript file.&amp;nbsp; The results look like this:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/1682.image_5F00_4DD961DC.png"&gt;&lt;img height="244" width="158" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/7462.image_5F00_thumb_5F00_3B246825.png" alt="image" border="0" title="image" 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" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;The Results&lt;/h2&gt;
&lt;p&gt;Hit F5 in Visual Studio 2010 to deploy the solution and start debugging.&amp;nbsp; The debugger will automatically attach to the page, and you will see the script loaded in the debugger, without having to modify the master page, the page you are viewing, and certainly you won&amp;rsquo;t be modifying core.js to make it happen!&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/8561.image_5F00_01352539.png"&gt;&lt;img height="173" width="244" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-25-31-metablogapi/3755.image_5F00_thumb_5F00_449D269B.png" alt="image" border="0" title="image" 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" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The source for the project is attached.&lt;/p&gt;
&lt;h2&gt;For More Information&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://www.sharepointnutsandbolts.com/2007/06/using-delegate-control.html"&gt;Using the Delegate Control&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.delegatecontrol.aspx"&gt;DelegateControl Class&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=10150703" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-15-07-03/jQuerySample.zip" length="144732" type="application/x-zip-compressed" /><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/-NET+Programming/">.NET Programming</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/SharePoint/">SharePoint</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/ASP-NET/">ASP.NET</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Microsoft+Office/">Microsoft Office</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Visual+Studio+2010/">Visual Studio 2010</category></item><item><title>SharePoint Developers–What’s On Your Machine?</title><link>http://blogs.msdn.com/b/kaevans/archive/2011/04/05/sharepoint-developers-what-s-on-your-machine.aspx</link><pubDate>Tue, 05 Apr 2011 19:19:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10150161</guid><dc:creator>Kirk Evans[MSFT]</dc:creator><slash:comments>6</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/kaevans/rsscomments.aspx?WeblogPostID=10150161</wfw:commentRss><comments>http://blogs.msdn.com/b/kaevans/archive/2011/04/05/sharepoint-developers-what-s-on-your-machine.aspx#comments</comments><description>&lt;p&gt;I recently got a question from a customer about utilities to include on their development machines.&amp;#160; My view is that you should trust your developers and let them install the tools they need.&amp;#160; However, some devs don’t have managers who trust their developers to do the right thing and they need to request tools in advance.&amp;#160; Which got me thinking… what’s on your machine?&amp;#160; What do you consider essential for developing software?&amp;#160; I challenged myself to go through my machine and recall all of the various utilities, add-ons, programs, scripts, etc that I use regularly and listed them below.&amp;#160; There are a lot, and I am sure I am missing a few!&amp;#160; I am always on the lookout for new tools and utilities that will make development easier, so… what’s on your machine?&lt;/p&gt;  &lt;p&gt;SharePoint Server 2010 + pre-requisites (Standalone)&lt;/p&gt;  &lt;p&gt;ADO.NET Data Services Update for .NET Framework 3.5 SP1 for Windows 7 and Windows Server 2008 R2 (enables WCF Data Services for SharePoint) - &lt;a href="http://www.microsoft.com/downloads/en/details.aspx?familyid=79d7f6f8-d6e9-4b8c-8640-17f89452148e&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/en/details.aspx?familyid=79d7f6f8-d6e9-4b8c-8640-17f89452148e&amp;amp;displaylang=en&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Office 2010 Professional Plus (32-bit)&lt;/p&gt;  &lt;p&gt;Microsoft SQL Server 2008 Management Studio Express (or I sometimes have full-blown SQL Server 2008 and tools on the same box) - &lt;a title="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=08e52ac2-1d62-45f6-9a4a-4b76a8564a2b&amp;amp;displaylang=en" href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=08e52ac2-1d62-45f6-9a4a-4b76a8564a2b&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/en/details.aspx?FamilyID=08e52ac2-1d62-45f6-9a4a-4b76a8564a2b&amp;amp;displaylang=en&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Microsoft SQL Server Community Projects &amp;amp; Samples - &lt;a title="http://sqlserversamples.codeplex.com/" href="http://sqlserversamples.codeplex.com/"&gt;http://sqlserversamples.codeplex.com/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;SharePoint Designer 2010 (32-bit) - &lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=d88a1505-849b-4587-b854-a7054ee28d66&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/en/details.aspx?FamilyID=d88a1505-849b-4587-b854-a7054ee28d66&amp;amp;displaylang=en&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Visual Studio 2010 Ultimate Edition - &lt;a href="http://www.microsoft.com/visualstudio/en-us/"&gt;http://www.microsoft.com/visualstudio/en-us/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Silverlight 4 Tools for Visual Studio - &lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=b3deb194-ca86-4fb6-a716-b67c2604a139&amp;amp;displayLang=en"&gt;http://www.microsoft.com/downloads/en/details.aspx?FamilyID=b3deb194-ca86-4fb6-a716-b67c2604a139&amp;amp;displayLang=en&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Expression Studio 4 Ultimate - &lt;a href="http://www.microsoft.com/expression/"&gt;http://www.microsoft.com/expression/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Open XML SDK - &lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=c6e744e5-36e9-45f5-8d8c-331df206e0d0&amp;amp;DisplayLang=en"&gt;http://www.microsoft.com/downloads/en/details.aspx?FamilyID=c6e744e5-36e9-45f5-8d8c-331df206e0d0&amp;amp;DisplayLang=en&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Microsoft Windows SDK for Windows 7 and .NET Framework 4 - &lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=6b6c21d2-2006-4afa-9702-529fa782d63b&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/en/details.aspx?FamilyID=6b6c21d2-2006-4afa-9702-529fa782d63b&amp;amp;displaylang=en&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Psscor2 Managed-Code Debugging Extension for WinDbg - &lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=5c068e9f-ebfe-48a5-8b2f-0ad6ab454ad4&amp;amp;displayLang=en"&gt;http://www.microsoft.com/downloads/en/details.aspx?FamilyID=5c068e9f-ebfe-48a5-8b2f-0ad6ab454ad4&amp;amp;displayLang=en&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Visual Studio 2010 SDK - &lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=47305cf4-2bea-43c0-91cd-1b853602dcc5&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/en/details.aspx?FamilyID=47305cf4-2bea-43c0-91cd-1b853602dcc5&amp;amp;displaylang=en&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Visual Studio 2010 Visualization and Modeling SDK - &lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=0DEF949D-2933-49C3-AC50-E884E0FF08A7"&gt;http://www.microsoft.com/downloads/en/details.aspx?FamilyID=0DEF949D-2933-49C3-AC50-E884E0FF08A7&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;SharePoint 2010 SDK - &lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=f0c9daf3-4c54-45ed-9bde-7b4d83a8f26f&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/en/details.aspx?FamilyID=f0c9daf3-4c54-45ed-9bde-7b4d83a8f26f&amp;amp;displaylang=en&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Visual Studio SharePoint Power Tools - &lt;a href="http://visualstudiogallery.msdn.microsoft.com/8e602a8c-6714-4549-9e95-f3700344b0d9/"&gt;http://visualstudiogallery.msdn.microsoft.com/8e602a8c-6714-4549-9e95-f3700344b0d9/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Visio 2010 Premium - &lt;a href="http://office.microsoft.com/en-us/visio/"&gt;http://office.microsoft.com/en-us/visio/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Visual Studio 2010 Service Pack 1 (enables IntelliTrace and unit testing for SharePoint) - &lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=75568aa6-8107-475d-948a-ef22627e57a5"&gt;http://www.microsoft.com/downloads/en/details.aspx?FamilyID=75568aa6-8107-475d-948a-ef22627e57a5&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Pex and Moles - &lt;a title="http://research.microsoft.com/en-us/projects/pex/" href="http://research.microsoft.com/en-us/projects/pex/"&gt;http://research.microsoft.com/en-us/projects/pex/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;SharePoint Dispose Checker - &lt;a href="http://archive.msdn.microsoft.com/SPDisposeCheck"&gt;http://archive.msdn.microsoft.com/SPDisposeCheck&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Visual Studio 2010 SharePoint Power Tools - &lt;a href="http://visualstudiogallery.msdn.microsoft.com/8e602a8c-6714-4549-9e95-f3700344b0d9/"&gt;http://visualstudiogallery.msdn.microsoft.com/8e602a8c-6714-4549-9e95-f3700344b0d9/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;CKS: Development Tools Edition - &lt;a href="http://cksdev.codeplex.com/"&gt;http://cksdev.codeplex.com/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;SharePoint Manager 2010 (there is also SPM2007) - &lt;a href="http://spm.codeplex.com/"&gt;http://spm.codeplex.com/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Open Data Protocol Visualizer -&lt;a href="http://visualstudiogallery.msdn.microsoft.com/f4ac856a-796e-4d78-9a3d-0120d8137722/"&gt;http://visualstudiogallery.msdn.microsoft.com/f4ac856a-796e-4d78-9a3d-0120d8137722/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;ULSViewer (works with MOSS 2007 and SP2010) - &lt;a href="http://archive.msdn.microsoft.com/ULSViewer"&gt;http://archive.msdn.microsoft.com/ULSViewer&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;SPTraceView (works with MOSS 2007 also) - &lt;a href="http://sptraceview.codeplex.com/"&gt;http://sptraceview.codeplex.com/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;LogParser (great for parsing IIS logs) - &lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/en/details.aspx?FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07&amp;amp;displaylang=en&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Microsoft Expression Studio (a must-have for Silverlight dev as well as web page design) - &lt;a href="http://www.microsoft.com/expression/"&gt;http://www.microsoft.com/expression/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Fiddler - &lt;a href="http://www.fiddler2.com/fiddler2/version.asp"&gt;http://www.fiddler2.com/fiddler2/version.asp&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Reflector - &lt;a href="http://reflector.red-gate.com/download.aspx?TreatAsUpdate=1"&gt;http://reflector.red-gate.com/download.aspx?TreatAsUpdate=1&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;U2U CAML Query Builder - &lt;a href="http://www.u2u.be/res/Tools/CamlQueryBuilder.aspx"&gt;http://www.u2u.be/res/Tools/CamlQueryBuilder.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;AC's WCM Custom Commands for STSADM.exe - &lt;a href="http://www.andrewconnell.com/blog/articles/MossStsadmWcmCommands.aspx"&gt;http://www.andrewconnell.com/blog/articles/MossStsadmWcmCommands.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;SharePoint 2010 PowerShell CmdLets and STSADM Commands - &lt;a href="http://blog.falchionconsulting.com/index.php/category/stsadm-commands/"&gt;http://blog.falchionconsulting.com/index.php/category/stsadm-commands/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;DynaTrace AJAX Edition - &lt;a href="http://ajax.dynatrace.com/ajax/en/"&gt;http://ajax.dynatrace.com/ajax/en/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Microsoft Network Monitor (NetMon) - &lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=983b941d-06cb-4658-b7f6-3088333d062f&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/en/details.aspx?FamilyID=983b941d-06cb-4658-b7f6-3088333d062f&amp;amp;displaylang=en&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Visual Round Trip Analyzer - &lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=119F3477-DCED-41E3-A0E7-D8B5CAE893A3&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/en/details.aspx?FamilyID=119F3477-DCED-41E3-A0E7-D8B5CAE893A3&amp;amp;displaylang=en&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;SysInternals Suite - &lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb842062.aspx"&gt;http://technet.microsoft.com/en-us/sysinternals/bb842062.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Idera PowerShell Plus - &lt;a href="http://www.idera.com/downloads"&gt;www.idera.com/downloads&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Remote Desktop Connection Manager - &lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=4603c621-6de7-4ccb-9f51-d53dc7e48047&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/en/details.aspx?FamilyID=4603c621-6de7-4ccb-9f51-d53dc7e48047&amp;amp;displaylang=en&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=10150161" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/-NET+Programming/">.NET Programming</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/SharePoint/">SharePoint</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Windows+Workflow+Foundation/">Windows Workflow Foundation</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/ASP-NET/">ASP.NET</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/DSL+Tools/">DSL Tools</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Silverlight/">Silverlight</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/WCF/">WCF</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/IIS7/">IIS7</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Windows+Server+2008/">Windows Server 2008</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Internet+Explorer/">Internet Explorer</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/LINQ/">LINQ</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Microsoft+Office/">Microsoft Office</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/SQL+Server+2008/">SQL Server 2008</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/Visual+Studio+2010/">Visual Studio 2010</category><category domain="http://blogs.msdn.com/b/kaevans/archive/tags/REST/">REST</category></item></channel></rss>
