<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Debugging</title>
        <link>http://www.drowningintechnicaldebt.com/DennisBottjer/category/7.aspx</link>
        <description>Debugging</description>
        <language>en-US</language>
        <copyright>Dennis Bottjer</copyright>
        <generator>Subtext Version 2.1.2.2</generator>
        <item>
            <title>Automated Web Testing with Visual Studio 2008</title>
            <link>http://www.drowningintechnicaldebt.com/DennisBottjer/archive/2009/04/28/automated-web-testing-with-visual-studio-2008.aspx</link>
            <description>&lt;h1&gt;Tulsa Developers User Group | Automated Web Testing with Visual Studio 2008 (Review)&lt;/h1&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/default.aspx" target="_blank"&gt;Corey Roth&lt;/a&gt; presented tonight on automated web testing with Visual Studio 2008 at the Tulsa Developers User Group.  Visual Studio can be used to record an action such as logging into a web application.  Alternatively, users can inspect screen values for specific results.  The test would pass if the expect value is present and fail if the value is missing.  Visual Studio must be installed to execute the tests.   &lt;/p&gt;  &lt;p&gt;A tests project actually generates .NET Code (C# or VB.NET).  The tool can also be used to show raw header information and cookies.  One drawback is that only Internet Explorer is supported.&lt;/p&gt;  &lt;h2 /&gt;  &lt;h2&gt;Additional Information:&lt;/h2&gt;  &lt;p&gt;Follow me on twitter &lt;a title="Follow Dennis Bottjer on Twitter" href="http://twitter.com/dbottjer" target="_blank"&gt;@dbottjer&lt;/a&gt;&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:885ff8fc-9044-4f80-9e15-5c2774ad0534" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Web+Automated+Tested" rel="tag"&gt;Web Automated Tested&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Tulsa+Developers+User+Group" rel="tag"&gt;Tulsa Developers User Group&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.drowningintechnicaldebt.com/DennisBottjer/aggbug/128.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>dbottjer</dc:creator>
            <guid>http://www.drowningintechnicaldebt.com/DennisBottjer/archive/2009/04/28/automated-web-testing-with-visual-studio-2008.aspx</guid>
            <pubDate>Tue, 28 Apr 2009 06:32:03 GMT</pubDate>
            <wfw:comment>http://www.drowningintechnicaldebt.com/DennisBottjer/comments/128.aspx</wfw:comment>
            <comments>http://www.drowningintechnicaldebt.com/DennisBottjer/archive/2009/04/28/automated-web-testing-with-visual-studio-2008.aspx#feedback</comments>
            <wfw:commentRss>http://www.drowningintechnicaldebt.com/DennisBottjer/comments/commentRss/128.aspx</wfw:commentRss>
            <trackback:ping>http://www.drowningintechnicaldebt.com/DennisBottjer/services/trackbacks/128.aspx</trackback:ping>
        </item>
        <item>
            <title>Increase SharePoint execution Timeout</title>
            <link>http://www.drowningintechnicaldebt.com/DennisBottjer/archive/2009/04/14/increase-sharepoint-execution-timeout.aspx</link>
            <description>&lt;h2&gt;Execution Timeout Issue:&lt;/h2&gt;
&lt;p&gt;After six minutes (360 seconds) of execution a SharePoint page will timeout.  Now for most situations a six minute execution timeout seems very generous.  However, it is likely that this default execution timeout may be reached during such tasks as Feature Activation.  Features are activated from a SharePoint Application Page and unless specially coded (not likely) a Feature will execute code in a synchronous manor.  Features containing code to create nested site hierarchies can be quite time consuming.  &lt;/p&gt;
&lt;h2&gt;Solution:&lt;/h2&gt;
&lt;p&gt;SharePoint uses a web.config located under:&lt;/p&gt;
&lt;p&gt;Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS&lt;/p&gt;
&lt;p&gt;to set the default executionTimeout.  The default executionTimeout (See Below) value is 360 seconds or six minutes.  Increasing this value will allow our Feature code more time to complete execution before timing out.&lt;/p&gt;
&lt;h2&gt;Sample Web.Config&lt;/h2&gt;
&lt;p&gt;&amp;lt;system.web&amp;gt; &lt;br /&gt;
    &amp;lt;compilation batch="false" batchTimeout="600" maxBatchSize="10000" maxBatchGeneratedFileSize="10000" /&amp;gt; &lt;br /&gt;
    &amp;lt;httpHandlers&amp;gt; &lt;br /&gt;
      &amp;lt;add verb="*" path="*.aspx" type="System.Web.UI.PageHandlerFactory, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /&amp;gt; &lt;br /&gt;
    &amp;lt;/httpHandlers&amp;gt; &lt;br /&gt;
    &amp;lt;customErrors mode="On" /&amp;gt; &lt;br /&gt;
