<?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>Real world problems; Real world solutions</title><link>http://blogs.msdn.com/sudeepg/default.aspx</link><description>Forum to share my experiences supporting IIS, ASP.NET &amp; SharePoint technologies and an attempt to explain how these technologies work below the surface. I discuss some of the issues that we resolved in our support cases.</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>CONTENT DEPLOYMENT – the remote server returned an error: (404) Not Found</title><link>http://blogs.msdn.com/sudeepg/archive/2009/11/10/content-deployment-the-remote-server-returned-an-error-404-not-found.aspx</link><pubDate>Wed, 11 Nov 2009 04:51:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9920612</guid><dc:creator>Sudeep Gopalakrishnan</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/sudeepg/comments/9920612.aspx</comments><wfw:commentRss>http://blogs.msdn.com/sudeepg/commentrss.aspx?PostID=9920612</wfw:commentRss><description>&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;This is one of a series of blogs that I plan to write on troubleshooting content deployment issues. Here’s a scenario&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;The destination farm is running on a Windows Server 2008 computer. When deploying to the destination, the content deployment fails with the following error:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;The remote server returned an error: (404)&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;The first thing to remember is that any errors related to content deployment will be reported to the application event log. This is the default diagnostic logging setting for Content Deployment category. Any medium events will also be reported to the ULS logs. Therefore the first place to find out why the deployment is failing is to look at the Application event log of the export server.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;In my case, here’s what I found from application event logs:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff8000" size="2" face="Segoe UI"&gt;Failed to transfer files to destination server for Content Deployment job '80 - 500 Full Deployment'. Exception was: 'System.Net.WebException: The remote server returned an error: (404) Not Found. at System.Net.HttpWebRequest.GetResponse()      &lt;br /&gt;at Microsoft.SharePoint.Publishing.Internal.Administration.HttpDataTransfer.UploadFile(String sourceFilePath, String postToUrl, String&amp;amp; responseXml)       &lt;br /&gt;at Microsoft.SharePoint.Publishing.Administration.ContentDeploymentJob.UploadFilesToRemoteServer(Guid remoteJobId, String adminPortUrl, ArrayList dataFiles)&lt;/font&gt;&lt;font color="#ff8000" size="2" face="Segoe UI"&gt;      &lt;br /&gt;at Microsoft.SharePoint.Publishing.Administration.ContentDeploymentJob.DoServerToServer()'&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;&lt;font color="#ff8000" size="2" face="Segoe UI"&gt;Publishing: Content deployment job failed. Error: 'System.Net.WebException: The remote server returned an error: (404) Not Found.      &lt;br /&gt;at System.Net.HttpWebRequest.GetResponse()       &lt;br /&gt;at Microsoft.SharePoint.Publishing.Internal.Administration.HttpDataTransfer.UploadFile(String sourceFilePath, String postToUrl, String&amp;amp; responseXml)       &lt;br /&gt;at Microsoft.SharePoint.Publishing.Administration.ContentDeploymentJob.UploadFilesToRemoteServer(Guid remoteJobId, String adminPortUrl, ArrayList dataFiles)       &lt;br /&gt;at Microsoft.SharePoint.Publishing.Administration.ContentDeploymentJob.DoServerToServer()       &lt;br /&gt;at Microsoft.SharePoint.Publishing.Administration.ContentDeploymentJob.ExecuteJob()       &lt;br /&gt;at Microsoft.SharePoint.Publishing.Administration.ContentDeploymentJob.Run(Boolean runAsynchronously)'       &lt;br /&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff8000" size="2" face="Segoe UI"&gt;Publishing: Content deployment job failed. Error: 'System.Net.WebException: The remote server returned an error: (404) Not Found.      &lt;br /&gt;at System.Net.HttpWebRequest.GetResponse()       &lt;br /&gt;at Microsoft.SharePoint.Publishing.Internal.Administration.HttpDataTransfer.UploadFile(String sourceFilePath, String postToUrl, String&amp;amp; responseXml)       &lt;br /&gt;at Microsoft.SharePoint.Publishing.Administration.ContentDeploymentJob.UploadFilesToRemoteServer(Guid remoteJobId, String adminPortUrl, ArrayList dataFiles)       &lt;br /&gt;at Microsoft.SharePoint.Publishing.Administration.ContentDeploymentJob.DoServerToServer()       &lt;br /&gt;at Microsoft.SharePoint.Publishing.Administration.ContentDeploymentJob.ExecuteJob()       &lt;br /&gt;at Microsoft.SharePoint.Publishing.Administration.ContentDeploymentJob.Run(Boolean runAsynchronously)       &lt;br /&gt;at Microsoft.SharePoint.Publishing.Administration.ContentDeploymentJobDefinition.Execute(Guid targetInstanceId)'       &lt;br /&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff8000" size="2" face="Segoe UI"&gt;The Execute method of job definition Microsoft.SharePoint.Publishing.Administration.ContentDeploymentJobDefinition (ID 70d6c4ef-bda5-4b5e-84a0-8c07e4ec3e42) threw an exception. More information is included below.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;So as we can see, the Exception was - The remote server returned an error: (404) Not Found. Where do we start troubleshooting? We should start by understanding what status code 404 means and what type of operation we were in when this failure occurred. The second part of the question can be easily answered by looking at the above callstack. At the top of the callstack is &lt;font color="#ff8000"&gt;HttpDataTransfer.UploadFile()&lt;/font&gt; method. This means were were uploading a file to the target farm when the error occurred.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Info: Content deployment transfers contents to the destination by splitting them into multiple cab files and then uploading those files to a page in the target central administration site. Thus if we open the IIS log for the target central administration website, we should see the failure and more specific information about HTTP 404 response. Here’s what I found&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#ffff00" size="2" face="Segoe UI"&gt;POST /_admin/Content+Deployment/DeploymentUpload.aspx filename=%22ExportedFiles1.cab%22&amp;amp;remoteJobId=%223c392e22-67d9-46cb-b6c3-225cade93479%22&lt;font color="#ffffff"&gt; 81 -&lt;/font&gt; 404 13&lt;font color="#ffffff"&gt; 0 20&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;The salient parts in this IIS log entry are highlighted in yellow colour. The value 13 right after 404 is a sub-status code that gives more information about the type of failure. The IIS status codes and their meanings can be found &lt;/font&gt;&lt;a title="IIS Status codes on Microsoft KB" href="http://support.microsoft.com/kb/943891" target="_blank"&gt;&lt;font color="#ff8000" size="2" face="Segoe UI"&gt;here&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;So from this article, we end up with: 404.13 - Content length too large&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;So what is the size of the file ExportedFiles1.cab that we are trying to upload to the destination? We can find this out easily by opening the path to the temporary files on the source (Export Server) as configured in the content deployment settings within Central Administration. By default, this path is &lt;font color="#ffff00"&gt;%windir%\TEMP\ContentDeployment.&lt;/font&gt; Now there is a catch here. By default, content deployment removes the temporary files. You must first configure content deployment to keep the temporary files in the event of a failure. This setting cannot be changed from the User Interface. The correct procedure to change the setting is to use STSADM command line&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff8000" size="2" face="Segoe UI"&gt;STSADM.EXE -o editcontentdeploymentpath -pathname &amp;quot;MyPath&amp;quot; -keeptemporaryfiles Failure&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;After making this change in setting, on the next run, the temporary files will not be removed and you can easily find out the size of the file it was trying to upload by opening this folder. In my case, it turned out to be 61 MB. So why can’t I upload a file of this size? It was possible to do this in Windows Server 2003! Also, who is throwing this error? These are the next set of questions we need to find answers to.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;As I just mentioned, it is very important to figure out who is throwing this error – Is it IIS or Is it SharePoint? We know this behaviour was not present in Windows 2003 and therefore a likely chance that IIS 7, that ships with Windows 2008 is a cause here. Also, a little bit of IIS domain knowledge will help you very easily conclude where the problem is. If you do not have the domain knowledge, you can still troubleshoot using the Failed Request Tracing feature of IIS to pin point where exactly the failure occurred. Failed request tracing is a different subject altogether and if you are interested to know how to use this feature, here’s the &lt;a title="Failed Request tracing in IIS 7" href="http://learn.iis.net/page.aspx/266/troubleshooting-failed-requests-using-tracing-in-iis-70/" target="_blank"&gt;official documentation&lt;/a&gt;. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;I know from experience that IIS 7 has a change where by we limit the max size of a request. The feature implements something like what URLScan did for us in the previous versions. Here is the documentation on &lt;a title="requestLimit on IIS 7 @ www.iis.net" href="http://www.iis.net/ConfigReference/system.webServer/security/requestFiltering/requestLimits" target="_blank"&gt;requestLimits&lt;/a&gt; on IIS 7. So reading through, I can see that this module in IIS 7 can return 404.13 status and the size of request allowed is specified by maxAllowedContentLength attribute with a default value of 30000000 bytes, which is approximately 28.6MB. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;So now we have identified why the server returned this status code and the solution is to simply increase this limit. Here’s how to do that using the new command line feature of IIS 7&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff8000" size="2" face="Segoe UI"&gt;&lt;font color="#ffffff"&gt;On the destination farm, Open a command prompt and switch to C:\Windows\System32\inetsrv folder       &lt;br /&gt;Execute: &lt;/font&gt;appcmd set config &amp;quot;SharePoint Central Administration v3&amp;quot; -section:system.webserver/security/requestFiltering -requestLimits.MaxAllowedContentLength:524288000&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;&amp;#160;&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9920612" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/sudeepg/archive/tags/MOSS/default.aspx">MOSS</category></item><item><title>Provisioning shared services fails with user cannot be found error</title><link>http://blogs.msdn.com/sudeepg/archive/2009/11/10/provisioning-shared-services-fails-with-user-cannot-be-found-error.aspx</link><pubDate>Tue, 10 Nov 2009 13:58:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9920146</guid><dc:creator>Sudeep Gopalakrishnan</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/sudeepg/comments/9920146.aspx</comments><wfw:commentRss>http://blogs.msdn.com/sudeepg/commentrss.aspx?PostID=9920146</wfw:commentRss><description>&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;I was recently rebuilding one of my farms when I ran into the problem I describe below. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;I logged onto the machine using my domain account. Then created local user accounts for use with my standalone farm on this machine and then ran SharePoint Post Installation Configuration Wizard. After creating a new farm with a new configuration database, it also created the SharePoint Central Administration site for me automatically. I then attempted to provision my Shared Services Provider and guess what I run into? After several minutes, I get a page with the following error:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Provisioning for Shared Services Provider 'My SSP' has failed and will be retried.&amp;#160; Reason: User cannot be found.&amp;#160; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;The error message is very odd! It doesn’t tell us which user it cannot find and what it wants to do. So I turn on our friendly diagnostic logging from the Operations tab in SharePoint Central Administration to get a verbose output of the actions. What I ended up finding was amusing. Although I didn’t completely understand why it works this way, here’s what I found in the ULS logs. I am including only the data in the message column for brevity:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Retrieved central administration site '&lt;/font&gt;&lt;a href="http://CASite:81'"&gt;&lt;font color="#ffffff" size="2" face="Segoe UI"&gt;http://CASite:81'&lt;/font&gt;&lt;/a&gt;&lt;font size="2" face="Segoe UI"&gt;.&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;Central administration site owner is 'Domain\UserName'.&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;Creating shared services administration site 'My SSP'.&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;Creating site ssp/admin in content database MySite_Content_82&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;Error in resolving user 'Domain\UserName' : &lt;/font&gt;&lt;/p&gt;  &lt;h1&gt;&lt;font color="#ffff00" size="2" face="Segoe UI"&gt;&lt;/font&gt;&lt;/h1&gt;  &lt;h1&gt;&lt;font color="#ffff00" size="2" face="Segoe UI"&gt;System.ComponentModel.Win32Exception: Unable to contact the global catalog server&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/h1&gt;  &lt;h1&gt;&lt;font color="#ffff00" size="2" face="Segoe UI"&gt;at Microsoft.SharePoint.Utilities.SPActiveDirectoryDomain.GetDirectorySearcher()&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/h1&gt;  &lt;h1&gt;&lt;font color="#ffff00" size="2" face="Segoe UI"&gt;at Microsoft.SharePoint.WebControls.PeopleEditor.SearchFromGC(SPActiveDirectoryDomain domain, String strFilter, String[] rgstrProp, Int32 nTimeout, Int32 nSizeLimit, SPUserCollection spUsers, ArrayList&amp;amp; rgResults)&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/h1&gt;  &lt;h1&gt;&lt;font color="#ffff00" size="2" face="Segoe UI"&gt;at Microsoft.SharePoint.Utilities.SPUserUtility.ResolveAgainstAD(String input, Boolean inputIsEmailOnly, SPActiveDirectoryDomain globalCatalog, SPPrincipalType scopes, SPUserCollection usersContainer, TimeSpan searchTimeout, String customFilter)&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/h1&gt;  &lt;h1&gt;&lt;font size="2"&gt;&lt;font face="Segoe UI"&gt;&lt;font color="#ffff00"&gt;at Microsoft.SharePoint.Utilities.SPActiveDirectoryPrincipalResolver.ResolvePrincipal(String input, Boolean inputIsEm...&lt;/font&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/h1&gt;  &lt;h1&gt;&lt;font size="2" face="Segoe UI"&gt;&lt;/font&gt;&lt;/h1&gt;  &lt;h1&gt;&lt;font color="#ffff00" size="2" face="Segoe UI"&gt;Microsoft.SharePoint.SPException: User cannot be found.&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/h1&gt;  &lt;h1&gt;&lt;font color="#ffff00" size="2" face="Segoe UI"&gt;at Microsoft.SharePoint.Administration.SPSiteCollection.Add(SPContentDatabase database, String siteUrl, String title, String description, UInt32 nLCID, String webTemplate, String ownerLogin, String ownerName, String ownerEmail, String secondaryContactLogin, String secondaryContactName, String secondaryContactEmail, String quotaTemplate, String sscRootWebUrl, Boolean useHostHeaderAsSiteName)&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/h1&gt;  &lt;h1&gt;&lt;font color="#ffff00" size="2" face="Segoe UI"&gt;at Microsoft.SharePoint.Administration.SPSiteCollection.Add(String siteUrl, String title, String description, UInt32 nLCID, String webTemplate, String ownerLogin, String ownerName, String ownerEmail, String secondaryContactLogin, String secondaryContactName, String secondaryContactEmail, Boolean useHostHeaderAsSiteName)&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/h1&gt;  &lt;h1&gt;&lt;font size="2" face="Segoe UI"&gt;&lt;font color="#ffff00"&gt;at Microsoft.Sh...&lt;/font&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;So it turns out that while provisioning the Shared Services, there is a lookup on who the Site collection administrator is for the Central Administration Website. This makes sense because it needs to update all these settings for SSP database. While provisioning the Central Administration site, it used my domain account for the site collection administrator. Now, during the provisioning of the Shared Services, it was trying to resolve the account specified in the Central Administration site’s site collection administrators list, but failed to do so as it could not contact the global catalog server, resulting in this behaviour.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Resolution: &lt;/font&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Open Central Administration and then click on Site Actions in top right corner, then site settings.&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Under users and permissions column, click on Site Collection Administrators.&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Removed my domain account from here and added the local Administrator account which I wanted to use for administering the local farm.&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Click OK and wait for the Shared Services to be provisioned automatically (SharePoint will periodically re-attempt a failed provisioning of SSP)&lt;/font&gt;&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;&amp;#160;&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9920146" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/sudeepg/archive/tags/MOSS/default.aspx">MOSS</category></item><item><title>access denied while trying to save to favorites</title><link>http://blogs.msdn.com/sudeepg/archive/2009/10/29/access-denied-while-trying-to-save-to-favorites.aspx</link><pubDate>Fri, 30 Oct 2009 05:15:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9915110</guid><dc:creator>Sudeep Gopalakrishnan</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/sudeepg/comments/9915110.aspx</comments><wfw:commentRss>http://blogs.msdn.com/sudeepg/commentrss.aspx?PostID=9915110</wfw:commentRss><description>&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;I use the “Add to Favorites” feature in Internet Explorer a lot. After moving to Windows Vista, I ran into a problem where I’d get an Access Denied error, anytime I attempted to create a folder within the Favourites. I was curious to find out why I can no longer create folders in my favourites. So I decided to begin with basics. I checked the permissions in my User Profile\Favourites folder and found I had Full Control. I also attempted to create a folder using the file system which was successful. Now comes our tools to figure out why Iexplore process cannot create the folder on my behalf. To figure this out, I used &lt;/font&gt;&lt;font size="2" face="Segoe UI"&gt;Process Monitor. I captured a process monitor output by filtering on iexplore.exe process and here’s what I found:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/sudeepg/WindowsLiveWriter/accessdeniedwhiletryingtosavetofavorites_971C/Fav_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Fav" border="0" alt="Fav" src="http://blogs.msdn.com/blogfiles/sudeepg/WindowsLiveWriter/accessdeniedwhiletryingtosavetofavorites_971C/Fav_thumb_1.png" width="509" height="583" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;As you can see from the event captured, the iexplore.exe process is running with Low Integrity level. Integrity levels are a new feature within Windows Vista and upwards. So if a process has a low integrity level, irrespective of whether the identity is part of local administrators group, operations like these on file system will still fail. Understandably, this is a security feature that I like and dislike at the same time. I like it because it prevents any website that I browse to from running code on my system that may be harmful. On the other hand I cannot save links to my favourites, which is not good either. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Weighing both options, I think I will stick to running iexplore process in low integrity level and save the links manually. The other option is to run iexplore.exe process as Administrator by right clicking on the shortcut and selecting “Run as Administrator”. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#ffff00" size="2" face="Segoe UI"&gt;CAUTION: I do not recommend you do this at all because this runs the browser with elevated privileges and therefore it will be very easy for any malicious code to infect the machine.&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9915110" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/sudeepg/archive/tags/Internet+Explorer/default.aspx">Internet Explorer</category></item><item><title>people picker &amp;amp; user accounts resolution in domainS FROM different forestS</title><link>http://blogs.msdn.com/sudeepg/archive/2009/10/06/people-picker-user-accounts-resolution-in-domains-from-different-forests.aspx</link><pubDate>Tue, 06 Oct 2009 14:58:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9903689</guid><dc:creator>Sudeep Gopalakrishnan</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/sudeepg/comments/9903689.aspx</comments><wfw:commentRss>http://blogs.msdn.com/sudeepg/commentrss.aspx?PostID=9903689</wfw:commentRss><description>&lt;font size="2" face="Segoe UI"&gt;&lt;/font&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Ever run into a situation where the people picker in SharePoint will fail to resolve usernames that are within a domain in a totally different forest? Assuming the trust relationships are setup properly? Well think again. Here is a quick check list:&lt;/font&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Ensure your people picker property is configured correctly in SharePoint. &lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Configure your trust relationships properly. &lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Ensure the ports required for inter server communication is opened. A list can be found &amp;lt;insert hyperlink&amp;gt;&lt;/font&gt; &lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Ensure your DNS configuration is correct. This is specifically important because the web server will need to locate the Global Catalog Servers and the Domain Controllers in the source &amp;amp; target domains. &lt;/font&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Each of the above points is in itself a big task. A failure in any one of these dependent components will cause people picker to fail. To allow SharePoint to query AD of a different domain, you need to configure it to use a specific account from the trusted domain. Here’s how you do that using STSADM command line&lt;/font&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;stsadm –o setapppassword –password ********        &lt;br /&gt;stsadm –o setproperty –pn peoplepicker-searchadforests –pv “domain:&lt;font color="#ffff00"&gt;FQDN of trusted domain&lt;/font&gt;,&lt;font color="#ffff00"&gt;Account in trusted domain&lt;/font&gt;,&lt;font color="#ffff00"&gt;Password”&lt;/font&gt; –url URL of App&lt;/font&gt;       &lt;br /&gt;&lt;font size="2" face="Segoe UI"&gt;Recycle AppPool for changes to take effect (Optional)&lt;/font&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Alright. So now we know the basic check lists, we need to know how this works normally before you can troubleshoot any issues. In other words, unless you know what is normal, you cannot spot the abnormal?&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Here’s a description of how PeoplePicker works in SharePoint. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Web server contacts one of the DCs in its domain and requests a SID lookup using the Windows API &lt;/font&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/cc234492(PROT.10).aspx" target="_blank"&gt;&lt;font size="2" face="Segoe UI"&gt;LsarLookupNames4&lt;/font&gt;&lt;/a&gt;&lt;font size="2" face="Segoe UI"&gt;. The &lt;font color="#ff8000"&gt;LsarLookupNames4&lt;/font&gt; method translates a batch of security principal names to their SID form. This traffic is encrypted and the Web server and domain controller talks via RPC. The RPC end point mapper is a UUID: &lt;font color="#ffff00"&gt;E1AF8308-5D1F-11C9-91A4-08002B14A0FA&lt;/font&gt;. Now because this is initiated from LSASS, the LSARpc identifier is &lt;font color="#ffff00"&gt;12345778-1234-ABCD-EF00-0123456789AB&lt;/font&gt;. You should see both of these in a network trace. A successful request/response indicates that that RPC communication is successful.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;So with &lt;font color="#ff8000"&gt;LsarLookupNames4&lt;/font&gt; API, we should get a SID. The next thing that happens is an LDAP query trying to lookup this SID and see if the name matches with what the user entered. To perform this, you need to have Kerberos traffic flowing properly. If Kerberos is working properly, you should also see that traffic just before the LDAP query with the username that you configured within SharePoint. After Kerberos authentication, SharePoint server then sends &lt;/font&gt;&lt;font size="2" face="Segoe UI"&gt;the LDAP query to one of the DCs in the trusted domains and does a search - something like:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#ffff00" size="2" face="Segoe UI"&gt;LDAP:Search Request, MessageID: 26, BaseObject: DC=SharePoint,DC=com, SearchScope: WholeSubtree, SearchAlias: neverDerefAliases      &lt;br /&gt;LDAP:Search Result Entry, MessageID: 26, Status: Success&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;A filter is also passed based to indicate search based on the SID. Filter: &lt;font color="#ffff00"&gt;(&amp;amp;(objectSID=))&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;The search result contains the properties requested for the user including the user’s SID. If everything matches, then we are done and the user’s full name should be displayed. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;So that’s how it is “expected” to work. But most of the times when a support engineer is looking at the problem, he will not find the above traffic. Instead he is looking at the traffic in the broken scenario and there may be several reasons why the feature is not able to find the user. For eg:&lt;/font&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;What if the trust relationship is not setup properly? Can we verify that using a network trace? Is it possible?&lt;/font&gt; &lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;What if the MSRPC is broken? Can we determine that using a network trace?&lt;/font&gt; &lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;What if the DNS entries are not setup properly? Can you determine that using the network trace?&lt;/font&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;So well, the answer is “depends”. A lot of times you can make a good conclusion depending on what you see in the network trace if you have domain specific knowledge. &lt;/font&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;If you never see the MSRPC bind requests getting a success response, chances are that the trust is not setup properly.&lt;/font&gt; &lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;If you do not see Kerberos traffic or connecting with the username specified in SharePoint, then your SharePoint configuration is probably not correct.&lt;/font&gt; &lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;If you see DNS related errors in the network trace (filter by DNS traffic), then your DNS is probably broken and needs to be fixed. &lt;/font&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Obviously, what needs to be fixed depends on what his broken.&lt;/font&gt; &lt;font size="2" face="Segoe UI"&gt;No matter what works and what does not, at the end of the day, if you performed a Check Name operation within People Picker, we must match the user with a SID. To do that, SharePoint goes to great lengths. SharePoint will attempt a query based on Person or Group and also perform a wild card search. Here’s an example of filters used that you may see in the network trace for LDAP queries:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;First Attempt: &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#ffff00" size="2" face="Segoe UI"&gt;filter: (objectCategory=person)      &lt;br /&gt;filter: (objectClass=user)       &lt;br /&gt;filter: (!(BIT_AND: (userAccountControl)&amp;amp;2))       &lt;br /&gt;filter: (|(name=Sharepoint\Skumar)(displayName=Sharepoint\Skumar)(cn=Sharepoint\Skumar)(mail=Sharepoint\Skumar)(samAccountName=Sharepoint\Skumar)(proxyAddresses=SMTP:Sharepoint\Skumar)(proxyAddresses=sip:Sharepoint\Skumar)) &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;&lt;font color="#ffff00"&gt;filter: (objectCategory=group)        &lt;br /&gt;filter: (BIT_AND: (groupType)&amp;amp;2147483648)         &lt;br /&gt;filter: (|(name=Sharepoint\Skumar)(displayName=Sharepoint\Skumar)(cn=Sharepoint\Skumar)(samAccountName=Sharepoint\Skumar))&lt;/font&gt; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Result: None &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Second Attempt&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#ffff00" size="2" face="Segoe UI"&gt;filter: (objectCategory=person)      &lt;br /&gt;filter: (objectClass=user)       &lt;br /&gt;filter: (!(BIT_AND: (userAccountControl)&amp;amp;2))       &lt;br /&gt;filter: (|(name=Sharepoint\Skumar*)(displayName=Sharepoint\Skumar*)(cn=Sharepoint\Skumar*)(mail=Sharepoint\Skumar*)(sn=Sharepoint\Skumar*)(SamAccountName=Skumar*)(proxyAddresses=SMTP:Sharepoint\Skumar)(proxyAddresses=sip:Sharepoint\Skumar)) &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#ffff00" size="2" face="Segoe UI"&gt;filter: (objectCategory=group)      &lt;br /&gt;filter: (BIT_AND: (groupType)&amp;amp;2147483648)       &lt;br /&gt;filter: (|(name=Sharepoint\Skumar*)(displayname=Sharepoint\Skumar*)(cn=Sharepoint\Skumar*)(SamAccountName=Skumar*))&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Chances are that you may get back a response with a wild card search – as in the second case on my machine, because an OR search on &lt;font color="#ffff00"&gt;SamAccountName=SKumar*&lt;/font&gt; found a record but not with &lt;font color="#ffff00"&gt;SamAccountName=SharePoint\SKumar&lt;/font&gt; as in the first case. However, what happens right after that is, the system will pick the SID from the response (if any) and attempt a match with the SID. If that fails, Check Name operation will throw an error that it could not find the user. So the key to getting that to work is ensure that we can perform a SID lookup successfully. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;So what tools are there to check if we can resolve the SIDs? &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Microsoft Support uses from &lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb897417.aspx" target="_blank"&gt;PSGetSID&lt;/a&gt; from SysInternals. It is one of the tools you can use to verify if the SID lookup is working properly in your environment. &amp;amp; it is really easy to use. From a command line, run: PSGetSid &amp;lt;domain\username&amp;gt;. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;If this tool fails to get the SID, ignore the SharePoint part and focus on fixing your environment first.&amp;#160; &lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9903689" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/sudeepg/archive/tags/MOSS/default.aspx">MOSS</category></item><item><title>Send to… Other Location feature, MOSS &amp;amp; Office clients</title><link>http://blogs.msdn.com/sudeepg/archive/2009/09/29/send-to-other-location-feature-moss-office-clients.aspx</link><pubDate>Tue, 29 Sep 2009 13:09:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9900699</guid><dc:creator>Sudeep Gopalakrishnan</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/sudeepg/comments/9900699.aspx</comments><wfw:commentRss>http://blogs.msdn.com/sudeepg/commentrss.aspx?PostID=9900699</wfw:commentRss><description>&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Have you used this feature before? I see a lot of people on the internet using this feature and there are a couple of scenarios in which this feature won’t work “as expected”. I recently had a chance to spend some time on this and here are my observations after hours of testing.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;If you attempt copying a document from one document library to another and the source and target libraries are in different web applications, then this feature won’t work with Office 2003 clients and MOSS 2007. My guess is that this behaviour occurs because, when Office 2003 was released, it wasn’t built to support features that MOSS 2007 provides. MOSS 2007 was released 4 years later!&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;This feature will work with Office 2007 clients, though. However if you are copying from one library to another which are located in different site collections AND there does not exist a root site collection at the target, then this feature won’t work. If you see these symptoms, creating an empty root site collection should resolve the problem. It appears to me that it may have something to do with not being able to find the path to the child if the root site collection does not exist.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;The way the Send to... Other location works is by using a ActiveX Control (&lt;font color="#ffff00"&gt;Multiple Document Upload Control&lt;/font&gt;) installed with Microsoft Office 2007. After you provide the destination URL (BTW, the destination URL must end with the library name and not the view name such as AllForms.aspx) and click OK, the Jscript on the web page invokes this control with a call to new ActiveXObject(&amp;quot;STSUpld.CopyCtl&amp;quot;);. To successfully instantiate the control, the following registry keys must be present.&lt;/font&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;HKCR\STSUpld.CopyCtl&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;HKCR\STSUpld.CopyCtl.CLSID\(Default)&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;HKCR\STSUpld.CopyCtl.CLSID&lt;/font&gt;&lt;/li&gt; &lt;/ul&gt; &lt;font size="2" face="Segoe UI"&gt;The control itself is located in the DLL present @ C:\Program Files\Microsoft Office\Office12\STSUPLD.DLL&lt;/font&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;When instantiated, this control contacts a web service on the SharePoint server to copy the contents from source to destination. It first makes a request to the source to get the document and its properties and then POSTs the data to the target location. Now, if the Multiple Upload control cannot be loaded for some reason, SharePoint will attempt to perform this operation via server side by sending a POST to CopyResults.aspx. This is what you see in the browser address bar. Now, the CopyResults.aspx page is capable of copying of documents only if the source and destination are in the same web application. The functionality appears to be by design – In other words, the page restricts copying across application boundaries. The API that causes this behaviour is also documented on MSDN.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;&lt;a title="ValidateDomainCompatibility Method" href="http://msdn.microsoft.com/en-us/library/aa979660.aspx" target="_blank"&gt;ValidateDomainCompatibility Method&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Also, the posting and responses from the Program Manager @ the SharePoint Designer Team blog has mentioned that calling Cross applications is not allowed. Here’s the &lt;a title="Sharepoint designer team blog" href="http://blogs.msdn.com/sharepointdesigner/archive/2007/04/24/spdatasource-and-rollups-with-the-data-view.aspx" rel="tag" target="_blank"&gt;link&lt;/a&gt;. FYI, there isn’t a setting to change this behaviour. This is probably something that the development team knows about and may fix in the later versions of MOSS, hopefully.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;When application domain boundaries need to be crossed, only the web service - Copy.asmx works because it completely extracts all the contents (encrypted of course!) and the properties of the document before posting it to the target document library. I am still not sure why this functionality cannot work from server side code though; but that appears to be what is going on.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Coming back to problems instantiating the Multiple Upload control installed with Office 2007 clients, the best way to fix it will be to run a repair installation of Microsoft Office because the DLL in question is not something you can register using regsvr command. Also, when running the Office Setup, ensure Windows SharePoint Services support component is selected.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;I hope the information shared above was helpful to people who have/are running into this behaviour. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;&amp;#160;&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9900699" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/sudeepg/archive/tags/MOSS/default.aspx">MOSS</category></item><item><title>Sharepoint – custom solution deployment failure</title><link>http://blogs.msdn.com/sudeepg/archive/2009/09/15/sharepoint-custom-solution-deployment-failure.aspx</link><pubDate>Tue, 15 Sep 2009 14:04:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9895337</guid><dc:creator>Sudeep Gopalakrishnan</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/sudeepg/comments/9895337.aspx</comments><wfw:commentRss>http://blogs.msdn.com/sudeepg/commentrss.aspx?PostID=9895337</wfw:commentRss><description>&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;I recently ran into a problem where custom SharePoint solutions will randomly fail to deploy on any of the web servers in the farm. The nature of the problem was hard to debug. The failure can occur on any web server and on any resource file being deployed or when the solution is being retracted. The error message would be as follows:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#ffff00" size="2" face="Segoe UI"&gt;&amp;quot;Copying of this file failed. This operation uses the SharePoint Administration service (spadmin), which could not be contacted. If the service is stopped or disabled,&amp;#160; start it and try the operation again.&amp;quot;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;So it turns out that the internal exception that causes this problem is:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#ffff00" size="2" face="Segoe UI"&gt;Failed to connect to an IPC Port: The system cannot find the file specified.&amp;#160; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;There is a new hotfix available for this which updates a .NET Framework DLL, which resolves this issue. The specific KB article that talks about this is&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://support.microsoft.com/kb/971521" target="_blank"&gt;&lt;font size="2" face="Segoe UI"&gt;A System.Runtime.Remoting.RemotingException exception is thrown when you deploy a SharePoint solution on a SharePoint Web server that is running the .NET Framework 2.0 SP2&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;FYI: You need to have .NET Framework 2.0 Service Pack 2 installed before applying this fix.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;If you want to debug this and confirm that the internal exception is actually the one noted above, there are 2 ways to use this.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Easy way: Look at the application event logs to see if this exception is logged.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Hard way: &lt;font color="#ffff00"&gt;!!! Do not try this in Production !!!&lt;/font&gt; Read on…&lt;/font&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Download and install &lt;/font&gt;&lt;a href="http://www.microsoft.com/whdc/devtools/debugging/default.mspx" target="_blank"&gt;&lt;font size="2" face="Segoe UI"&gt;Debugging tools for Windows&lt;/font&gt;&lt;/a&gt;&lt;font size="2" face="Segoe UI"&gt; for the platform on which you are running.&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Using ADPlus, log all first chance .NET CLR exceptions. &lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Note down the IIS worker process (w3wp.exe) PID corresponding to your app using using task manager&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Save the below script to Debugging tools for windows folder as LogExceptions.cfg &lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Execute the command as: CScript adplus.vbs –p &amp;lt;PID&amp;gt; –c LogException.cfg&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Reproduce the problem.&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Inside the debugging tools for Windows folder there is another folder that is created that begins with Crash…The exceptions are logged in a text file that is named as PID-&amp;lt;PID&amp;gt;.exe… &lt;/font&gt;&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Here is the script:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff8000" size="2" face="Consolas"&gt;&amp;lt;ADPlus&amp;gt;     &lt;br /&gt;&amp;lt;Settings&amp;gt;      &lt;br /&gt;&amp;lt;RunMode&amp;gt;Crash&amp;lt;/RunMode&amp;gt;      &lt;br /&gt;&amp;lt;Option&amp;gt;Quiet&amp;lt;/Option&amp;gt;      &lt;br /&gt;&amp;lt;/Settings&amp;gt; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff8000" size="2" face="Consolas"&gt;&amp;lt;PreCommands&amp;gt;     &lt;br /&gt;&amp;lt;Cmd&amp;gt;.loadby sos mscorwks&amp;lt;/Cmd&amp;gt;      &lt;br /&gt;&amp;lt;/PreCommands&amp;gt; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff8000" size="2" face="Consolas"&gt;&amp;lt;Exceptions&amp;gt;     &lt;br /&gt;&amp;lt;Option&amp;gt;NoDumpOnFirstChance&amp;lt;/Option&amp;gt;      &lt;br /&gt;&amp;lt;Option&amp;gt;NoDumpOnSecondChance&amp;lt;/Option&amp;gt;      &lt;br /&gt;&amp;lt;Config&amp;gt;      &lt;br /&gt;&amp;lt;Code&amp;gt;clr&amp;lt;/Code&amp;gt;      &lt;br /&gt;&amp;lt;Actions1&amp;gt;Log;Stack&amp;lt;/Actions1&amp;gt;      &lt;br /&gt;&amp;lt;CustomActions1&amp;gt;.time;!pe-nested;!clrstack;!threads&amp;lt;/CustomActions1&amp;gt;      &lt;br /&gt;&amp;lt;ReturnAction1&amp;gt;gn&amp;lt;/ReturnAction1&amp;gt;      &lt;br /&gt;&amp;lt;/Config&amp;gt;      &lt;br /&gt;&amp;lt;/Exceptions&amp;gt;      &lt;br /&gt;&amp;lt;/ADPlus&amp;gt;&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9895337" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/sudeepg/archive/tags/MOSS/default.aspx">MOSS</category></item><item><title>Published links to office client applications do not show up in file open or save dialogs</title><link>http://blogs.msdn.com/sudeepg/archive/2009/09/03/published-links-to-office-client-applications-do-not-show-up-in-file-open-or-save-dialogs.aspx</link><pubDate>Thu, 03 Sep 2009 13:31:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9890832</guid><dc:creator>Sudeep Gopalakrishnan</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/sudeepg/comments/9890832.aspx</comments><wfw:commentRss>http://blogs.msdn.com/sudeepg/commentrss.aspx?PostID=9890832</wfw:commentRss><description>&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Ever run into a problem where your published links for office client applications do not show up in My SharePoint sites Link in Office applications? If so, read through…&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;First, the basics. Ensure it is configured right. This feature works only with Office 2007 client applications. The published links you create will appear on Office client applications of all users whose personal sites are stored within the same SSP. The mechanism that makes this work is a client side “pull”. The Office client application will request the Published Links when it starts by sending a &lt;font color="#ffff00"&gt;POST&lt;/font&gt; to &lt;font color="#ffff00"&gt;/personal/username_vti_bin/publishedlinksservice.asmx&lt;/font&gt;. You can catch this via Fiddler. The response code must be 200. &lt;/font&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Browse to SharePoint Central Administration site. &lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;In the Quick Launch Window in the left pane, click on your SSP under Shared Services Administration &lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Under User Profiles and My Sites, click on Published Links to Office client applications. &lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Click on New and enter the link, description and select the Type of link. &lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Click OK&lt;/font&gt;&lt;/li&gt; &lt;/ol&gt; &lt;font size="2" face="Segoe UI"&gt;   &lt;p&gt;The next step is to open a browser Window on the client machine and browse to the library or link that you just published. Then click on the MySite Link on the top right corner of the web page. If your MySite has not been created yet, then it will be created for you. Just below Site Actions Link, you will find a link “Set as default My Site”. Click on that link. You should now be prompted with a message: &lt;/p&gt; &lt;/font&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;---------------------------     &lt;br /&gt;Configure My Site for Microsoft Office      &lt;br /&gt;---------------------------      &lt;br /&gt;Microsoft Office can remember your My Site to synchronize documents stored here in Outlook and to show it when opening and saving files.&amp;#160; Do you want Office to remember this site ('&amp;lt;link&amp;gt;')?&amp;#160; Only select 'yes' if you trust this site.      &lt;br /&gt;---------------------------      &lt;br /&gt;Yes&amp;#160;&amp;#160; No&amp;#160;&amp;#160; &lt;br /&gt;--------------------------- &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Click Yes. What this does is update registry key called PersonalSiteURL located at: &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#ffff00" size="2" face="Segoe UI"&gt;HKEY_CURRENT_USER\Software\AppDataLow\Microsoft\Office\12.0\Common\Portal (Vista)      &lt;br /&gt;HKEY_CURRENT_USER\Software\AppDataLow\Microsoft\Office\12.0\Common\Portal (XP)&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;&lt;font size="2" face="Segoe UI"&gt;Next, open an Office application such as Excel and select Save As OR File, Open. At this moment, the Office application will access the String value of property &lt;font color="#ffff00"&gt;Url&lt;/font&gt; under the registry key: &lt;font color="#ffff00"&gt;HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\12.0\Common\Portal\Link Providers\MySiteHost&lt;/font&gt; to determine which is your MySite host. It then makes a POST to the web service, Publishedlinksservice.asmx, hosted on SSP of your SharePoint server is performed. If you used fiddler, check out the user agent that indicates what application is making the request. User-Agent: Microsoft Office/12.0 (Windows NT 6.1; Microsoft Office Word 12.0.6425; Pro) &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;The server then sends a response as XML, which includes various &amp;lt;ServerLink&amp;gt; XML which has the published links. Eg: &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Request:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;HTTP/1.1 200 OK     &lt;br /&gt;Content-Type: text/xml; charset=utf-8      &lt;br /&gt;Set-Cookie: WSS_KeepSessionAuthenticated=100; path=/      &lt;br /&gt;Persistent-Auth: true      &lt;br /&gt;MicrosoftSharePointTeamServices: 12.0.0.6421 &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Response:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&amp;lt;soap:Envelope xmlns:soap=&amp;quot;&lt;/font&gt;&lt;a href="http://schemas.xmlsoap.org/soap/envelope/&amp;quot;"&gt;&lt;font size="2" face="Segoe UI"&gt;http://schemas.xmlsoap.org/soap/envelope/&amp;quot;&lt;/font&gt;&lt;/a&gt;&lt;font size="2" face="Segoe UI"&gt; xmlns:xsi=&amp;quot;&lt;/font&gt;&lt;a href="http://www.w3.org/2001/XMLSchema-instance&amp;quot;"&gt;&lt;font size="2" face="Segoe UI"&gt;http://www.w3.org/2001/XMLSchema-instance&amp;quot;&lt;/font&gt;&lt;/a&gt;&lt;font size="2" face="Segoe UI"&gt; xmlns:xsd=&amp;quot;&lt;/font&gt;&lt;a href="http://www.w3.org/2001/XMLSchema&amp;quot;"&gt;&lt;font size="2" face="Segoe UI"&gt;http://www.w3.org/2001/XMLSchema&amp;quot;&lt;/font&gt;&lt;/a&gt;&lt;font size="2" face="Segoe UI"&gt;&amp;gt;&amp;lt;soap:Body&amp;gt;&amp;lt;GetLinksResponse xmlns=&amp;quot;&lt;/font&gt;&lt;a href="http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService&amp;quot;"&gt;&lt;font size="2" face="Segoe UI"&gt;&lt;a href="http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService&amp;quot;&amp;gt;&amp;lt;GetLinksResult&amp;gt;&amp;lt;ServerLink&amp;gt;&amp;lt;Title&amp;gt;Your"&gt;Your'&amp;gt;http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService&amp;quot;&lt;/a&gt;&lt;/font&gt;&lt;font size="2" face="Segoe UI"&gt;&amp;gt;&amp;lt;GetLinksResult&amp;gt;&amp;lt;ServerLink&amp;gt;&amp;lt;Title&amp;gt;Your&lt;/font&gt; Site Documents&amp;lt;/Title&amp;gt;&amp;lt;Url&amp;gt;&lt;/a&gt;&lt;a href="http://yoursite:80/sites/site1/shared%20documents"&gt;&lt;font size="2" face="Segoe UI"&gt;http://yoursite:80/sites/site1/shared%20documents&lt;/font&gt;&lt;/a&gt;&lt;font size="2" face="Segoe UI"&gt;&amp;lt;/Url&amp;gt;&amp;lt;LinkType&amp;gt;33554432&amp;lt;/LinkType&amp;gt;&amp;lt;IsMember&amp;gt;false&amp;lt;/IsMember&amp;gt;&amp;lt;IsPublished&amp;gt;true&amp;lt;/IsPublished&amp;gt;&amp;lt;/ServerLink&amp;gt;&amp;lt;ServerLink&amp;gt;&amp;lt;Title&amp;gt;My Site&amp;lt;/Title&amp;gt;&amp;lt;Url&amp;gt;&lt;/font&gt;&lt;a href="http://yoursite:100/personal/username/"&gt;&lt;font size="2" face="Segoe UI"&gt;http://yoursite:100/personal/username/&lt;/font&gt;&lt;/a&gt;&lt;font size="2" face="Segoe UI"&gt;&amp;lt;/Url&amp;gt;&amp;lt;LinkType&amp;gt;2&amp;lt;/LinkType&amp;gt;&amp;lt;IsMember&amp;gt;true&amp;lt;/IsMember&amp;gt;&amp;lt;IsPublished&amp;gt;true&amp;lt;/IsPublished&amp;gt;&amp;lt;/ServerLink&amp;gt;&amp;lt;ServerLink&amp;gt;&amp;lt;Title&amp;gt;Profile Site&amp;lt;/Title&amp;gt;&amp;lt;Url&amp;gt;&lt;/font&gt;&lt;a href="http://spscpr:100/Person.aspx?user="&gt;&lt;font size="2" face="Segoe UI"&gt;http://yoursite:100/Person.aspx?user=&lt;/font&gt;&lt;/a&gt;&lt;font size="2" face="Segoe UI"&gt;&amp;lt;/Url&amp;gt;&amp;lt;LinkType&amp;gt;72057594037927936&amp;lt;/LinkType&amp;gt;&amp;lt;IsMember&amp;gt;false&amp;lt;/IsMember&amp;gt;&amp;lt;IsPublished&amp;gt;true&amp;lt;/IsPublished&amp;gt;&amp;lt;/ServerLink&amp;gt;&amp;lt;/GetLinksResult&amp;gt;&amp;lt;/GetLinksResponse&amp;gt;&amp;lt;/soap:Body&amp;gt;&amp;lt;/soap:Envelope&amp;gt; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;After calling the web service, the Office Client application then makes an HTTP request to the personal site link that is specified under the &amp;lt;ServerLink&amp;gt; xml. If you are able to get a successful response (HTTP 200 – Verify using Fiddler or Netmon) for that link, you should see it come up in the Save As dialog box when you select “My SharePoint Sites” link. If you cannot, then you will not see that link because the Office Application will delete that link. The Office application then updates the registry key by creating 2 new keys under: &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;&lt;font color="#ffff00"&gt;HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Common\Server Links\Published&lt;/font&gt; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;BTW, If you are using Windows 2008 or R2 as your client machine, then you need to enable WebDav and Desktop Experience support to make this work. Desktop Experience installs the WebDav redirector which is required for this functionality to work properly&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;[Update]&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Microsoft released a new WebDAV extension module that was completely re-written for IIS 7.0 on Windows Server 2008. I tested a SharePoint site running in Classic mode and the response to the web service requests to SSP sites was a 405. At this time I am not 100% sure if that is expected but a resolution I found to making it work is to remove the WebDAV module for the SSP web application. &lt;/font&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;In IIS manager, select your SSP Web application and then double click the Modules icon. &lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Right click on WebDAVModule and select Remove. &lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Recycle your SSP application pool.&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;On your client machine, open the system registry and locate the registry key: HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Common\Portal&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Remove the entry LinkPublishingTimestamp. &lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Restart your office application and test&lt;/font&gt;&lt;/li&gt; &lt;/ol&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9890832" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/sudeepg/archive/tags/MOSS/default.aspx">MOSS</category></item><item><title>manually Debugging native memory leaks</title><link>http://blogs.msdn.com/sudeepg/archive/2009/05/22/manually-debugging-native-memory-leaks.aspx</link><pubDate>Fri, 22 May 2009 11:01:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9634835</guid><dc:creator>Sudeep Gopalakrishnan</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/sudeepg/comments/9634835.aspx</comments><wfw:commentRss>http://blogs.msdn.com/sudeepg/commentrss.aspx?PostID=9634835</wfw:commentRss><description>&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;So in my previous posts, I explained how you can use DebugDiag tool to capture high memory dumps with leak tracking enabled and also how to use the inbuilt memory analysis scripts to get a report of memory usage. In this post, I discuss how you can do things manually using Debugging tools for Windows or Windbg. Again, I have tried to provide a generic approach, but with an example. It doesn’t apply to each &amp;amp; every situation.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;So I have a memory dump which is about 500 MB in size and was captured when web applications started throwing out of memory errors. The first thing to do find out is where most of the memory is. I discussed this a bit in one of my earlier blog &lt;a title="Debugging memory problems - MSDN Blogs" href="http://blogs.msdn.com/sudeepg/archive/2009/02/22/debugging-memory-problems-a-beginner-s-view.aspx" target="_blank"&gt;posts&lt;/a&gt;.&lt;/font&gt;&lt;/p&gt;  &lt;div style="border-bottom: gray 1px solid; border-left: gray 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; height: 275px; max-height: 275px; font-size: 8pt; overflow: auto; border-top: gray 1px solid; cursor: text; border-right: gray 1px solid; padding-top: 4px"&gt;   &lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;     &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; 0:000&amp;gt; !address -summary&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt; -------------------- Usage SUMMARY --------------------------&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt;     TotSize (      KB)   Pct(Tots) Pct(Busy)   Usage&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt;     1806000 (   24600) : 01.17%    01.19%    : RegionUsageIsVAD&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   6:&lt;/span&gt;     14f3000 (   21452) : 01.02%    00.00%    : RegionUsageFree&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   7:&lt;/span&gt;     23e9000 (   36772) : 01.75%    01.77%    : RegionUsageImage&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   8:&lt;/span&gt;     2200000 (   34816) : 01.66%    01.68%    : RegionUsageStack&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   9:&lt;/span&gt;       88000 (     544) : 00.03%    00.03%    : RegionUsageTeb&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  10:&lt;/span&gt;    78c82000 ( 1978888) : 94.36%    95.34%    : RegionUsageHeap&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  11:&lt;/span&gt;           0 (       0) : 00.00%    00.00%    : RegionUsagePageHeap&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  12:&lt;/span&gt;        1000 (       4) : 00.00%    00.00%    : RegionUsagePeb&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  13:&lt;/span&gt;        1000 (       4) : 00.00%    00.00%    : RegionUsageProcessParametrs&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  14:&lt;/span&gt;        2000 (       8) : 00.00%    00.00%    : RegionUsageEnvironmentBlock&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  15:&lt;/span&gt;        Tot: 7fff0000 (2097088 KB) Busy: 7eafd000 (2075636 KB)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  16:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  17:&lt;/span&gt; Largest free region: Base 57818000 - Size 00068000 (416 KB)&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;font size="2" face="Segoe UI"&gt;&lt;/font&gt;

