<?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>PerfWorld.com</title><link>http://blogs.msdn.com/b/perfworld/</link><description>ASP.NET Performance Tuning, Coding Standards, Guidelines, Best Practices, and Other Buzzwords
</description><dc:language>en-US</dc:language><generator>Telligent Community 5.6.583.21163 (Build: 5.6.583.21163)</generator><item><title>How can I disable batch compilation for my ASP.NET web pages so that the first user accessing the web site doesn’t experience slow performance?</title><link>http://blogs.msdn.com/b/perfworld/archive/2010/01/13/how-can-i-disable-batch-compilation-for-my-asp-net-web-pages-so-that-the-first-user-accessing-the-web-site-doesn-t-experience-slow-performance.aspx</link><pubDate>Thu, 14 Jan 2010 02:36:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9948153</guid><dc:creator>Reuben Frost</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/perfworld/rsscomments.aspx?WeblogPostID=9948153</wfw:commentRss><comments>http://blogs.msdn.com/b/perfworld/archive/2010/01/13/how-can-i-disable-batch-compilation-for-my-asp-net-web-pages-so-that-the-first-user-accessing-the-web-site-doesn-t-experience-slow-performance.aspx#comments</comments><description>&lt;P&gt;The batch property of the compilation element, which is enabled by default&amp;nbsp;in ASP.NET, is used to control whether the initial page request will continue to compile additional files in the same directory before completing the original request.&amp;nbsp; This can cause significant delay to the first several initial requests when enabled on moderately-sized web sites.&amp;nbsp; Once a page has been compiled during the first request, all subsequent requests are performed without any compilation delay.&amp;nbsp; In most cases, I recommend&amp;nbsp;disabling this property by setting the batch compilation property value to “false” in the web.config file.&amp;nbsp; Changing this value is not necessary if you precompile your ASP.NET web site with the “updatable” flag set to false.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;File: Web.config&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;configuration&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;system.web&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;compilation&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt; &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;&lt;FONT color=#ff0000 size=2&gt;batch&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;false&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;system.web&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;configuration&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P&gt;For more information on precompiling pages for better performance:&lt;BR&gt;&lt;A href="http://blogs.msdn.com/perfworld/archive/2009/01/29/how-can-i-precompile-my-asp-net-web-pages-so-that-the-first-user-accessing-the-web-site-doesn-t-experience-slow-performance.aspx"&gt;http://blogs.msdn.com/perfworld/archive/2009/01/29/how-can-i-precompile-my-asp-net-web-pages-so-that-the-first-user-accessing-the-web-site-doesn-t-experience-slow-performance.aspx&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For more information on the compilation element: &lt;BR&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/s10awwz0.aspx" mce_href="http://msdn.microsoft.com/en-us/library/s10awwz0.aspx"&gt;http://msdn.microsoft.com/en-us/library/s10awwz0.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9948153" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/perfworld/archive/tags/ASP-NET/">ASP.NET</category><category domain="http://blogs.msdn.com/b/perfworld/archive/tags/Precompile/">Precompile</category></item><item><title>How can I improve the performance of ASP.NET by adjusting the CLR thread throttling properties?</title><link>http://blogs.msdn.com/b/perfworld/archive/2010/01/13/how-can-i-improve-the-performance-of-asp-net-by-adjusting-the-clr-thread-throttling-properties.aspx</link><pubDate>Thu, 14 Jan 2010 01:22:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9948140</guid><dc:creator>Reuben Frost</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/perfworld/rsscomments.aspx?WeblogPostID=9948140</wfw:commentRss><comments>http://blogs.msdn.com/b/perfworld/archive/2010/01/13/how-can-i-improve-the-performance-of-asp-net-by-adjusting-the-clr-thread-throttling-properties.aspx#comments</comments><description>&lt;P&gt;This post applies to: .NET 2.0, 3.0 &amp;amp; 3.5.&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The CLR uses an adjustable threshold property called minWorkerThreads and minIoThreads to control when to introduce throttling to thread creation.&amp;nbsp; The idea behind the delay is to prevent a burst in request load from quickly creating additional threads that will later&amp;nbsp;lead to excessive thread context switching and negatively impact performance.&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;In ASP.NET,&amp;nbsp;the CLR defaults&amp;nbsp;both the minWorkerThreads and minIoThreads&amp;nbsp;properties to&amp;nbsp;1.&amp;nbsp; This number is then multiplied by the number of logical processors you have so a 2 core server with default settings (minWorkerThreads=1, minIoThreads=1) would have a worker thread minimum limit of 2 and completion port minimum limit of 2.&amp;nbsp; I would recommend changing both properties to a number between 1 – 50.&amp;nbsp; The best way that I have found to determine the optimal number of minWorkerThreads is to take a user mode process dump of the W3wp.exe process during typical load and use the Worker Threads Total from the !threadpool command as a starting point.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an example of the !threadpool command output:&lt;/P&gt;
&lt;DIV class=codelayout&gt;
&lt;P&gt;0:000&amp;gt; .loadby sos mscorwks&lt;BR&gt;&lt;BR&gt;0:000&amp;gt; !threadpool&lt;BR&gt;CPU utilization 38%&lt;BR&gt;Worker Thread: Total: 160 Running: 24 Idle: 136 MaxLimit: 3200 MinLimit: 32&lt;BR&gt;Work Request in Queue: 0&lt;BR&gt;--------------------------------------&lt;BR&gt;Number of Timers: 70&lt;BR&gt;--------------------------------------&lt;BR&gt;Completion Port Thread:Total: 3 Free: 3 MaxFree: 96 CurrentLimit: 3 MaxLimit: 3200 MinLimit: 32&lt;BR&gt;&lt;/P&gt;&lt;/DIV&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So if your web site typically runs with a worker thread total of 160, then 160 divided by the number of logical processors would be a great place to set minWorkerThreads and minIoThreads to.&amp;nbsp;&amp;nbsp; So in the example above, with 32 logical processors, the minWorkerThreads and minIoThreads should be set to 5 (5 * 32 cores = 160 which is the current worker thread total). &lt;BR&gt;After setting the value to 5, understand that this will not automatically create 160 threads nor guarantee to maintain 160 threads while the process is running.&amp;nbsp; What this will actually do is allow the process to create up to 160 threads before introducing throttling to thread creation.&amp;nbsp; Think of these properties as if they were named minWorkerThreadsBeforeThrottling and minIoThreadsBeforeThrottling.&amp;nbsp; A word of caution; if you change the minimum threads to a value greater than the maximum (default is 100) then the value will be ignored and the default minimum of 1 thread will be used.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;File: Machine.config&lt;BR&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#000000&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;configuration&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;system.web&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;BR&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;processModel&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;&lt;FONT color=#ff0000 size=2&gt;minWorkerThreads&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;5&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt; &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;&lt;FONT color=#ff0000 size=2&gt;minIoThreads&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;5&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt; /&amp;gt;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;system.web&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;configuration&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;There are times then you need to adjust the CLR threading in code rather than in the Machine.config.&amp;nbsp; Here is an example in C#:&lt;BR&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;const&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"&gt; &lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt; MinimumClrThreads = 5;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;//use this value to control the threads&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: green; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: green; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;//get number of logical processors to simulate default asp.net behavior&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;int&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"&gt; logicalProcessors = System.&lt;SPAN style="COLOR: #2b91af"&gt;Environment&lt;/SPAN&gt;.ProcessorCount;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: green; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;int&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"&gt; minWorkerThreads = MinimumClrThreads * logicalProcessors;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;int&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"&gt; minIoThreads = MinimumClrThreads * logicalProcessors;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: green; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;//set the minumum number of worker and IO threads&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #2b91af; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;ThreadPool&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;.SetMinThreads(minWorkerThreads, minIoThreads);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;For more information on the ProcessModelSection class:&lt;BR&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/system.web.configuration.processmodelsection.aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.web.configuration.processmodelsection.aspx"&gt;http://msdn.microsoft.com/en-us/library/system.web.configuration.processmodelsection.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9948140" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/perfworld/archive/tags/ASP-NET/">ASP.NET</category></item><item><title>How can I throw an exception without losing the original stack trace information in .NET?</title><link>http://blogs.msdn.com/b/perfworld/archive/2009/06/15/how-can-i-throw-an-exception-without-losing-the-original-stack-trace-information-in-net.aspx</link><pubDate>Tue, 16 Jun 2009 00:31:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9756023</guid><dc:creator>Reuben Frost</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/perfworld/rsscomments.aspx?WeblogPostID=9756023</wfw:commentRss><comments>http://blogs.msdn.com/b/perfworld/archive/2009/06/15/how-can-i-throw-an-exception-without-losing-the-original-stack-trace-information-in-net.aspx#comments</comments><description>&lt;P&gt;Use the "throw" keyword in place of "throw ex" to perserve the original stack trace information.&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;When you throw an exception using&amp;nbsp;“throw ex” instead of&amp;nbsp;“throw” you override the original stack trace with a new stack trace that starts from the throwing method.&amp;nbsp; This can make tracking down the root causes of exceptions much more difficult.&amp;nbsp; Take a look at the example below in order to see the differences in the stack traces depending on which option you use.&lt;/P&gt;
&lt;DIV class=codelayout&gt;
&lt;P&gt;class ExceptionallySpeaking&lt;BR&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; static void Main(string[] args)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MethodA();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; catch (Exception ex)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Option 1 - Showing overridden exception stack with MethodA instead of MethodB on top&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Exception: System.NotImplementedException: The method or operation is not implemented.&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp; at ExceptionallySpeaking.MethodA()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp; at ExceptionallySpeaking.Main(String[] args)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Option 2 - Showing original exception stack with MethodB on top&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Exception: System.NotImplementedException: The method or operation is not implemented.&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp; at ExceptionallySpeaking.MethodB()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp; at ExceptionallySpeaking.MethodA()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp; at ExceptionallySpeaking.Main(String[] args)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Option 3 - Showing original exception stack with MethodB on top plus additional information&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Exception: System.Exception: Additional information... ---&amp;gt; System.NotImplementedException: The method or operation is not implemented.&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp; at ExceptionallySpeaking.MethodB()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp; at ExceptionallySpeaking.MethodA()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp; --- End of inner exception stack trace ---&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp; at ExceptionallySpeaking.MethodA()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp; at ExceptionallySpeaking.Main(String[] args)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine("Exception: {0}", ex.ToString());&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static void MethodA()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MethodB();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; catch (Exception ex)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Option 1 - Overrides original stack trace&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;throw ex;&lt;/STRONG&gt; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; //Option 2 - Keeps original stack trace&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;throw;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;//Option 3 - Keeps original stack trace and adds aditional information&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;throw new Exception("Additional information...", ex);&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static void MethodB()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw new System.NotImplementedException();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;&lt;/DIV&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;Let's dig&amp;nbsp;a little deeper on this topic and discover the mystery behind Throw vs. Throw ex and the shrinking stack trace.&lt;/P&gt;
&lt;P mce_keep="true"&gt;In Microsoft intermediate language (MSIL), the "throw ex" in C# will be converted into "throw" while&amp;nbsp;"throw"&amp;nbsp;in C# will be converted into&amp;nbsp;"rethrow".&amp;nbsp; This difference is what causes "throw ex" to contain less stack trace information since it will restart the exception throwing process from MethodA instead of continuing to rethrow the original exception from MethodB.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;BR&gt;Option 1 -&amp;nbsp;MethodA catch block&amp;nbsp;using&amp;nbsp;"throw ex" in MSIL&lt;/P&gt;
&lt;DIV class=codelayout&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp; catch [mscorlib]System.Exception &lt;BR&gt;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IL_000b:&amp;nbsp; stloc.0&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IL_000c:&amp;nbsp; nop&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IL_000d:&amp;nbsp; ldloc.0&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;IL_000e:&amp;nbsp; throw&lt;BR&gt;&lt;/STRONG&gt;&amp;nbsp; }&amp;nbsp; // end handler&lt;/P&gt;&lt;/DIV&gt;
&lt;P mce_keep="true"&gt;&lt;BR&gt;Option 2 - MethodA catch block&amp;nbsp;using "throw" in MSIL&lt;/P&gt;
&lt;DIV class=codelayout&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp; catch [mscorlib]System.Exception &lt;BR&gt;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IL_000b:&amp;nbsp; stloc.0&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IL_000c:&amp;nbsp; nop&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;IL_000d:&amp;nbsp; rethrow&lt;BR&gt;&lt;/STRONG&gt;&amp;nbsp; }&amp;nbsp; // end handler&lt;BR&gt;&lt;/P&gt;&lt;/DIV&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9756023" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/perfworld/archive/tags/ASP-NET/">ASP.NET</category></item><item><title>How can I use WMI and Powershell to determine if a computer running a 32-bit operating system can support a 64-bit operating system?</title><link>http://blogs.msdn.com/b/perfworld/archive/2009/02/27/how-can-i-use-wmi-and-powershell-to-determine-if-a-computer-running-a-32-bit-operating-system-can-support-a-64-bit-operating-system.aspx</link><pubDate>Fri, 27 Feb 2009 23:02:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9449818</guid><dc:creator>Reuben Frost</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/perfworld/rsscomments.aspx?WeblogPostID=9449818</wfw:commentRss><comments>http://blogs.msdn.com/b/perfworld/archive/2009/02/27/how-can-i-use-wmi-and-powershell-to-determine-if-a-computer-running-a-32-bit-operating-system-can-support-a-64-bit-operating-system.aspx#comments</comments><description>&lt;P mce_keep="true"&gt;Below&amp;nbsp;is a sample&amp;nbsp;Powershell (Windows Powershell - WPS)&amp;nbsp; script that will detect if a computer that is running&amp;nbsp;a 32-bit operating system will support a 64-bit operating system using WMI (Windows Management Instrumentation).&amp;nbsp;&lt;/P&gt;
&lt;DIV class=codelayout&gt;
&lt;P mce_keep="true"&gt;$strComputerName = "."&lt;BR&gt;$strCpuArchitecture = ""&lt;BR&gt;$intCurrentAddressWidth = 0&lt;BR&gt;$intSupportableAddressWidth = 0&lt;/P&gt;
&lt;P mce_keep="true"&gt;$objWmi = Get-WmiObject -class "Win32_Processor" -namespace "root\cimV2" -computer $strComputerName&lt;/P&gt;
&lt;P mce_keep="true"&gt;$intCurrentAddressWidth = $objWmi.AddressWidth&lt;BR&gt;$intSupportableAddressWidth = $objWmi.DataWidth&lt;/P&gt;
&lt;P mce_keep="true"&gt;switch ($objWmi.Architecture)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp; 0 {$strCpuArchitecture = "x86"}&lt;BR&gt;&amp;nbsp; 1 {$strCpuArchitecture = "MIPS"}&lt;BR&gt;&amp;nbsp; 2 {$strCpuArchitecture = "Alpha"}&lt;BR&gt;&amp;nbsp; 3 {$strCpuArchitecture = "PowerPC"}&lt;BR&gt;&amp;nbsp; 6 {$strCpuArchitecture = "Itanium"}&lt;BR&gt;&amp;nbsp; 9 {$strCpuArchitecture = "x64"}&lt;BR&gt;}&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;BR&gt;if ($intCurrentAddressWidth -eq $intSupportableAddressWidth)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp; "System Type: $intCurrentAddressWidth-bit operating system - Processor Architecture: $strCpuArchitecture"&lt;BR&gt;}&lt;BR&gt;else&lt;BR&gt;{&lt;BR&gt;&amp;nbsp; "System Type: $intCurrentAddressWidth-bit operating system ($intSupportableAddressWidth-bit capable) - Processor Architecture: $strCpuArchitecture"&lt;BR&gt;}&lt;BR&gt;&lt;/P&gt;&lt;/DIV&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Sample Output (32-bit Windows Vista with a 64-bit capable CPU):&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;System Type: 32-bit operating system (64-bit capable) - Processor Architecture: x64&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG style="WIDTH: 496px; HEIGHT: 241px" title="32-bit Windows Vista with a 64-bit capable CPU" alt="32-bit Windows Vista with a 64-bit capable CPU" src="http://www.reubenfrost.com/images/blog/powershell-64-bit-detect-command-line.png" width=496 height=241 mce_src="http://www.reubenfrost.com/images/blog/powershell-64-bit-detect-command-line.png"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;For more information on Windows Powershell:&lt;BR&gt;&lt;A href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx"&gt;http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;For more information on downloading Windows Powershell v1:&lt;BR&gt;&lt;A href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/download.mspx" mce_href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/download.mspx"&gt;http://www.microsoft.com/windowsserver2003/technologies/management/powershell/download.mspx&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9449818" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/perfworld/archive/tags/Powershell/">Powershell</category></item><item><title>How can I deploy a single ASP.NET web page to a web site that is precompiled?</title><link>http://blogs.msdn.com/b/perfworld/archive/2009/01/29/how-can-i-deploy-a-single-asp-net-web-page-to-a-web-site-that-is-precompiled.aspx</link><pubDate>Fri, 30 Jan 2009 01:49:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9383826</guid><dc:creator>Reuben Frost</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/perfworld/rsscomments.aspx?WeblogPostID=9383826</wfw:commentRss><comments>http://blogs.msdn.com/b/perfworld/archive/2009/01/29/how-can-i-deploy-a-single-asp-net-web-page-to-a-web-site-that-is-precompiled.aspx#comments</comments><description>&lt;P&gt;Every now and then, you may find yourself in the situation&amp;nbsp;where you need to deploy a single file on a precompiled web site.&amp;nbsp; I know I certainly have.&lt;/P&gt;
&lt;P&gt;Here are the steps that I would use to accomplish this:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Build and precompile your whole web site as usual;&lt;/LI&gt;
&lt;LI&gt;Search in the "Bin"&amp;nbsp;folder of the build output web site folder for&amp;nbsp;the file&amp;nbsp;you want to deploy with a .compiled file extension;&lt;/LI&gt;
&lt;LI&gt;Once found, open the file in a text editor like Notepad.exe (The .compiled file should contain an&amp;nbsp;XML element called preserve that lists the&amp;nbsp;assembly name&amp;nbsp;and the virtual path where you can verify you have the&amp;nbsp;file you want to deploy);&lt;/LI&gt;
&lt;LI&gt;Copy&amp;nbsp;the .dll assembly file named in the XML and the .compiled file to the "Bin" folder of the web site that you want to deploy to;&lt;/LI&gt;
&lt;LI&gt;Done.&lt;/LI&gt;&lt;/OL&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Example of XML contents of a file called default.aspx.cdcab7d2.compiled:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG title="XML contents of a file" style="WIDTH: 496px; HEIGHT: 130px" height=130 alt="XML contents of a file" src="http://www.reubenfrost.com/images/blog/precompiled-aspx.png" width=496 mce_src="http://www.reubenfrost.com/images/blog/precompiled-aspx.png"&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;In the&amp;nbsp;example above, the following two files would be copied to the&amp;nbsp;Bin folder of the web site being deployed to:&lt;BR&gt;&lt;/STRONG&gt;App_Web_default.aspx.cdcab7d2.dll&lt;BR&gt;default.aspx.cdcab7d2.compiled&lt;BR&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;For more information on precompiling a web site:&lt;BR&gt;&lt;A href="http://blogs.msdn.com/perfworld/archive/2009/01/29/how-can-i-precompile-my-asp-net-web-pages-so-that-the-first-user-accessing-the-web-site-doesn-t-experience-slow-performance.aspx"&gt;http://blogs.msdn.com/perfworld/archive/2009/01/29/how-can-i-precompile-my-asp-net-web-pages-so-that-the-first-user-accessing-the-web-site-doesn-t-experience-slow-performance.aspx&lt;/A&gt;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9383826" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/perfworld/archive/tags/ASP-NET/">ASP.NET</category><category domain="http://blogs.msdn.com/b/perfworld/archive/tags/Precompile/">Precompile</category></item><item><title>How can I precompile my ASP.NET web pages so that the first user accessing the web site doesn’t experience slow performance?</title><link>http://blogs.msdn.com/b/perfworld/archive/2009/01/29/how-can-i-precompile-my-asp-net-web-pages-so-that-the-first-user-accessing-the-web-site-doesn-t-experience-slow-performance.aspx</link><pubDate>Thu, 29 Jan 2009 23:13:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9383606</guid><dc:creator>Reuben Frost</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/perfworld/rsscomments.aspx?WeblogPostID=9383606</wfw:commentRss><comments>http://blogs.msdn.com/b/perfworld/archive/2009/01/29/how-can-i-precompile-my-asp-net-web-pages-so-that-the-first-user-accessing-the-web-site-doesn-t-experience-slow-performance.aspx#comments</comments><description>&lt;P&gt;Precompiling your ASP.NET web pages is a great way to &lt;STRONG&gt;increase the performance&lt;/STRONG&gt; of your web site.&amp;nbsp; Once your web site has been precompiled, all of the content of your .ASPX, ASMX,&amp;nbsp;ASAX, etc.&amp;nbsp;&lt;STRONG&gt;files will be transformed into DLLs&lt;/STRONG&gt; and placed in the "Bin" folder of your web site.&lt;/P&gt;
&lt;P&gt;If you were to open one of these files after your web site has been precompiled, they would contain just one line that reads, “This is a marker file generated by the precompilation tool, and should not be deleted!”.&lt;BR&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG title="Precompiled Marker File" style="WIDTH: 496px; HEIGHT: 100px" height=100 alt="Precompiled Marker File" src="http://www.reubenfrost.com/images/blog/precompiled-marker-file.png" width=496 mce_src="http://www.reubenfrost.com/images/blog/precompiled-marker-file.png"&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Aspnet_Compiler Command-line Example:&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV class=codelayout mce_keep="true"&gt;Aspnet_compiler –p c:\WebSiteFolder –v / C:\PrecompiledOutputFolder -f –fixednames&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;&lt;IMG title="Aspnet_compiler Command-Line" style="WIDTH: 496px; HEIGHT: 249px" height=249 alt="Aspnet_compiler Command-Line" src="http://www.reubenfrost.com/images/blog/aspnet-precompile-command-line.png" width=496 mce_src="http://www.reubenfrost.com/images/blog/aspnet-precompile-command-line.png"&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Visual Studio 2005/2008 example using the Publish feature:&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Right-click on your Web Site in Solution Explorer and click Publish Web Site&lt;/DIV&gt;&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Uncheck the "Allow this precompiled site to be updatable" checkbox&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Check the "Use fixed naming and single page assemblies" checkbox&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;IMG title="Visual Studio 2008 Publish Web Site" style="WIDTH: 496px; HEIGHT: 324px" height=324 alt="Visual Studio 2008 Publish Web Site" src="http://www.reubenfrost.com/images/blog/vs2008-publish-web-site.png" width=496 mce_src="http://www.reubenfrost.com/images/blog/vs2008-publish-web-site.png"&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;Note: The key things to remember when precompiling your web pages are to enable the use fixed names flag and disable the updatable flag.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;For more information on&amp;nbsp;deploying&amp;nbsp;single ASP.NET web page to a web site that is precompiled:&lt;BR&gt;&lt;A href="http://blogs.msdn.com/perfworld/archive/2009/01/29/how-can-i-deploy-a-single-asp-net-web-page-to-a-web-site-that-is-precompiled.aspx"&gt;http://blogs.msdn.com/perfworld/archive/2009/01/29/how-can-i-deploy-a-single-asp-net-web-page-to-a-web-site-that-is-precompiled.aspx&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;For more information on the ASP.NET compilation tool:&lt;BR&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/ms229863(VS.80).aspx"&gt;http://msdn.microsoft.com/en-us/library/ms229863(VS.80).aspx&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9383606" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/perfworld/archive/tags/ASP-NET/">ASP.NET</category><category domain="http://blogs.msdn.com/b/perfworld/archive/tags/Precompile/">Precompile</category></item><item><title>How do I prevent ASP.NET trace and debug flags from being left enabled inadvertently in a production environment?</title><link>http://blogs.msdn.com/b/perfworld/archive/2009/01/27/how-do-i-prevent-trace-and-debug-flags-from-accidentally-being-enabled-in-a-production-environment.aspx</link><pubDate>Wed, 28 Jan 2009 03:43:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9379640</guid><dc:creator>Reuben Frost</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/perfworld/rsscomments.aspx?WeblogPostID=9379640</wfw:commentRss><comments>http://blogs.msdn.com/b/perfworld/archive/2009/01/27/how-do-i-prevent-trace-and-debug-flags-from-accidentally-being-enabled-in-a-production-environment.aspx#comments</comments><description>&lt;P mce_keep="true"&gt;In the Maching.config file, there is a "deployment" element that you can add and set that will help in this area. Once set, this element will tell the ASP.NET process ignore several security and performance related settings that may have been left enabled inadvertently in the web.config and deployed in a production environment. Adding this element on all of your production servers results in the following:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The compiler "debug" flag will be set to "false", ignoring all web.config files&lt;/LI&gt;
&lt;LI&gt;The trace “enabled” flag will be set to "false", ignoring all web.config files&lt;/LI&gt;
&lt;LI&gt;The customErrors "mode" flag will be set to "On", ignoring all web.config files&lt;/LI&gt;
&lt;LI&gt;The “ScriptMode” flag of the AJAX ScriptManager and ScriptReference controls will render release versions of the client scripts to the browser while ignoring all control level settings&lt;/LI&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;File: Machine.config&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;configuration&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;system.web&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;deployment&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt; &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;&lt;FONT color=#ff0000 size=2&gt;retail&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;true&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt; /&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;system.web&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;configuration&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;For more information on the deployment element:&lt;BR&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/ms228298(VS.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms228298(VS.80).aspx"&gt;http://msdn.microsoft.com/en-us/library/ms228298(VS.80).aspx&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;For more information on the ScriptMode property:&lt;BR&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/bb344940.aspx" mce_href="http://msdn.microsoft.com/en-us/library/bb344940.aspx"&gt;http://msdn.microsoft.com/en-us/library/bb344940.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;For more information on how and why Microsoft.com uses the deployment element across the enterprise:&lt;BR&gt;&lt;A href="http://technet.microsoft.com/en-us/magazine/cc160896.aspx" mce_href="http://technet.microsoft.com/en-us/magazine/cc160896.aspx"&gt;http://technet.microsoft.com/en-us/magazine/cc160896.aspx&lt;/A&gt;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9379640" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/perfworld/archive/tags/ASP-NET/">ASP.NET</category><category domain="http://blogs.msdn.com/b/perfworld/archive/tags/IIS/">IIS</category></item><item><title>How do I enable GZip compression for my web server in IIS?</title><link>http://blogs.msdn.com/b/perfworld/archive/2009/01/27/how-do-i-enable-gzip-compression-on-my-web-site-in-iis.aspx</link><pubDate>Tue, 27 Jan 2009 22:58:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9378931</guid><dc:creator>Reuben Frost</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/perfworld/rsscomments.aspx?WeblogPostID=9378931</wfw:commentRss><comments>http://blogs.msdn.com/b/perfworld/archive/2009/01/27/how-do-i-enable-gzip-compression-on-my-web-site-in-iis.aspx#comments</comments><description>&lt;P&gt;GZip/Deflate compression&amp;nbsp;will compress&amp;nbsp;the response payload from the IIS web server to the browser.&amp;nbsp; Pages that seem to run fast on the&amp;nbsp;server but run slow over the network will see a big speed increase.&amp;nbsp; I typically see&amp;nbsp;around a &lt;STRONG&gt;60% to 70% reduction in network traffic&lt;/STRONG&gt;&amp;nbsp;with GZip enabled.&amp;nbsp; This could mean&amp;nbsp;&lt;STRONG&gt;transfer rates to the browser&amp;nbsp;up to 4x faster!&lt;/STRONG&gt;&amp;nbsp; Best of all, GZip/Deflate compression is built-in IIS out-of-the-box!&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Who uses GZip compression for their web site:&lt;BR&gt;&lt;/STRONG&gt;- Microsoft.com&lt;BR&gt;- Google.com&lt;BR&gt;- Yahoo.com&lt;BR&gt;- CNN.com&lt;BR&gt;- eBay.com&lt;BR&gt;- Facebook.com&lt;BR&gt;- well, just about everyone.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Command-line example of typical usage settings to enable GZip compression for both dynamic and static content (from within Inetpub\AdminScripts and running IIS 6.0):&lt;BR&gt;&lt;/STRONG&gt;
&lt;DIV class=codelayout&gt;cscript adsutil.vbs set W3Svc/Filters/Compression/Parameters/HcDoDynamicCompression true&lt;BR&gt;cscript adsutil.vbs set W3Svc/Filters/Compression/Parameters/HcDoStaticCompression true&lt;BR&gt;cscript adsutil.vbs set W3Svc/Filters/Compression/GZip/HcDynamicCompressionLevel 7&lt;BR&gt;cscript adsutil.vbs set W3Svc/Filters/Compression/GZip/HcScriptFileExtensions "asp" "dll" "exe" "aspx"&lt;BR&gt;cscript adsutil.vbs set W3Svc/Filters/Compression/GZip/HcOnDemandCompLevel 7&lt;BR&gt;cscript adsutil.vbs set W3Svc/Filters/Compression/GZip/HcFileExtensions "txt" "htm" "html" "js" "htc"&lt;BR&gt;cscript adsutil.vbs set W3Svc/Filters/Compression/Deflate/HcDynamicCompressionLevel 7&lt;BR&gt;cscript adsutil.vbs set W3Svc/Filters/Compression/Deflate/HcFileExtensions "txt" "htm" "html" "js" "htc"&lt;BR&gt;cscript adsutil.vbs set W3Svc/Filters/Compression/Deflate/HcOnDemandCompLevel 7&lt;BR&gt;cscript adsutil.vbs set W3Svc/Filters/Compression/Deflate/HcScriptFileExtensions "asp" "dll" "exe" "aspx"&lt;BR&gt;cscript adsutil.vbs set W3Svc/Filters/Compression/Parameters/HcNoCompressionForHttp10 true&lt;BR&gt;cscript adsutil.vbs set W3Svc/Filters/Compression/Parameters/HcNoCompressionForProxies true&lt;BR&gt;IISReset &lt;/DIV&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG style="WIDTH: 496px; HEIGHT: 348px" title="Command Line" alt="Command Line" src="http://www.reubenfrost.com/images/blog/gzip-command-line.png" width=496 height=348 mce_src="http://www.reubenfrost.com/images/blog/gzip-command-line.png"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Setting Definitions for IIS 6.0&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Enable&amp;nbsp;compression for&amp;nbsp;application files with dynamic content i.e.&amp;nbsp;ASP, ASPX (default is false):&lt;BR&gt;&lt;/STRONG&gt;&lt;SPAN class=code&gt;cscript adsutil.vbs set W3Svc/Filters/Compression/Parameters/HcDoDynamicCompression true&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Enable&amp;nbsp;compression for static files i.e.&amp;nbsp;HTM, JS, CSS (default is false):&lt;BR&gt;&lt;/STRONG&gt;&lt;SPAN class=code&gt;cscript adsutil.vbs set w3svc/filters/compression/parameters/HcDoStaticCompression true&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;The following lines will leave the default and add support for&amp;nbsp;ASP.NET .ASPX file extension which is dynamic content (default file extionsions for dynamic content are .ASP, .DLL, .EXE):&lt;BR&gt;&lt;/STRONG&gt;&lt;SPAN class=code&gt;cscript adsutil.vbs set W3Svc/Filters/Compression/Gzip/HcScriptFileExtensions "asp" "dll" "exe" "aspx"&lt;BR&gt;cscript adsutil.vbs set W3Svc/Filters/Compression/Deflate/HcScriptFileExtensions "asp" "dll" "exe" "aspx"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;The following lines will leave the default and add support for JavaScript file extension which is static content (default file extionsions for static content are .TXT, .HTM, .HTML):&lt;BR&gt;&lt;/STRONG&gt;&lt;SPAN class=code&gt;cscript adsutil.vbs set W3Svc/Filters/Compression/GZip/HcFileExtensions "txt" "htm" "html" "js"&lt;BR&gt;cscript adsutil.vbs set W3Svc/Filters/Compression/Deflate/HcFileExtensions "txt" "htm" "html" "js"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;The following will set the compression level which is a range from 0 to 10 for dynamic content (default is 0 which requires the lowest amount of CPU - i&amp;nbsp;prefer level 7)&lt;BR&gt;&lt;/STRONG&gt;&lt;SPAN class=code&gt;cscript adsutil.vbs set W3Svc/Filters/Compression/GZip/HcDynamicCompressionLevel 7&lt;BR&gt;&lt;SPAN class=code&gt;cscript adsutil.vbs set W3Svc/Filters/Compression/Deflate/HcDynamicCompressionLevel 7&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;The following will set the compression level which is a range from 0 to 10 for static content (default is 10 - i&amp;nbsp;prefer level 7)&lt;BR&gt;&lt;/STRONG&gt;&lt;SPAN class=code&gt;cscript adsutil.vbs set W3Svc/Filters/Compression/GZip/HcOnDemandCompLevel 7&lt;BR&gt;&lt;SPAN class=code&gt;cscript adsutil.vbs set W3Svc/Filters/Compression/Deflate/HcOnDemandCompLevel 7&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;If you are concerned with older proxy servers that claim to support the HTTP 1.0 specification&amp;nbsp;but may not support compression you may want to use the following to only support HTTP 1.1 specification - only needed if having issues (default is false):&lt;BR&gt;&lt;/STRONG&gt;&lt;SPAN class=code&gt;cscript adsutil.vbs set W3Svc/Filters/Compression/Parameters/HcNoCompressionForHttp10 true&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;If you want to completely disable compression for requests that come through proxy servers&amp;nbsp;-&amp;nbsp;only needed if having issues&amp;nbsp;(default is false):&lt;BR&gt;&lt;/STRONG&gt;&lt;SPAN class=code&gt;cscript adsutil.vbs set W3Svc/Filters/Compression/Parameters/HcNoCompressionForProxies true&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: After making these Metabase changes, you will need to restart IIS.&amp;nbsp; Also, if you are using load balancers for your web servers, it may be preferable to offload GZip compression to them.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;For more information on Using HTTP compression:&lt;BR&gt;&lt;A href="http://technet.microsoft.com/en-us/library/cc778828.aspx" mce_href="http://technet.microsoft.com/en-us/library/cc778828.aspx"&gt;http://technet.microsoft.com/en-us/library/cc778828.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;For more information on enabling/disabling HTTP compression on an individual web site or web site folder basis:&lt;BR&gt;&lt;A href="http://technet.microsoft.com/en-us/library/cc782942.aspx"&gt;http://technet.microsoft.com/en-us/library/cc782942.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;For more information on Using HTTP compression for Faster Downloads:&lt;BR&gt;&lt;A href="http://technet.microsoft.com/en-us/library/cc756725.aspx" mce_href="http://technet.microsoft.com/en-us/library/cc756725.aspx"&gt;http://technet.microsoft.com/en-us/library/cc756725.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;For more information on Changes to Compression in IIS7&lt;BR&gt;&lt;A href="http://blogs.iis.net/ksingla/archive/2006/06/13/changes-to-compression-in-iis7.aspx"&gt;http://blogs.iis.net/ksingla/archive/2006/06/13/changes-to-compression-in-iis7.aspx&lt;/A&gt;&lt;/P&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9378931" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/perfworld/archive/tags/ASP-NET/">ASP.NET</category><category domain="http://blogs.msdn.com/b/perfworld/archive/tags/IIS/">IIS</category></item><item><title>What are the basic performance counters that I should care about to measure the performance of my ASP.NET web site?</title><link>http://blogs.msdn.com/b/perfworld/archive/2009/01/20/what-are-the-basice-performance-counters-that-i-should-care-about-in-order-to-measure-the-performance-of-my-asp-net-web-site.aspx</link><pubDate>Wed, 21 Jan 2009 02:30:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9352452</guid><dc:creator>Reuben Frost</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/perfworld/rsscomments.aspx?WeblogPostID=9352452</wfw:commentRss><comments>http://blogs.msdn.com/b/perfworld/archive/2009/01/20/what-are-the-basice-performance-counters-that-i-should-care-about-in-order-to-measure-the-performance-of-my-asp-net-web-site.aspx#comments</comments><description>&lt;UL&gt;
&lt;LI&gt;Review the &lt;STRONG&gt;ASP.NET Applications\Requests/Sec&lt;/STRONG&gt; counter to determine how fast you are able to process work per second.&amp;nbsp; Higher is better.&lt;BR&gt;&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;Revew the &lt;STRONG&gt;ASP.NET Applications\Request Execution Time&lt;/STRONG&gt; counter to determine how fast a page takes to execute.&amp;nbsp; Lower is better.&lt;BR&gt;&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;Review the &lt;STRONG&gt;ASP.NET Applications\Requests In Application Queue&lt;/STRONG&gt; counter to determine if any requests are waiting at the application level.&amp;nbsp; Lower is better.&lt;BR&gt;&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;Review the &lt;STRONG&gt;ASP.NET Applications\Errors Total/Sec&lt;/STRONG&gt; counter to determine if you have a high rate off errors.&amp;nbsp; If so, fix the errors and check this counter again.&amp;nbsp; Lower is better.&lt;BR&gt;&lt;BR&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG title="Basic ASP.NET Performance Counters" style="WIDTH: 496px; HEIGHT: 368px" height=368 alt="Basic ASP.NET Performance Counters" src="http://www.reubenfrost.com/images/blog/basic-perf-counters.png" width=496 mce_src="http://www.reubenfrost.com/images/blog/basic-perf-counters.png"&gt;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9352452" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/perfworld/archive/tags/Performance+Counters/">Performance Counters</category><category domain="http://blogs.msdn.com/b/perfworld/archive/tags/ASP-NET/">ASP.NET</category></item></channel></rss>