&amp;lt;httpRuntime executionTimeout="360" /&amp;gt; &lt;br /&gt;
    &amp;lt;globalization fileEncoding="utf-8" /&amp;gt; &lt;br /&gt;
  &amp;lt;/system.web&amp;gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;div style="PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; DISPLAY: inline; FLOAT: none; PADDING-TOP: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:99a8c765-9d9e-46be-a1b1-c6863ebec682" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a rel="tag" href="http://technorati.com/tags/Increase+SharePoint+Execution+Timeout"&gt;Increase SharePoint Execution Timeout&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.drowningintechnicaldebt.com/DennisBottjer/aggbug/118.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Dennis Bottjer</dc:creator>
            <guid>http://www.drowningintechnicaldebt.com/DennisBottjer/archive/2009/04/14/increase-sharepoint-execution-timeout.aspx</guid>
            <pubDate>Tue, 14 Apr 2009 09:40:55 GMT</pubDate>
            <wfw:comment>http://www.drowningintechnicaldebt.com/DennisBottjer/comments/118.aspx</wfw:comment>
            <comments>http://www.drowningintechnicaldebt.com/DennisBottjer/archive/2009/04/14/increase-sharepoint-execution-timeout.aspx#feedback</comments>
            <wfw:commentRss>http://www.drowningintechnicaldebt.com/DennisBottjer/comments/commentRss/118.aspx</wfw:commentRss>
            <trackback:ping>http://www.drowningintechnicaldebt.com/DennisBottjer/services/trackbacks/118.aspx</trackback:ping>
        </item>
        <item>
            <title>403 Error when accessing SearchSPSettings.aspx</title>
            <link>http://www.drowningintechnicaldebt.com/DennisBottjer/archive/2008/02/05/403-error-when-accessing-searchspsettings-aspx.aspx</link>
            <description>&lt;p&gt;&lt;strong&gt;Problem: &lt;/strong&gt;We were installing code on a MOSS 2007 Medium Farm Deployment.  We noticed the servers were missing sever WSS/MOSS 2007 related patches.  We applied the missing patches but then realized Search was no longer functioning properly.  One of the most noticeable issues was we could no longer access the "Search Settings" page under the primary SSP.  Prior to applying the patches this page was accessible but now we just saw a 403 Forbidden Error.  The event logs and the SharePoint logs weren't much help either.  Basically, we knew the problem had something to do with permissions but we couldn't find any hits where to look.  Additionally, this seemed to be the only page having issues.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt; After searching several blogs and MSDN I finally found a single post &lt;a title="http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=2793573&amp;amp;amp;SiteID=17&amp;amp;amp;mode=1" href="http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=2793573&amp;amp;SiteID=17&amp;amp;mode=1" mce_href="http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=2793573&amp;amp;SiteID=17&amp;amp;mode=1"&gt;http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=2793573&amp;amp;SiteID=17&amp;amp;mode=1&lt;/a&gt; by Jörgen Bjerkesjö that provided the solution.  The problem is caused by the local wss_wpg server account not having write access to the %windir%\tasks folder, usually c:\windows\tasks folder.  This folder is used by Windows Task Scheduler.  So to fix the problem the wss_wpg account needs to be given write access to the c:\windows\tasks folder on the index server.  &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The c:\windows\tasks folder is a hidden folder by default.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Steps:&lt;/strong&gt;&lt;/p&gt;