&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;So from this output we can see that &lt;font color="#ff9900"&gt;94.36%&lt;/font&gt; of the entire virtual address space is in &lt;font color="#ff9900"&gt;RegionUsageHeap&lt;/font&gt;, which means heap memory. We can also see the size – &lt;font color="#ff9900"&gt;1,978,888 KB or 1.88 GB!&lt;/font&gt; Remember I indicated a few moments back that our dump file itself is just 500 MB in size. So what this most likely means is that this value is the reserved memory vs. committed bytes plus other information that the dump file contains. We can also see that the largest contiguous free region is just 416 KB, which explains why this process ran into out of memory errors. There is just no large contiguous free block to satisfy allocation requests.&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;A process will have at least one heap, the default process heap which is created by the operating system for you when the process starts. This heap is used for allocating memory if no other heaps are created and used. Components loaded within the process can create their own heaps. For eg the C Runtime heap. Many of you will remember it as &lt;font color="#ff9900"&gt;MSVCRT.dll&lt;/font&gt; – that’s our C Runtime library.&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;OK, so how many heaps and which heap has the most number of allocations? The trick I usually use is to look at all the heaps and check how many segments each heap has. I think the maximum number of segments a heap can have is 64. Segments are contiguous blocks of memory which hold smaller memory ranges of various sizes. These ranges are of various sizes are handed out to applications when they request memory. Thus, if a segment does not have enough memory to satisfy an allocation request, a new segment is created. The more number of segments, the more the chances are that it is our problem heap. &lt;a title="Heaps - Pleasures &amp;amp; Pains - MSDN article" href="http://msdn.microsoft.com/en-us/library/ms810466.aspx" target="_blank"&gt;Recommended reading&lt;/a&gt;. To view the segments, you can use the inbuilt Windbg extension command &lt;font color="#ff9900"&gt;!heap&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;From this example: &lt;font color="#ff9900"&gt;!heap 0&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;

&lt;div&gt;
  &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;115:   02990000 &amp;lt;------------- Heap Handle
    Segment at 02990000 to 029d0000 (00030000 bytes committed)
    Segment at 0bc10000 to 0bd10000 (00037000 bytes committed)
    Segment at 0e350000 to 0e550000 (00007000 bytes committed)
    Segment at 15fe0000 to 163e0000 (00002000 bytes committed)
    Segment at 59530000 to 59d30000 (00001000 bytes committed)
    .
    .
    .
    Segment at 5e980000 to 5e997000 (00001000 bytes committed)
    Segment at 60040000 to 60057000 (00001000 bytes committed)
    Segment at 611e0000 to 611f7000 (00001000 bytes committed)


117:   02a10000 &amp;lt;------------- Heap Handle
    Segment at 02a10000 to 02a50000 (00040000 bytes committed)
    Segment at 0fc90000 to 0fd90000 (000b7000 bytes committed)
    Segment at 17640000 to 17840000 (0000e000 bytes committed)
    Segment at 21ba0000 to 21fa0000 (00001000 bytes committed)
    Segment at 58530000 to 58d30000 (00001000 bytes committed)
    Segment at 5e9c0000 to 5f9c0000 (00001000 bytes committed)
    .
    .
    .
    Segment at 7fe70000 to 7ff23000 (00001000 bytes committed)
    Segment at 23de0000 to 23e3a000 (00001000 bytes committed)
    Segment at 52770000 to 527ca000 (00001000 bytes committed)
    Segment at 52900000 to 5295b000 (00001000 bytes committed)
    Segment at 584c0000 to 5851b000 (00001000 bytes committed)
    Segment at 5a270000 to 5a2cb000 (00001000 bytes committed)&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;I have truncated the above entry for brevity, but essentially there were many segments. An easier way to see how many segments are there in a heap is to use the &lt;font color="#ff9900"&gt;!heap&lt;/font&gt; command again with the &lt;font color="#ff9900"&gt;–s&lt;/font&gt; switch (for statistics) followed by heap handle. Thus: &lt;font color="#ff9900"&gt;!heap –s 02a10000&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Take a look at lines #12 &amp;amp; # 13 in the following output.&lt;/font&gt;&lt;/p&gt;