&lt;li&gt;On Index Server or all server in farm 
&lt;/li&gt;&lt;li&gt;Open a command prompt and type attrib -s %windir%\tasks &amp;lt;enter&amp;gt; 
&lt;/li&gt;&lt;li&gt;Browse to %windir%\tasks, right click and select properties.  Add the WSS_WPG group and grant Read &amp;amp; Write permissions on the tasks folder. 
&lt;/li&gt;&lt;li&gt;Open a command prompt and type attrib +s %windir% \tasks &amp;lt;enter&amp;gt;&lt;/li&gt;&lt;/blockquote&gt;
&lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:03147305-3e4b-4429-ad0e-588730d8eb20" style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/[SSP%20Error]" rel="tag" mce_href="http://technorati.com/tags/[SSP%20Error]"&gt;[SSP Error]&lt;/a&gt;,&lt;a href="http://technorati.com/tags/[MOSS%202007]" rel="tag" mce_href="http://technorati.com/tags/[MOSS%202007]"&gt;[MOSS 2007]&lt;/a&gt;,&lt;a href="http://technorati.com/tags/[Search%20Settings%20403]" rel="tag" mce_href="http://technorati.com/tags/[Search%20Settings%20403]"&gt;[Search Settings 403]&lt;/a&gt;,&lt;a href="http://technorati.com/tags/[Search%20Settings%20Error]" rel="tag" mce_href="http://technorati.com/tags/[Search%20Settings%20Error]"&gt;[Search Settings Error]&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.drowningintechnicaldebt.com/DennisBottjer/aggbug/88.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>dbottjer</dc:creator>
            <guid>http://www.drowningintechnicaldebt.com/DennisBottjer/archive/2008/02/05/403-error-when-accessing-searchspsettings-aspx.aspx</guid>
            <pubDate>Tue, 05 Feb 2008 14:35:00 GMT</pubDate>
            <wfw:comment>http://www.drowningintechnicaldebt.com/DennisBottjer/comments/88.aspx</wfw:comment>
            <comments>http://www.drowningintechnicaldebt.com/DennisBottjer/archive/2008/02/05/403-error-when-accessing-searchspsettings-aspx.aspx#feedback</comments>
            <slash:comments>7</slash:comments>
            <wfw:commentRss>http://www.drowningintechnicaldebt.com/DennisBottjer/comments/commentRss/88.aspx</wfw:commentRss>
            <trackback:ping>http://www.drowningintechnicaldebt.com/DennisBottjer/services/trackbacks/88.aspx</trackback:ping>
        </item>
        <item>
            <title>Error 1718. File FileName was rejected by digital signature policy.</title>
            <link>http://www.drowningintechnicaldebt.com/DennisBottjer/archive/2007/11/15/error-1718-file-filename-was-rejected-by-digital-signature-policy.aspx</link>
            <description>&lt;p&gt;Leveraging Virtual Machines is a great way to develop against SharePoint.  I was trying to update Visual Studio 2005 on a dev VM to SP1 and kept receiving "Error 1718. File &lt;var&gt;FileName&lt;/var&gt; was rejected by digital signature policy."  The cause of this error is actually related to a lack of Virtual Memory.  However, I still received the error after increasing the virtual memory. The HotFix available in this &lt;a title="http://support.microsoft.com/kb/925336" href="http://support.microsoft.com/kb/925336"&gt;http://support.microsoft.com/kb/925336&lt;/a&gt; MS Support Article resolved the issue.&lt;/p&gt;&lt;img src="http://www.drowningintechnicaldebt.com/DennisBottjer/aggbug/80.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>dbottjer</dc:creator>
            <guid>http://www.drowningintechnicaldebt.com/DennisBottjer/archive/2007/11/15/error-1718-file-filename-was-rejected-by-digital-signature-policy.aspx</guid>
            <pubDate>Fri, 16 Nov 2007 03:13:39 GMT</pubDate>
            <wfw:comment>http://www.drowningintechnicaldebt.com/DennisBottjer/comments/80.aspx</wfw:comment>
            <comments>http://www.drowningintechnicaldebt.com/DennisBottjer/archive/2007/11/15/error-1718-file-filename-was-rejected-by-digital-signature-policy.aspx#feedback</comments>
            <wfw:commentRss>http://www.drowningintechnicaldebt.com/DennisBottjer/comments/commentRss/80.aspx</wfw:commentRss>
            <trackback:ping>http://www.drowningintechnicaldebt.com/DennisBottjer/services/trackbacks/80.aspx</trackback:ping>
        </item>
        <item>
            <title>PEX Dynamic Test Generation</title>
            <link>http://www.drowningintechnicaldebt.com/DennisBottjer/archive/2007/11/14/pex-dynamic-test-generation.aspx</link>
            <description>&lt;p&gt;Found this project, &lt;a title="http://research.microsoft.com/Pex/" href="http://research.microsoft.com/Pex/"&gt;http://research.microsoft.com/Pex/&lt;/a&gt; from MS Research which apparently dynamically generates tests and code analysis during active development.  Interesting way to enforce code quality and just prove requirements are being met. &lt;/p&gt;&lt;img src="http://www.drowningintechnicaldebt.com/DennisBottjer/aggbug/79.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>dbottjer</dc:creator>
            <guid>http://www.drowningintechnicaldebt.com/DennisBottjer/archive/2007/11/14/pex-dynamic-test-generation.aspx</guid>
            <pubDate>Wed, 14 Nov 2007 17:16:29 GMT</pubDate>
            <wfw:comment>http://www.drowningintechnicaldebt.com/DennisBottjer/comments/79.aspx</wfw:comment>
            <comments>http://www.drowningintechnicaldebt.com/DennisBottjer/archive/2007/11/14/pex-dynamic-test-generation.aspx#feedback</comments>
            <wfw:commentRss>http://www.drowningintechnicaldebt.com/DennisBottjer/comments/commentRss/79.aspx</wfw:commentRss>
            <trackback:ping>http://www.drowningintechnicaldebt.com/DennisBottjer/services/trackbacks/79.aspx</trackback:ping>
        </item>
        <item>
            <title>ASP.NET Debug=true Performance Considerations</title>
            <link>http://www.drowningintechnicaldebt.com/DennisBottjer/archive/2007/10/10/asp-net-debug-true-performance-considerations.aspx</link>
            <description>&lt;p&gt;I'm sure, like me, you've seen plenty of production web.config files with debug=true set.  Most senior ASP.NET developers will recognize that debug should be set to false for the production build.  However, this small detail is often over looked.  So what does this setting really do and does it have any significant impact on a production site?&lt;/p&gt;