&lt;div&gt;
  &lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;
    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; 0:000&amp;gt; !heap -s 02a10000&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt; Walking the heap 02a10000 .......................................................................&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt;  0: Heap 02a10000&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt;    Flags          00001003 - HEAP_NO_SERIALIZE HEAP_GROWABLE &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt;    Reserved memory &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; segments              184708 (k)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   6:&lt;/span&gt;    Commited memory &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; segments              18014398506966656 (k)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   7:&lt;/span&gt;    Virtual bytes (correction &lt;span style="color: #0000ff"&gt;for&lt;/span&gt; large UCR) 1252 (k)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   8:&lt;/span&gt;    Free space                               254 (k) (45 blocks)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   9:&lt;/span&gt;    External fragmentation          0% (45 free blocks)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  10:&lt;/span&gt;    Virtual address fragmentation   201004% (77 uncommited ranges)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  11:&lt;/span&gt;    Virtual blocks  0 - total 0 KBytes&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  12:&lt;/span&gt;    Lock contention 2989&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  13:&lt;/span&gt;    Segments        64&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  14:&lt;/span&gt;    896 hash table &lt;span style="color: #0000ff"&gt;for&lt;/span&gt; the free list&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  15:&lt;/span&gt;        Commits 0&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  16:&lt;/span&gt;        Decommitts 0&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  17:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  18:&lt;/span&gt;                     Default heap   Front heap       Unused bytes&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  19:&lt;/span&gt;    Range (bytes)     Busy  Free    Busy   Free     Total  Average &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  20:&lt;/span&gt; ------------------------------------------------------------------ &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  21:&lt;/span&gt;      0 -   1024       64    142      0      0          0      0&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  22:&lt;/span&gt;   1024 -   2048      279     24      0      0       2280      8&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  23:&lt;/span&gt;   2048 -   3072       21      3      0      0        176      8&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  24:&lt;/span&gt;   3072 -   4096        2      3      0      0         16      8&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  25:&lt;/span&gt;   4096 -   5120       69      6      0      0        560      8&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  26:&lt;/span&gt;   5120 -   6144        6      0      0      0         48      8&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  27:&lt;/span&gt;   6144 -   7168       35      3      0      0        280      8&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  28:&lt;/span&gt;   7168 -   8192        0      2      0      0          0      0&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  29:&lt;/span&gt;   8192 -   9216        0      1      0      0          0      0&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  30:&lt;/span&gt;   9216 -  10240        2      1      0      0         16      8&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  31:&lt;/span&gt;  12288 -  13312        2      0      0      0         16      8&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  32:&lt;/span&gt;  13312 -  14336        0      1      0      0          0      0&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  33:&lt;/span&gt;  19456 -  20480        2      0      0      0         16      8&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  34:&lt;/span&gt;  24576 -  25600        2      0      0      0         16      8&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  35:&lt;/span&gt;  36864 -  37888        0      1      0      0          0      0&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  36:&lt;/span&gt; ------------------------------------------------------------------ &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  37:&lt;/span&gt;   Total              484    187      0      0       3424      7&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;From the above output, you can also see the ranges of memory and their utilization. We can also obtain worst offender byte sizes and worst offender count size by using the –stat parameter of !heap command. Here’s the output.&lt;/font&gt;&lt;/p&gt;

&lt;div&gt;
  &lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;
    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; 0:000&amp;gt; !heap -stat -h 02a10000&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt;  heap @ 02a10000&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt; group-by: TOTSIZE max-display: 20&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt;     size     #blocks     total     ( %) (percent of total busy bytes)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt;     1008 45 - 45228  (26.78) &amp;lt;----------- Worst offender Bytes (WOB)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   6:&lt;/span&gt;     19f8 21 - 358f8  (20.75)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   7:&lt;/span&gt;     418 c6 - 32a90  (19.62)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   8:&lt;/span&gt;     5e8 21 - c2e8  (4.72)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   9:&lt;/span&gt;     6008 2 - c010  (4.65)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  10:&lt;/span&gt;     5a0 21 - b9a0  (4.49)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  11:&lt;/span&gt;     4c08 2 - 9810  (3.68)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  12:&lt;/span&gt;     1440 6 - 7980  (2.94)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  13:&lt;/span&gt;     808 d - 6868  (2.53)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  14:&lt;/span&gt;     3008 2 - 6010  (2.33)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  15:&lt;/span&gt;     2708 2 - 4e10  (1.89)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  16:&lt;/span&gt;     1808 2 - 3010  (1.16)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  17:&lt;/span&gt;     a18 4 - 2860  (0.98)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  18:&lt;/span&gt;     6c0 5 - 21c0  (0.82)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  19:&lt;/span&gt;     408 6 - 1830  (0.59)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  20:&lt;/span&gt;     c08 2 - 1810  (0.58)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  21:&lt;/span&gt;     ac0 2 - 1580  (0.52)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  22:&lt;/span&gt;     a90 2 - 1520  (0.51)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  23:&lt;/span&gt;     778 2 - ef0  (0.36)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  24:&lt;/span&gt;     450 1 - 450  (0.10)&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;All values are in hex in the above output except the percent column. So from the above output (line # 5) we can say that worst offender bytes [WOB - allocation size that is using the most bytes in the heap] is &lt;font color="#ff9900"&gt;0x1008 Bytes [4,104 Bytes or 4K]&lt;/font&gt; and it adds up to a total of &lt;font color="#ff9900"&gt;0x45228 Bytes [283,176 Bytes or 276 KB]&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Similarly, you could group by block size if you want to figure the worst offender count size [WOC - allocation size that has the most duplicates in the heap] and count of worst offender count by using the –grp switch.&lt;/font&gt;&lt;/p&gt;

&lt;div&gt;
  &lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;
    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; 0:000&amp;gt; !heap -stat -h 02a10000 -grp B&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt;  heap @ 02a10000&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt; group-by: BLOCKCOUNT max-display: 20&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt;     size     #blocks    total     ( %) (percent of totalblocks)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt;     418 c6 - 32a90  (47.26)  &amp;lt;----------- Worst offender count (WOC)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   6:&lt;/span&gt;     1008 45 - 45228  (16.47)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   7:&lt;/span&gt;     19f8 21 - 358f8  (7.88)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   8:&lt;/span&gt;     5e8 21 - c2e8  (7.88)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   9:&lt;/span&gt;     5a0 21 - b9a0  (7.88)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  10:&lt;/span&gt;     808 d - 6868  (3.10)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  11:&lt;/span&gt;     1440 6 - 7980  (1.43)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  12:&lt;/span&gt;     408 6 - 1830  (1.43)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  13:&lt;/span&gt;     6c0 5 - 21c0  (1.19)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  14:&lt;/span&gt;     a18 4 - 2860  (0.95)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  15:&lt;/span&gt;     6008 2 - c010  (0.48)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  16:&lt;/span&gt;     4c08 2 - 9810  (0.48)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  17:&lt;/span&gt;     3008 2 - 6010  (0.48)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  18:&lt;/span&gt;     2708 2 - 4e10  (0.48)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  19:&lt;/span&gt;     1808 2 - 3010  (0.48)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  20:&lt;/span&gt;     c08 2 - 1810  (0.48)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  21:&lt;/span&gt;     ac0 2 - 1580  (0.48)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  22:&lt;/span&gt;     a90 2 - 1520  (0.48)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  23:&lt;/span&gt;     778 2 - ef0  (0.48)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  24:&lt;/span&gt;     450 1 - 450  (0.24)&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Thus in this case, the most duplicates are of allocation size &lt;font color="#ff9900"&gt;0x418 bytes [1048 Bytes]&lt;/font&gt; and there are &lt;font color="#ff9900"&gt;0xc6 [196]&lt;/font&gt; of them. You could also dump the allocations in the 1 K – 4 K range and then dump out the contents using the address value in &lt;font color="#ff9900"&gt;UserPtr&lt;/font&gt; column. To do that execute: &lt;font color="#ff9900"&gt;dc &amp;lt;address value in UserPtr column&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Warning: This command can generate a huge output as it dumps allocations in the specified range from all heaps. &lt;/font&gt;&lt;/p&gt;

&lt;div&gt;
  &lt;div&gt;
    &lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;
      &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; !heap -flt r 418 1008&lt;/pre&gt;

      &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt;     _HEAP @ 2a10000&lt;/pre&gt;

      &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt;       HEAP_ENTRY Size Prev Flags    UserPtr UserSize - state&lt;/pre&gt;

      &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt;         02a14a58 0084 00f0  [01]   02a14a60    00418 - (busy)&lt;/pre&gt;

      &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt;         02a15000 0084 0084  [01]   02a15008    00418 - (busy)&lt;/pre&gt;

      &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   6:&lt;/span&gt;         02a20330 0144 0102  [01]   02a20338    00a18 - (busy)&lt;/pre&gt;

      &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   7:&lt;/span&gt;         02a25a40 0102 0144  [01]   02a25a48    00808 - (busy)&lt;/pre&gt;

      &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   8:&lt;/span&gt;         02a265f0 00be 0102  [01]   02a265f8    005e8 - (busy)&lt;/pre&gt;

      &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   9:&lt;/span&gt;         02a2d1b0 00b5 00be  [01]   02a2d1b8    005a0 - (busy)&lt;/pre&gt;

      &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  10:&lt;/span&gt;         5e9c0040 0084 00b6  [00]   5e9c0048    00418 - (free)&lt;/pre&gt;

      &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  11:&lt;/span&gt;         7c1d0040 0084 0084  [00]   7c1d0048    00418 - (free)&lt;/pre&gt;

      &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  12:&lt;/span&gt;     .&lt;/pre&gt;

      &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  13:&lt;/span&gt;     .&lt;/pre&gt;

      &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  14:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

      &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  15:&lt;/span&gt; dc 02a14a60&lt;/pre&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;So our story so far…&lt;/font&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;There are a couple of heaps that have lots of segments.&lt;/font&gt;&lt;/li&gt;

  &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;A lot of memory is reserved – in MBs and there are few committed blocks – in KBs.&lt;/font&gt;&lt;/li&gt;

  &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;The allocations appear to be in the range of 1 KB to 4 KB.&lt;/font&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Next questions: So what are these heaps and who is allocating here?&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;If you want to see the stack back trace for the allocation, you can dump out the page heap information for a given address [&lt;font color="#ff9900"&gt;UserPtr&lt;/font&gt;], but stack back trace is only displayed when available. If I remember correctly, it is available when page heap is enabled for the process.&lt;/font&gt;&lt;/p&gt;