&lt;p&gt;When &lt;b&gt;debug&lt;/b&gt; is set to &lt;b&gt;true&lt;/b&gt;, the following occurs: 
&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;Pages are not batch compiled. 
&lt;/li&gt;&lt;li&gt;Pages do not time out. When a problem occurs, such as a problem with a Web service call, the Web server may start to queue requests and stop responding. 
&lt;/li&gt;&lt;li&gt;Additional files are generated in the Temporary &lt;a href="http://asp.net/" mce_href="http://asp.net/"&gt;ASP.NET&lt;/a&gt; Files folder. 
&lt;/li&gt;&lt;li&gt;The &lt;b&gt;System.Diagnostics.DebuggableAttribute&lt;/b&gt; attribute is added to generated code. This causes the CLR to track extra information about generated code, and it also disables certain optimizations. &lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Source of Information: &lt;a title="http://msdn2.microsoft.com/en-us/library/ms998549.aspx" href="http://msdn2.microsoft.com/en-us/library/ms998549.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/ms998549.aspx"&gt;http://msdn2.microsoft.com/en-us/library/ms998549.aspx&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.drowningintechnicaldebt.com/DennisBottjer/aggbug/75.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>dbottjer</dc:creator>
            <guid>http://www.drowningintechnicaldebt.com/DennisBottjer/archive/2007/10/10/asp-net-debug-true-performance-considerations.aspx</guid>
            <pubDate>Wed, 10 Oct 2007 13:36:00 GMT</pubDate>
            <wfw:comment>http://www.drowningintechnicaldebt.com/DennisBottjer/comments/75.aspx</wfw:comment>
            <comments>http://www.drowningintechnicaldebt.com/DennisBottjer/archive/2007/10/10/asp-net-debug-true-performance-considerations.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://www.drowningintechnicaldebt.com/DennisBottjer/comments/commentRss/75.aspx</wfw:commentRss>
            <trackback:ping>http://www.drowningintechnicaldebt.com/DennisBottjer/services/trackbacks/75.aspx</trackback:ping>
        </item>
        <item>
            <title>Thoughts On Recursion</title>
            <link>http://www.drowningintechnicaldebt.com/DennisBottjer/archive/2007/07/10/thoughts-on-recursion.aspx</link>
            <description>&lt;p&gt;Recursion is a computer science concept in which a method / function essentially calls itself until some condition is met.  Recursion can be an elegant solution to some logic problems.  However, I believe there are some potential dangers in using recursion that should carefully be consider.  Recursion is not an impossible concept to grasp it is just one that takes some thought.  The skill level of those maintaining an application should be considered before implementing recursion as it is a more advanced programming concept and could lead to serious performance issues of not implement correctly. &lt;/p&gt;&lt;pre&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;namespace&lt;/span&gt; RecursionTest
{
    &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;class&lt;/span&gt; Program
    {
        &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;static&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;void&lt;/span&gt; Main(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;string&lt;/span&gt;[] args)
        {
               System.Console.WriteLine(calcFactorial(4));
               System.Console.ReadLine();	
         }


        &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;static&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;int&lt;/span&gt; calcFactorial(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;int&lt;/span&gt; n)
        {
            &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;return&lt;/span&gt; n &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;*&lt;/span&gt; calcFactorial(n &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;-&lt;/span&gt; 1);
        }

    }
}&lt;/pre&gt;
&lt;p&gt;Did you spot the bug in the code above? The code never stops when the factorial is complete resulting in an infinite loop.  To fix the code we need to add a simple constraint or check. &lt;/p&gt;&lt;pre&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;namespace&lt;/span&gt; RecursionTest
{
    &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;class&lt;/span&gt; Program
    {
        &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;static&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;void&lt;/span&gt; Main(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;string&lt;/span&gt;[] args)
        {
            Console.WriteLine(calcFactorial(4));
            Console.ReadLine();
        }


        &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;static&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;int&lt;/span&gt; calcFactorial(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;int&lt;/span&gt; n)
        {
            &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;if&lt;/span&gt; (n == 1)
            {
                &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;return&lt;/span&gt; 1;
            }
            &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;else&lt;/span&gt;
            {
                &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;return&lt;/span&gt; n &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;*&lt;/span&gt; calcFactorial(n &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;-&lt;/span&gt; 1);
            }
        }
    }
}&lt;/pre&gt;The recursive code above is very clean however as demonstrated it is easy to forget the constraint and introduce an infinite loop. I would also like to point out that from a performance standpoint recursion may not be the best choice.  It is often faster to use a looping structure where possible.  Finally, one must consider the impact recursion has on the managed stack in .NET.  Basically the deeper a thread's stack becomes the more difficult it becomes for the Garbage Collector to determine what should be collected and what is still in use.&lt;img src="http://www.drowningintechnicaldebt.com/DennisBottjer/aggbug/69.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>dbottjer</dc:creator>
            <guid>http://www.drowningintechnicaldebt.com/DennisBottjer/archive/2007/07/10/thoughts-on-recursion.aspx</guid>
            <pubDate>Tue, 10 Jul 2007 10:45:00 GMT</pubDate>
            <wfw:comment>http://www.drowningintechnicaldebt.com/DennisBottjer/comments/69.aspx</wfw:comment>
            <comments>http://www.drowningintechnicaldebt.com/DennisBottjer/archive/2007/07/10/thoughts-on-recursion.aspx#feedback</comments>
            <wfw:commentRss>http://www.drowningintechnicaldebt.com/DennisBottjer/comments/commentRss/69.aspx</wfw:commentRss>
            <trackback:ping>http://www.drowningintechnicaldebt.com/DennisBottjer/services/trackbacks/69.aspx</trackback:ping>
        </item>
        <item>
            <title>Loosing ASP.NET Session State in IIS6</title>
            <link>http://www.drowningintechnicaldebt.com/DennisBottjer/archive/2007/05/09/loosing-asp.net-session-state-in-iis6.aspx</link>
            <description>&lt;p&gt;Last year we deployed a new underwriting system.  Since the Fall of 2006 we have been steadily releasing updates to the system.   Supporting the large user-base of this application has required us to improve our debugging and performance monitor skills.  For example, we have become huge fans of unit testing and made strides to better understand memory management and profiling.  To protect the health of the application we needed to understand the recycling of application pools / worker processes. 