&lt;div&gt;
  &lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;
    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; 0:000&amp;gt; !heap -p -a 7c1d0048&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt;     address 7c1d0048 found &lt;span style="color: #0000ff"&gt;in&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt;     _HEAP @ 2a10000&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt;       HEAP_ENTRY Size Prev Flags    UserPtr UserSize - state&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt;         7c1d0040 0084 0000  [00]   7c1d0048    00418 - (free)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   6:&lt;/span&gt;         Trace: 0025&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   7:&lt;/span&gt;         7c96d6dc ntdll!RtlDebugAllocateHeap+0x000000e1&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   8:&lt;/span&gt;         7c949d18 ntdll!RtlAllocateHeapSlowly+0x00000044&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   9:&lt;/span&gt;         7c91b298 ntdll!RtlAllocateHeap+0x00000e64&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  10:&lt;/span&gt;         102c103e MSVCR90D!_heap_alloc_base+0x0000005e&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  11:&lt;/span&gt;         102cfd76 MSVCR90D!_heap_alloc_dbg_impl+0x000001f6&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  12:&lt;/span&gt;         102cfb2f MSVCR90D!_nh_malloc_dbg_impl+0x0000001f&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  13:&lt;/span&gt;         102cfadc MSVCR90D!_nh_malloc_dbg+0x0000002c&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  14:&lt;/span&gt;         102db25b MSVCR90D!malloc+0x0000001b&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  15:&lt;/span&gt;         102bd691 MSVCR90D!&lt;span style="color: #0000ff"&gt;operator&lt;/span&gt; &lt;span style="color: #0000ff"&gt;new&lt;/span&gt;+0x00000011&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  16:&lt;/span&gt;         102bd71f MSVCR90D!&lt;span style="color: #0000ff"&gt;operator&lt;/span&gt; &lt;span style="color: #0000ff"&gt;new&lt;/span&gt;[]+0x0000000f&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  17:&lt;/span&gt;         4113d8 MyModule1!AllocateMemory+0x00000028&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  18:&lt;/span&gt;         41145c MyModule1!wmain+0x0000002c&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  19:&lt;/span&gt;         411a08 MyModule1!__tmainCRTStartup+0x000001a8&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  20:&lt;/span&gt;         41184f MyModule1!wmainCRTStartup+0x0000000f&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  21:&lt;/span&gt;         7c816fd7 kernel32!BaseProcessStart+0x00000023&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;The above output is just an example but you get the idea of how you can use this technique to help track the source of leaks in your application. &lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;When memory at a given address is de-allocated, the heap manager checks how many contiguous bytes are free around that address. After that check is complete, the heap manager can do one of two things: &lt;/font&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Keep the contiguous memory block committed.&lt;/font&gt;&lt;/li&gt;

  &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;De-commit the contiguous memory block and mark it as reserved only.&lt;/font&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;There is a registry key that controls the de-commit behavior. That key is: &lt;/font&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Path: &lt;font color="#ff9900"&gt;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager &lt;/font&gt;&lt;/font&gt;&lt;/li&gt;

  &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Key: &lt;font color="#ff9900"&gt;HeapDeCommitFreeBlockThreshold&lt;/font&gt;&lt;/font&gt;&lt;/li&gt;

  &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Value Type: &lt;font color="#ff9900"&gt;Reg_DWORD&lt;/font&gt;&lt;/font&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;For sake of completing this blog post, adjusting the value for this registry key was the resolution in my example. It could be something else in your case depending on the circumstances under which this occurs. Once a software developer has enough information about the pattern and source of the memory consumption, he will be able to recommend changes or make a suitable fix to resolve the issue.&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;In this blog post, I made an attempt to show how you can track down native memory leaks manually vs. using DebugDiag scripts as discussed in this &lt;a title="Using debugdiag for memory pressure analysis - MSDN Blogs" href="http://blogs.msdn.com/sudeepg/archive/2009/05/20/using-debugdiag-for-memory-pressure-analysis.aspx" target="_blank"&gt;blog post&lt;/a&gt;. Again, this doesn’t apply to every situation as there are umpteen possibilities to the cause of a leak. Hopefully this blog post is a good starter and a future reference.&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;&amp;#160;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9634835" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/sudeepg/archive/tags/Debugging/default.aspx">Debugging</category></item><item><title>Using debugdiag for memory pressure analysis</title><link>http://blogs.msdn.com/sudeepg/archive/2009/05/20/using-debugdiag-for-memory-pressure-analysis.aspx</link><pubDate>Thu, 21 May 2009 09:00:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9633357</guid><dc:creator>Sudeep Gopalakrishnan</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/sudeepg/comments/9633357.aspx</comments><wfw:commentRss>http://blogs.msdn.com/sudeepg/commentrss.aspx?PostID=9633357</wfw:commentRss><description>&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;In my last &lt;a title="Debugging native memory leaks - MSDN Blogs" href="http://blogs.msdn.com/sudeepg/archive/2009/05/18/debugging-native-memory-leaks.aspx" target="_blank"&gt;post&lt;/a&gt;, I discussed a generic approach to collecting memory dumps using Debug Diagnostics tool. In this post, I discuss how to use DebugDiag’s memory pressure scripts. Please note that the current version of DebugDiag does not have the ability to look up .NET heaps and draw conclusions. For .NET debugging, the best resources are the following blogs:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="Tess Ferrandez Norlander - MSDN Blogs" href="http://blogs.msdn.com/tess" target="_blank"&gt;Tess’s Blog&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="Doug Stewart - MSDN Blogs" href="http://blogs.msdn.com/dougste" target="_blank"&gt;Doug's Blog&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Step 1: Capture a high memory dump as discussed in this &lt;a title="Debugging native memory leaks - MSDN Blogs" href="http://blogs.msdn.com/sudeepg/archive/2009/05/18/debugging-native-memory-leaks.aspx" target="_blank"&gt;post&lt;/a&gt;.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Step 2: Start Debug Diagnostics Tool. If prompted to select a rule, click Cancel.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/sudeepg/WindowsLiveWriter/Usingdebugdiagformemorypressureanalysis_C642/dbgdiag1.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="dbgdiag1" border="0" alt="dbgdiag1" src="http://blogs.msdn.com/blogfiles/sudeepg/WindowsLiveWriter/Usingdebugdiagformemorypressureanalysis_C642/dbgdiag1_thumb.png" width="666" height="368" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Step 3: Select the Analysis Tab and select the memory pressure analysis scripts&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/sudeepg/WindowsLiveWriter/Usingdebugdiagformemorypressureanalysis_C642/dbgdiag2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="dbgdiag2" border="0" alt="dbgdiag2" src="http://blogs.msdn.com/blogfiles/sudeepg/WindowsLiveWriter/Usingdebugdiagformemorypressureanalysis_C642/dbgdiag2_thumb.png" width="714" height="493" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Step 4: Add the dump files for analysis&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/sudeepg/WindowsLiveWriter/Usingdebugdiagformemorypressureanalysis_C642/dbgdiag3.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="dbgdiag3" border="0" alt="dbgdiag3" src="http://blogs.msdn.com/blogfiles/sudeepg/WindowsLiveWriter/Usingdebugdiagformemorypressureanalysis_C642/dbgdiag3_thumb.png" width="712" height="564" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Step 5: Start analysis&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/sudeepg/WindowsLiveWriter/Usingdebugdiagformemorypressureanalysis_C642/dbgdiag4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="dbgdiag4" border="0" alt="dbgdiag4" src="http://blogs.msdn.com/blogfiles/sudeepg/WindowsLiveWriter/Usingdebugdiagformemorypressureanalysis_C642/dbgdiag4_thumb.png" width="715" height="494" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Wait for DebugDiag to finish. DebugDiag will automatically connect to the Microsoft Public symbol server, download and cache symbols on your local drive for analysis. You can also add your custom symbol stores and the location where you want to cache the symbols using the Tools, Options &amp;amp; Settings dialog box.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Have fun!&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9633357" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/sudeepg/archive/tags/Debugging/default.aspx">Debugging</category></item><item><title>debugging native memory leaks</title><link>http://blogs.msdn.com/sudeepg/archive/2009/05/18/debugging-native-memory-leaks.aspx</link><pubDate>Tue, 19 May 2009 00:05:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9626040</guid><dc:creator>Sudeep Gopalakrishnan</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/sudeepg/comments/9626040.aspx</comments><wfw:commentRss>http://blogs.msdn.com/sudeepg/commentrss.aspx?PostID=9626040</wfw:commentRss><description>&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Debugging native memory leaks is one of the most difficult things to do - (at least for me). There are a few Escalation Engineers at Microsoft Product Support Services who are extremely good at debugging all kinds of issues. I learn a lot from these guys whenever I get an opportunity. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;In this blog post, I am not going to talk about a specific issue, but rather a general approach to debugging native memory leaks. I work in the IIS/ASP support group and therefore some things I discuss may be more IIS/ASP specific at times.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;To solve the problems of common debugging issues, Escalation Engineers in the IIS support group created a fantastic tool called &lt;a title="Download page for Debug Diagnostics Tool - Microsoft site" href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=28bd5941-c458-46f1-b24d-f60151d875a3" target="_blank"&gt;Debug Diagnostics Tool&lt;/a&gt;. This link points you to to the 32 bit (x86 version). To obtain the 64 bit (x64) version, you need to call Microsoft Product Support at this time. What this tool allows you to do is inject a module called Leaktrack.dll into the target process so that it starts collecting allocation/de-allocation information. The concept is simple - create a heap where you track allocations from various memory managers. It works by hooking into the known Windows memory managers NTDLL, MSVCRT etc. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff8000" size="2" face="Segoe UI"&gt;How it works&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;When a module makes an allocation request, it increments the count and also gets the size of allocation and also maintains a total size of allocation. When a de-allocation request is made by the same component, it reduces the count and updates the totals. For this to work effectively, you must inject leaktrack soon after you start the process. When the process has consumed memory in the upwards of 700 MB, you can dump out the process and then run Debug Diag’s inbuilt memory pressure analysis scripts against that dump file. Debug Diag is so cool that it will connect to the public Microsoft symbol server, download the symbols, analyze and create a nice report about the memory allocations and components responsible for those allocations. It is very easy to determine issues related to memory leaks &amp;amp; fragmentation with DebugDiag script. DebugDiag is very effective against issues in web applications hosted in IIS worker processes because it uses heuristics and is accurate many times. Below are the screen shots on how to setup a leak rule in Debug Diag.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;NOTE: If you are debugging a web application hosted in IIS that is leaking memory, before you setup a memory leak rule, restart IIS and then send the first request to the application. This is to start tracking from the beginning of the life of the process and also to start the IIS worker process.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Step 1: Open Debug Diagnostics Tool&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/sudeepg/WindowsLiveWriter/debuggingnativememoryleaks_D3BE/DDv1-1-1.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="DDv1-1-1" border="0" alt="DDv1-1-1" src="http://blogs.msdn.com/blogfiles/sudeepg/WindowsLiveWriter/debuggingnativememoryleaks_D3BE/DDv1-1-1_thumb.png" width="527" height="358" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Step 2: If prompted to select a rule, select Memory &amp;amp; Handle Leak OR click Add Rule button to get to this screen&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/sudeepg/WindowsLiveWriter/debuggingnativememoryleaks_D3BE/DDv1-1-2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="DDv1-1-2" border="0" alt="DDv1-1-2" src="http://blogs.msdn.com/blogfiles/sudeepg/WindowsLiveWriter/debuggingnativememoryleaks_D3BE/DDv1-1-2_thumb.png" width="453" height="393" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Step 3: Click Next to get to the Select Target Screen. Then select w3wp.exe if debugging IIS process or the process that you wish to debug. If you see multiple worker processes &amp;amp; is not sure which w3wp.exe instance to select, run the following command from a command prompt running as Administrator&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff8d1c" size="2" face="Segoe UI"&gt;CScript %windir%\system32\iisapp.vbs&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;The above script will output the IIS web application pool name and its corresponding PID value that you can use below.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/sudeepg/WindowsLiveWriter/debuggingnativememoryleaks_D3BE/DDv1-1-3.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="DDv1-1-3" border="0" alt="DDv1-1-3" src="http://blogs.msdn.com/blogfiles/sudeepg/WindowsLiveWriter/debuggingnativememoryleaks_D3BE/DDv1-1-3_thumb.png" width="452" height="395" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Step 4: Click Next, then click On the Configure button&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/sudeepg/WindowsLiveWriter/debuggingnativememoryleaks_D3BE/DDv1-1-4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="DDv1-1-4" border="0" alt="DDv1-1-4" src="http://blogs.msdn.com/blogfiles/sudeepg/WindowsLiveWriter/debuggingnativememoryleaks_D3BE/DDv1-1-4_thumb.png" width="452" height="394" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Step 5: Setup the rules as follows&lt;/font&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Generate a userdump when private bytes reach - (Enter value)&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;And each additional 100 MB thereafter.&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Auto-create a crash rule to get userdump on unexpected process exit&lt;/font&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/sudeepg/WindowsLiveWriter/debuggingnativememoryleaks_D3BE/DDv1-1-5.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="DDv1-1-5" border="0" alt="DDv1-1-5" src="http://blogs.msdn.com/blogfiles/sudeepg/WindowsLiveWriter/debuggingnativememoryleaks_D3BE/DDv1-1-5_thumb.png" width="411" height="289" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Step 6: Click Save &amp;amp; Close and then the Next Button from the previous screen.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/sudeepg/WindowsLiveWriter/debuggingnativememoryleaks_D3BE/DDv1-1-6.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="DDv1-1-6" border="0" alt="DDv1-1-6" src="http://blogs.msdn.com/blogfiles/sudeepg/WindowsLiveWriter/debuggingnativememoryleaks_D3BE/DDv1-1-6_thumb.png" width="452" height="393" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Step 7: Type in any name that you like for the rule and also type in the path where you want the dumps to be generated. This drive must have lots of disk space as each dump file will be equal to the size of the process when the dump is captured. So since we are capturing it at 800 MB upwards here as in this example, this will create 10 dumps (by default) of 800 MB or higher each.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/sudeepg/WindowsLiveWriter/debuggingnativememoryleaks_D3BE/DDv1-1-7.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="DDv1-1-7" border="0" alt="DDv1-1-7" src="http://blogs.msdn.com/blogfiles/sudeepg/WindowsLiveWriter/debuggingnativememoryleaks_D3BE/DDv1-1-7_thumb.png" width="452" height="392" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Step 8: Finish up the rule and activate it. Then make sure you see the information screen like below&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/sudeepg/WindowsLiveWriter/debuggingnativememoryleaks_D3BE/DDv1-1-8.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="DDv1-1-8" border="0" alt="DDv1-1-8" src="http://blogs.msdn.com/blogfiles/sudeepg/WindowsLiveWriter/debuggingnativememoryleaks_D3BE/DDv1-1-8_thumb.png" width="312" height="121" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;You are done! You can see the rules that you just configured in the rules window. When a dump is captured, the userdump count column will have a value of 1 or more.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/sudeepg/WindowsLiveWriter/debuggingnativememoryleaks_D3BE/DDv1-1-9.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="DDv1-1-9" border="0" alt="DDv1-1-9" src="http://blogs.msdn.com/blogfiles/sudeepg/WindowsLiveWriter/debuggingnativememoryleaks_D3BE/DDv1-1-9_thumb.png" width="676" height="340" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Next Post: Using Analysis Scripts.&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9626040" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/sudeepg/archive/tags/Debugging/default.aspx">Debugging</category></item><item><title>How to get the http headers for asp.net requests from a dump file</title><link>http://blogs.msdn.com/sudeepg/archive/2009/03/10/how-to-get-the-http-headers-for-asp-net-requests-from-a-dump-file.aspx</link><pubDate>Tue, 10 Mar 2009 21:06:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9469417</guid><dc:creator>Sudeep Gopalakrishnan</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/sudeepg/comments/9469417.aspx</comments><wfw:commentRss>http://blogs.msdn.com/sudeepg/commentrss.aspx?PostID=9469417</wfw:commentRss><description>&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;So, you have a managed dump and you want to find out the request headers. Here’s one of the methods I use to find this information. I use it especially when I want to view the session ID or cookies. &lt;/font&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Load SOS&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Run&lt;font color="#ff9900"&gt; !aspxpages&lt;/font&gt; and note down the HttpContext address you are interested in. Eg: &lt;/font&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;blockquote&gt;   &lt;p align="left"&gt;&lt;font size="2" face="Segoe UI"&gt;0x120bea74&amp;#160;&amp;#160;&amp;#160; 54000 Sec&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; yes&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;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; XXX&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 200&amp;#160;&amp;#160; GET /default.aspx        &lt;br /&gt;0x14244228&amp;#160;&amp;#160;&amp;#160; 54000 Sec&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; no&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 284 Sec&amp;#160;&amp;#160;&amp;#160;&amp;#160; XXX&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 200&amp;#160;&amp;#160; GET /default.aspx         &lt;br /&gt;0x1426f4c0&amp;#160;&amp;#160;&amp;#160;&amp;#160; 54000 Sec&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; no&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 101 Sec&amp;#160;&amp;#160;&amp;#160;&amp;#160; XXX&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 200&amp;#160;&amp;#160; GET /default.aspx         &lt;br /&gt;0x163a3038&amp;#160;&amp;#160;&amp;#160; 54000 Sec&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; no&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 193 Sec&amp;#160;&amp;#160;&amp;#160;&amp;#160; XXX&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 200&amp;#160;&amp;#160; GET /default.aspx         &lt;br /&gt;0x1e0c360c&amp;#160;&amp;#160;&amp;#160; 54000 Sec&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; no&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 376 Sec&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 39&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 200&amp;#160;&amp;#160; GET /default.aspx &lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;ul&gt;   &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Dump the HttpContext noted in Step 2: &lt;font color="#ff9900"&gt;!do 0x1426f4c0&lt;/font&gt;&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Dump the &lt;font color="#ff9900"&gt;_wr&lt;/font&gt; field which is &lt;font color="#ff9900"&gt;HttpWorkerRequest&lt;/font&gt; object.&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Dump the &lt;font color="#ff9900"&gt;_basicServerVars&lt;/font&gt; field: &lt;font color="#ff9900"&gt;!dumparray &amp;lt;address of _basicServerVars&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Dump the last entry: &lt;font color="#ff9900"&gt;!do &amp;lt;address of last entry in the list&amp;gt; &lt;/font&gt;&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;You should get the output like: &lt;/font&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font color="#ffff80" size="2" face="Segoe UI"&gt;String: Connection: Keep-Alive       &lt;br /&gt;Cookie: ASP.NET_SessionId=5kwvjlzd3ksgii45ephn00aq; HTTP_REFERER::6841=        &lt;br /&gt;Host: Skyraider        &lt;br /&gt;User-Agent: DebugDiag Service HTTP Pinger&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Hopefully this is what you wanted.&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9469417" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/sudeepg/archive/tags/Debugging/default.aspx">Debugging</category></item><item><title>HTTP Compression – reason codes in etw traces</title><link>http://blogs.msdn.com/sudeepg/archive/2009/03/01/http-compression-reason-codes-in-etw-traces.aspx</link><pubDate>Sun, 01 Mar 2009 13:54:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9452394</guid><dc:creator>Sudeep Gopalakrishnan</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/sudeepg/comments/9452394.aspx</comments><wfw:commentRss>http://blogs.msdn.com/sudeepg/commentrss.aspx?PostID=9452394</wfw:commentRss><description>&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;In one of my &lt;a title="Compression Failure blog post" href="http://blogs.msdn.com/sudeepg/archive/2009/02/23/iis-compression-failure-compression-disabled-status.aspx" target="_blank"&gt;earlier posts&lt;/a&gt;, I discussed one of the reasons for compression failure and how we identified it using ETW traces and resolved it. Below are the list of other reason codes for your reference.&lt;/font&gt;&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="1" width="934"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="186"&gt;&lt;font size="2" face="Segoe UI"&gt;NO_ACCEPT_ENCODING&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="752"&gt;&lt;font size="2" face="Segoe UI"&gt;The HTTP request did not contain the &lt;font color="#ff9900"&gt;Accept-Encoding&lt;/font&gt; header&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="186"&gt;&lt;font size="2" face="Segoe UI"&gt;COMPRESSION_DISABLED&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="752"&gt;&lt;font size="2" face="Segoe UI"&gt;No permissions for the IIS_WPG group or application pool identity on &lt;font color="#ff9900"&gt;w3svc/filters/compression&lt;/font&gt; node in the IIS metabase file.&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="186"&gt;&lt;font size="2" face="Segoe UI"&gt;NO_COMPRESSION_10&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="752"&gt;&lt;font size="2" face="Segoe UI"&gt;The request is HTTP 1.0 and the IIS metabase key &lt;font color="#ff9900"&gt;HcNoCompressionForHttp10&lt;/font&gt; value = TRUE&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="186"&gt;&lt;font size="2" face="Segoe UI"&gt;NO_COMPRESSION_PROXY&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="752"&gt;&lt;font size="2" face="Segoe UI"&gt;HTTP request contains a Via header which means the request is relayed via a proxy server AND the IIS metabase setting – &lt;font color="#ff9900"&gt;HcNoCompressionForProxies&lt;/font&gt; has a value of TRUE&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="186"&gt;&lt;font size="2" face="Segoe UI"&gt;NO_MATCHING_SCHEME&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="752"&gt;&lt;font size="2" face="Segoe UI"&gt;IIS could not find a matching configuration entry for the file extension of the requested web page. This typically means the extension was not added to &lt;font color="#ff9900"&gt;HcFileExtensions&lt;/font&gt; or &lt;font color="#ff9900"&gt;HcScriptFileExtensions&lt;/font&gt; list in IIS metabase.&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="186"&gt;&lt;font size="2" face="Segoe UI"&gt;UNKNOWN_ERROR&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="752"&gt;&lt;font size="2" face="Segoe UI"&gt;Unknown reason.&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="186"&gt;&lt;font size="2" face="Segoe UI"&gt;NO_COMPRESSION_RANGE&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="752"&gt;&lt;font size="2" face="Segoe UI"&gt;HTTP request contains a Range header and the IIS metabase setting – &lt;font color="#ff9900"&gt;HcNoCompressionForRange&lt;/font&gt; is set to TRUE.&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="186"&gt;&lt;font size="2" face="Segoe UI"&gt;FILE_TOO_SMALL&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="752"&gt;&lt;font size="2" face="Segoe UI"&gt;The file size is too small to be compressed.&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="186"&gt;&lt;font size="2" face="Segoe UI"&gt;FILE_ENCRYPTED&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="752"&gt;&lt;font size="2" face="Segoe UI"&gt;The requested file is encrypted&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="186"&gt;&lt;font size="2" face="Segoe UI"&gt;COMPRESS_FILE_NOT_FOUND&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="752"&gt;&lt;font size="2" face="Segoe UI"&gt;The compressed file was removed since it was compressed. This may also happen on the first request. &lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="186"&gt;&lt;font size="2" face="Segoe UI"&gt;COMPRESS_FILE_STALE&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="752"&gt;&lt;font size="2" face="Segoe UI"&gt;The compressed file has changed since it was compressed. It may be due to the symptoms described in Microsoft Knowledge Base article: &lt;a title="Microsoft Knowledge Base article" href="http://support.microsoft.com/?id=817442" target="_blank"&gt;817442&lt;/a&gt;&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;For additional information, refer to &lt;a title="Troubleshooting HTTP Compression" href="http://blogs.msdn.com/webtopics/archive/2009/02/24/troubleshooting-http-compression-in-iis-6-0.aspx" target="_blank"&gt;this blog post&lt;/a&gt; from IIS support team.&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9452394" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/sudeepg/archive/tags/IIS/default.aspx">IIS</category></item><item><title>ETW Trace providers – when to use what</title><link>http://blogs.msdn.com/sudeepg/archive/2009/03/01/etw-trace-providers-when-to-use-what.aspx</link><pubDate>Sun, 01 Mar 2009 12:11:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9452289</guid><dc:creator>Sudeep Gopalakrishnan</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/sudeepg/comments/9452289.aspx</comments><wfw:commentRss>http://blogs.msdn.com/sudeepg/commentrss.aspx?PostID=9452289</wfw:commentRss><description>&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;You may perhaps have used Event Tracing Feature of Windows aka ETW for debugging many server side problems related to IIS. When I first learnt about ETW and started using it, I found it to be really cool! Unfortunately there’s not a lot of documentation around using it. For Eg: When to use which provider. it will be helpful to know which providers emit what information so that we can use a specific set of providers rather than a whole bunch of them, which of course will generate a ton of data. Looking through lots of data can sometimes be painful. Take an example where you want to enable ETW tracing but it may take a day or two for the problem to reproduce. Parsing the generated log can be a nightmare! So… I decided to put together this blog that gives information about some of the providers, if not all.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;For a list of providers available on your machine, execute the following from a command prompt:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;&lt;strong&gt;&lt;em&gt;Logman Query Providers&lt;/em&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;The following table lists the details about providers (that I use usually) &amp;amp; their trace areas (where available). Use any combination of these providers depending on what problem you are troubleshooting.&lt;/font&gt;&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="3" width="782"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="203"&gt;&lt;font size="2" face="Segoe UI"&gt;&lt;strong&gt;Provider&lt;/strong&gt;&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="577"&gt;&lt;font size="2" face="Segoe UI"&gt;&lt;strong&gt;Trace Areas&lt;/strong&gt;&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="203"&gt;&lt;font size="2" face="Segoe UI"&gt;IIS: WWW Server&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="577"&gt;&lt;font size="2" face="Segoe UI"&gt;IISAuthentication, IISSecurity, IISFilter, IISStaticFile, IISCGI, IISCompression, IISCache, IISAll&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="203"&gt;&lt;font size="2" face="Segoe UI"&gt;IIS: IISADMIN Global&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="577"&gt;&lt;font size="2" face="Segoe UI"&gt;Startup, Shutdown&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="203"&gt;&lt;font size="2" face="Segoe UI"&gt;IIS: WWW Global&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="577"&gt;&lt;font size="2" face="Segoe UI"&gt;Startup, Shutdown, All&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="203"&gt;&lt;font size="2" face="Segoe UI"&gt;IIS: SSL Filter&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="577"&gt;&lt;font size="2" face="Segoe UI"&gt;SSL related events&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="203"&gt;&lt;font size="2" face="Segoe UI"&gt;IIS: Request Monitor&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="577"&gt;&lt;font size="2" face="Segoe UI"&gt;-&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="203"&gt;&lt;font size="2" face="Segoe UI"&gt;IIS: Active Server Pages (ASP)&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="577"&gt;&lt;font size="2" face="Segoe UI"&gt;Events from ASP ISAPI&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="203"&gt;&lt;font size="2" face="Segoe UI"&gt;IIS: WWW Isapi Extension&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="577"&gt;&lt;font size="2" face="Segoe UI"&gt;-&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="203"&gt;&lt;font size="2" face="Segoe UI"&gt;HTTP Service Trace&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="577"&gt;&lt;font size="2" face="Segoe UI"&gt;-&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="203"&gt;&lt;font size="2" face="Segoe UI"&gt;ASP.NET Events&amp;#160; &lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="577"&gt;&lt;font size="2" face="Segoe UI"&gt;All ASP.net events&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;NOTE: ETW tracing is also very helpful when you want to view what is happening on the server side over a SSL connection.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;I already have a blog post on using ETW providers to capture data &amp;amp; &lt;a title="How to parse an ETW trace" href="http://blogs.msdn.com/sudeepg/archive/2009/02/25/capturing-and-analyzing-an-etw-trace-event-tracing-for-windows.aspx" target="_blank"&gt;parsing ETW traces&lt;/a&gt;. &lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9452289" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/sudeepg/archive/tags/Tools/default.aspx">Tools</category></item><item><title>setting managed breakpoints in windbg</title><link>http://blogs.msdn.com/sudeepg/archive/2009/02/27/setting-managed-breakpoints-in-windbg.aspx</link><pubDate>Fri, 27 Feb 2009 11:28:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9448303</guid><dc:creator>Sudeep Gopalakrishnan</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/sudeepg/comments/9448303.aspx</comments><wfw:commentRss>http://blogs.msdn.com/sudeepg/commentrss.aspx?PostID=9448303</wfw:commentRss><description>&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Windbg is a native debugger and you can use it to set a breakpoint on a virtual address. Any managed code running within the process wouldn’t have a virtual address associated with it until it is JIT compiled. Thus setting a breakpoint on a managed function is a bit tricky in Windbg. You can set a breakpoint on managed methods using windbg only:&lt;/font&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;When you are performing a live debug &amp;amp; not on a post mortem dump file.&lt;/font&gt; &lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;You have a .RUN file from a Time Travel Debug trace.&lt;/font&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;When I started learning how to set managed breakpoints, one of the first questions I had is: How to set a breakpoint on a specific line of &lt;/font&gt;&lt;font size="2" face="Segoe UI"&gt;code in a managed method – because that is what we usually do in other IDE environments like Visual Studio. This is somewhat very difficult to do because, though you can get the virtual address where your method starts using the SOS commands, you will need to know the exact offset from the method’s starting virtual address &lt;font color="#80ff80"&gt;[The actual address which corresponds to your line of code]&lt;/font&gt; and it isn’t easy at all to co-relate that to your source code. You will need to have an extremely good understanding of IL code, un-assemble the function using &lt;font color="#ff9900"&gt;!u&lt;/font&gt; command and then set the breakpoint on that address. I do not have that skill yet, but will surely put out a post once I figure that out. So over here, I will describe how to set a breakpoint on a managed method for .NET Framework 2.0.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;&lt;font color="#ff9900"&gt;STEP 1: &lt;/font&gt;So assuming you are doing a live debug, the first step is to attach to the process that you want to debug. You can use the attach option in Windbg user interface [File menu]. Then load the SOS debugger extension - &lt;font color="#ff9900"&gt;!loadby SOS mscorwks&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;&lt;font color="#ff9900"&gt;STEP 2:&lt;/font&gt; You need to know which method you want to set a breakpoint on. The SOS command you need is &lt;font color="#ff9900"&gt;!dumpmt&lt;/font&gt; with the &lt;font color="#ff9900"&gt;–md&lt;/font&gt; parameter. This lists out the method table. For example, Dump the method table of &lt;font color="#ff9900"&gt;System.Timespan&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;div style="border-bottom: gray 1px solid; border-left: gray 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; max-height: 450px; font-size: 8pt; overflow: auto; border-top: gray 1px solid; cursor: text; border-right: gray 1px solid; padding-top: 4px"&gt;   &lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;     &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; !dumpmt -md 0x7911228c &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt; EEClass: 791121e4 &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt; Module: 790c2000 &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt; Name: System.TimeSpan &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt; mdToken: 02000114  (C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll) &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   6:&lt;/span&gt; BaseSize: 0x10 &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   7:&lt;/span&gt; ComponentSize: 0x0 &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   8:&lt;/span&gt; Number of IFaces &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; IFaceMap: 3 &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   9:&lt;/span&gt; Slots &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; VTable: 56 &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  10:&lt;/span&gt; -------------------------------------- &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  11:&lt;/span&gt; MethodDesc Table &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  12:&lt;/span&gt;    Entry MethodDesc      JIT Name &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  13:&lt;/span&gt; 796d2710   7914fb28     NONE System.TimeSpan.ToString() &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  14:&lt;/span&gt; 793624d0   7914b950   PreJIT System.Object.Finalize() &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  15:&lt;/span&gt; 796c07f8   7914fb08     NONE System.TimeSpan.CompareTo(System.TimeSpan) &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  16:&lt;/span&gt; 796d2708   7914fb18     NONE System.TimeSpan.Equals(System.TimeSpan) &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  17:&lt;/span&gt; 79381054   79266eb8   PreJIT System.TimeSpan..ctor(Int64) &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  18:&lt;/span&gt; 7939f058   79266ec0   PreJIT System.TimeSpan..ctor(Int32, Int32, Int32) &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  19:&lt;/span&gt; 7939f07c   79266ed8   PreJIT System.TimeSpan.get_Ticks() &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  20:&lt;/span&gt; 794002c8   79266ee0   PreJIT System.TimeSpan.get_Days() &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  21:&lt;/span&gt; 794002e8   79266ee8   PreJIT System.TimeSpan.get_Hours() &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  22:&lt;/span&gt; 79400328   79266ef0   PreJIT System.TimeSpan.get_Milliseconds() &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  23:&lt;/span&gt; 7940036c   79266ef8   PreJIT System.TimeSpan.get_Minutes() &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  24:&lt;/span&gt; 794003ac   79266f00   PreJIT System.TimeSpan.get_Seconds() &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  25:&lt;/span&gt; 794003ec   79266f08   PreJIT System.TimeSpan.get_TotalDays() &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  26:&lt;/span&gt; 7940040c   79266f10   PreJIT System.TimeSpan.get_TotalHours() &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  27:&lt;/span&gt; 79380c10   79266f18   PreJIT System.TimeSpan.get_TotalMilliseconds()&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  28:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;&lt;font color="#ff9900"&gt;STEP 3:&lt;/font&gt; &lt;font color="#80ff80"&gt;[Optional]&lt;/font&gt; Using the method descriptor command, &lt;font color="#ff9900"&gt;!dumpmd &lt;/font&gt;you can view if the code is JITted. See line #7 below. You can skip this and go to &lt;font color="#ff9900"&gt;STEP 4&lt;/font&gt; directly using the corresponding MethodDesc value from the previous output.&lt;/font&gt;&lt;/p&gt;

&lt;div style="border-bottom: gray 1px solid; border-left: gray 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; max-height: 200px; font-size: 8pt; overflow: auto; border-top: gray 1px solid; cursor: text; border-right: gray 1px solid; padding-top: 4px"&gt;
  &lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;
    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; !dumpmd 79266f18 &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt; Method Name: System.TimeSpan.get_TotalMilliseconds() &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt; Class: 791121e4 &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt; MethodTable: 7911228c &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt; mdToken: 0600101e &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   6:&lt;/span&gt; Module: 790c2000 &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   7:&lt;/span&gt; IsJitted: yes &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   8:&lt;/span&gt; m_CodeOrIL: 79380c10&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;&lt;font color="#ff9900"&gt;STEP 4:&lt;/font&gt; Add the breakpoint using &lt;font color="#ff9900"&gt;!bpmd –md&lt;/font&gt; command.&lt;/font&gt;&lt;/p&gt;

&lt;div style="border-bottom: gray 1px solid; border-left: gray 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; max-height: 200px; font-size: 8pt; overflow: auto; border-top: gray 1px solid; cursor: text; border-right: gray 1px solid; padding-top: 4px"&gt;
  &lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;
    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; !bpmd –md 79380c10&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Another way…&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Syntax: &lt;font color="#ff9900"&gt;!bpmd &amp;lt;ModuleName&amp;gt; &amp;lt;FunctionName&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Example: &lt;font color="#ff9900"&gt;!bpmd mscorlib.dll System.TimeSpan.get_TotalMilliseconds&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;&lt;u&gt;Notes&lt;/u&gt;&lt;/font&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;The method names are case sensitive.&lt;/font&gt; &lt;/li&gt;

  &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;In many cases, the breakpoints you set may be indicated as “Pending breakpoints”, which is normal, because your method may not yet be JITted.&lt;/font&gt; &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Once your breakpoints are set, you can execute the &lt;font color="#ff9900"&gt;g&lt;/font&gt; command to let the process execute till it hits the breakpoint. Once it hits the breakpoint you can do other tasks like examine callstacks, stack objects, local variables etc.&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Have fun!&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9448303" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/sudeepg/archive/tags/Debugging/default.aspx">Debugging</category></item><item><title>catching a memory dump on system.outofmemoryexception</title><link>http://blogs.msdn.com/sudeepg/archive/2009/02/26/catching-a-memory-dump-on-system-outofmemoryexception.aspx</link><pubDate>Thu, 26 Feb 2009 22:28:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9447154</guid><dc:creator>Sudeep Gopalakrishnan</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/sudeepg/comments/9447154.aspx</comments><wfw:commentRss>http://blogs.msdn.com/sudeepg/commentrss.aspx?PostID=9447154</wfw:commentRss><description>&lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Issues related to high memory utilization on an IIS application server are common. With .NET there is a little misconception that the Garbage Collector (GC) will clean up objects and therefore the process can never run out of memory. This isn’t true. GC will never clean up an object which is in use. If that was the case, you can imagine the kind of problems it would create.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;While debugging memory problems, it is a good idea to capture memory dump when the process memory consumption is at its peak maximum usage. For .NET applications, a &lt;font color="#ff9900"&gt;&lt;strong&gt;&lt;em&gt;System.OutOfMemoryException&lt;/em&gt;&lt;/strong&gt;&lt;/font&gt; is thrown when GC fails on a &lt;font color="#ff9900"&gt;VirtualAlloc(). &lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;So how do we capture a memory dump when this Exception is thrown? Here’s how.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;For .NET Framework version 1.1&lt;/font&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Open the registry path: &lt;font color="#ff9900"&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Key: &lt;font color="#ff9900"&gt;GCFailFastOnOOM&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Type: &lt;font color="#ff9900"&gt;DWORD&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Value: &lt;font color="#ff9900"&gt;2&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;For .NET Framework version 2.0 and above&lt;/font&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Open the registry path: &lt;font color="#ff9900"&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Key: &lt;font color="#ff9900"&gt;GCBreakOnOOM&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Type: &lt;font color="#ff9900"&gt;DWORD&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Value: &lt;font color="#ff9900"&gt;2&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;Setting the above key causes a DebugBreak within the process when a System.OutOfMemoryException is encountered. You can then use a tool like DebugDiag or a Debugger like WinDBG/CDB/NTSD to capture a dump on this DebugBreak Exception. Windbg/CDB/NTSD debuggers are for advanced users and DebugDiag is generally preferred due to ease of use and is designed to be used in production environments.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#80ff80" size="2" face="Segoe UI"&gt;&lt;strong&gt;&lt;em&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#80ff80" size="2" face="Segoe UI"&gt;&lt;strong&gt;&lt;em&gt;Configuring Debug Diagnostic Tool&lt;/em&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;&lt;a title="DebugDiag download page on Microsoft Download Center" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=28bd5941-c458-46f1-b24d-f60151d875a3&amp;amp;DisplayLang=en   "&gt;Download&lt;/a&gt; and install DebugDiag to a drive with at least 4-5 GB of disk space.&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Open DebugDiag. If prompted to select a rule, select Crash. Else click on Add Rule button and select Crash.&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Click Next &amp;amp; select “A specific process”&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Select the process name. For IIS 6.0, this will be w3wp.exe. Click Next&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Under Advanced Settings, click on Exceptions, then click on Add Exception&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;From the list of exceptions, select 80000003 Breakpoint Exception&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Set Action Type to Full userdump &amp;amp; Action limit to 1. Click OK&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Click Save &amp;amp; Close button&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Click Next and provide a name for the rule and location where the dump files must be saved.&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2" face="Segoe UI"&gt;Click Next and then Finish button.&lt;/font&gt;&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;NOTE: When the dump is captured, the Userdump count column will be incremented by 1. You can then do post mortem debugging using Windbg and SOS.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Segoe UI"&gt;&amp;#160;&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9447154" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/sudeepg/archive/tags/Debugging/default.aspx">Debugging</category></item></channel></rss>