&lt;/p&gt;&lt;p&gt;&lt;a title="http://blogs.msdn.com/david.wang/archive/2006/01/26/Thoughts-on-Application-Pool-Recycling-and-Application-Availability.aspx" href="http://blogs.msdn.com/david.wang/archive/2006/01/26/Thoughts-on-Application-Pool-Recycling-and-Application-Availability.aspx" mce_href="http://blogs.msdn.com/david.wang/archive/2006/01/26/Thoughts-on-Application-Pool-Recycling-and-Application-Availability.aspx"&gt;Thoughts on Application Pool Recycling and Application Availability&lt;/a&gt; explains in detail how IIS6 is designed to gracefully transfer client connections to the new worker process.  In general devising a health strategy and recycling application pools is a good idea.  It is a bad idea to be overly aggressive in the recycling of Application Pools.  For example, recycling an application pool every hour would be very aggressive.  If application pool recycling is required that frequently I would profile the application's memory usage to determine how garbage collection is working.  Perhaps objects aren't being disposed of in a timely manor.  It is always a good idea to create a connection or instantiate an object as late as possible and dispose of them as soon as possible.  Furthermore, forced Garbage Collection like the GC Collect method is not recommend b/c it can corrupt Garbage Collection Statistics. 
&lt;/p&gt;&lt;p&gt;When recycling an application pool for an application that maintains session state, the way in which the session state is maintained should be considered.  For example, maintaining In-Process session state will result in a loss of session state when the Application Pool is recycled.  As a result users may be forced to login to an application again. 
&lt;/p&gt;&lt;p&gt;&lt;a href="http://blogs.msdn.com/david.wang/archive/2005/09/19/Why_do_I_lose_ASP_Session_State_on_IIS6.aspx" mce_href="http://blogs.msdn.com/david.wang/archive/2005/09/19/Why_do_I_lose_ASP_Session_State_on_IIS6.aspx"&gt;Why do I lose ASP Session State on IIS6&lt;/a&gt; further explains the loss of session state when maintaining state in-process. A better strategy may be to store session state out of process.&lt;/p&gt;&lt;img src="http://www.drowningintechnicaldebt.com/DennisBottjer/aggbug/64.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>dbottjer</dc:creator>
            <guid>http://www.drowningintechnicaldebt.com/DennisBottjer/archive/2007/05/09/loosing-asp.net-session-state-in-iis6.aspx</guid>
            <pubDate>Wed, 09 May 2007 19:25:00 GMT</pubDate>
            <wfw:comment>http://www.drowningintechnicaldebt.com/DennisBottjer/comments/64.aspx</wfw:comment>
            <comments>http://www.drowningintechnicaldebt.com/DennisBottjer/archive/2007/05/09/loosing-asp.net-session-state-in-iis6.aspx#feedback</comments>
            <wfw:commentRss>http://www.drowningintechnicaldebt.com/DennisBottjer/comments/commentRss/64.aspx</wfw:commentRss>
            <trackback:ping>http://www.drowningintechnicaldebt.com/DennisBottjer/services/trackbacks/64.aspx</trackback:ping>
        </item>
        <item>
            <title>DoNotExposeGenericLists recommends Collection&amp;lt;T&amp;gt; over List&amp;lt;T&amp;gt;</title>
            <link>http://www.drowningintechnicaldebt.com/DennisBottjer/archive/2007/05/09/donotexposegenericlists-recommends-collectiont-over-listt.aspx</link>
            <description>&lt;p mce_keep="true"&gt;DoNotExposeGenericLists is a Code Analysis rule exposed within Visual Studio when List&amp;lt;T&amp;gt; is publically exposed.  For example, List&amp;lt;T&amp;gt; may be exposed through properties, methods, parameters, etc.  &lt;a class="" href="http://blogs.msdn.com/fxcop/archive/2006/04/27/585476.aspx" target="_blank" mce_href="http://blogs.msdn.com/fxcop/archive/2006/04/27/585476.aspx"&gt;Why does DoNotExposeGenericLists recommend that I expose Collection&lt;t&gt; instead of List&lt;t&gt;? [David Kean]&lt;/t&gt;&lt;/t&gt;&lt;/a&gt; explains that Collection&amp;lt;T&amp;gt; is the better choice b/c it exposes 4 overidable methods.  The methods are ClearItems, InsertItem, RemoveItem and SetItem.  Events can be raised from within these four methods to provide a notification when changes are made to the Collection.  &lt;/p&gt;&lt;img src="http://www.drowningintechnicaldebt.com/DennisBottjer/aggbug/63.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>dbottjer</dc:creator>
            <guid>http://www.drowningintechnicaldebt.com/DennisBottjer/archive/2007/05/09/donotexposegenericlists-recommends-collectiont-over-listt.aspx</guid>
            <pubDate>Wed, 09 May 2007 18:55:00 GMT</pubDate>
            <wfw:comment>http://www.drowningintechnicaldebt.com/DennisBottjer/comments/63.aspx</wfw:comment>
            <comments>http://www.drowningintechnicaldebt.com/DennisBottjer/archive/2007/05/09/donotexposegenericlists-recommends-collectiont-over-listt.aspx#feedback</comments>
            <wfw:commentRss>http://www.drowningintechnicaldebt.com/DennisBottjer/comments/commentRss/63.aspx</wfw:commentRss>
            <trackback:ping>http://www.drowningintechnicaldebt.com/DennisBottjer/services/trackbacks/63.aspx</trackback:ping>
        </item>
        <item>
            <title>Web Services and UTF8Encoded ByteArrays</title>
            <link>http://www.drowningintechnicaldebt.com/DennisBottjer/archive/2007/05/01/web-services-utf8encoded-bytearrays.aspx</link>
            <description>&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;Our business partner began reporting all bullet points were being converted to question marks during the archiving of Word Docs.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;An early hunch that perhaps our FTP component was defaulting to ASCII transfer mode instead of Binary proved incorrect.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;With this option ruled out we knew our electronic document repository was properly receiving both the control file and the Word Doc.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;We began to suspect the web service exposed by our application which returns a document and metadata for archiving.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;We were using a byte array to store, in this case, the word document and write it to the http response stream.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;However, we were not specifying the encoding type which was our fatal mistake.&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt" mce_keep="true"&gt;&lt;span class="lnum" /&gt; &lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt" mce_keep="true"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;StringWriter sw = &lt;span class="kwrd"&gt;new&lt;/span&gt; StringWriter();&lt;/p&gt;
&lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;XmlTextWriter xw = &lt;span class="kwrd"&gt;new&lt;/span&gt; XmlTextWriter(sw);&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt; &lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;&lt;span class="rem"&gt;// Save Approval Document to Text Writter.&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;doc.WriteTo(xw);&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt; &lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;&lt;span class="rem"&gt;// Added this line to specify encoding and resolve bullet point issue.&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;UTF8Encoding encoding = &lt;span class="kwrd"&gt;new&lt;/span&gt; UTF8Encoding();&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt; &lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;&lt;span class="rem"&gt;// Convert Approval Document To Byte Array.&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;&lt;span class="kwrd"&gt;byte&lt;/span&gt;[] docAsBytes = encoding.GetBytes(sw.ToString());&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt; &lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;vvDoc.FileBinary = docAsBytes;&lt;/pre&gt;&lt;/div&gt;&lt;img src="http://www.drowningintechnicaldebt.com/DennisBottjer/aggbug/60.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>dbottjer</dc:creator>
            <guid>http://www.drowningintechnicaldebt.com/DennisBottjer/archive/2007/05/01/web-services-utf8encoded-bytearrays.aspx</guid>
            <pubDate>Tue, 01 May 2007 10:06:00 GMT</pubDate>
            <wfw:comment>http://www.drowningintechnicaldebt.com/DennisBottjer/comments/60.aspx</wfw:comment>
            <comments>http://www.drowningintechnicaldebt.com/DennisBottjer/archive/2007/05/01/web-services-utf8encoded-bytearrays.aspx#feedback</comments>
            <wfw:commentRss>http://www.drowningintechnicaldebt.com/DennisBottjer/comments/commentRss/60.aspx</wfw:commentRss>
            <trackback:ping>http://www.drowningintechnicaldebt.com/DennisBottjer/services/trackbacks/60.aspx</trackback:ping>
        </item>
    </channel>
</rss>