<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://billrob.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>Bill Robertson&amp;#39;s Blog</title><link>http://billrob.com/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Password Protect Staging Sites IIS7</title><link>http://billrob.com/archive/2011/08/29/password-protect-staging-sites-iis7.aspx</link><pubDate>Tue, 30 Aug 2011 01:44:00 GMT</pubDate><guid isPermaLink="false">8b1d07c6-e0f0-4f83-95e2-70212e46c249:50598</guid><dc:creator>Bill Robertson</dc:creator><slash:comments>438</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://billrob.com/rsscomments.aspx?PostID=50598</wfw:commentRss><comments>http://billrob.com/archive/2011/08/29/password-protect-staging-sites-iis7.aspx#comments</comments><description>&lt;a href="http://apidocs.groupcommerce.com/" style="visibility:hidden"&gt;group commerce api documentation&lt;/a&gt;
&lt;p&gt;If you have a website you are ready to launch and still want some client feedback on it and want to keep pesky search indexes away it is easiest to give a user/pass to your client for them to look at it.&amp;nbsp; Perhaps it is on a staging domain, yes there is the robots=”no follow”, but sometimes you really want the staging site to be private.&lt;/p&gt;
 
&lt;p&gt;With IIS 6 you would set forms authentication in your web.config and go into IIS and turn off anonymous authentication and bind it to a windows user account.&amp;nbsp; This worked well, although a little time consuming setting up the account, permissions, password management, however, one of the consequences of the tighter integration with the .net runtime and IIS was the loss of the ability to have both password protect and forms authentication on a site.&amp;nbsp; For a variety of reasons this makes sense.&lt;/p&gt;
 
&lt;p&gt;Included is an HttpModule that will enable you to quickly password protect a site and still retain all the forms authentication behavior.&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;appSettings&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;add&lt;/span&gt; &lt;span class="attr"&gt;key&lt;/span&gt;&lt;span class="kwrd"&gt;="br-username"&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;="bob"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;add&lt;/span&gt; &lt;span class="attr"&gt;key&lt;/span&gt;&lt;span class="kwrd"&gt;="br-password"&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;="sally"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;appSettings&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
/.../
&lt;span class="rem"&gt;&amp;lt;!--this second is defined here for cassini--&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;httpModules&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;add&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;="PasswordProtect"&lt;/span&gt; 
         &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;="BillRob.Web.PasswordProtectHttpModule, BillRob.Web"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
/.../
&lt;span class="rem"&gt;&amp;lt;!-- this section is for iis 7 --&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;modules&lt;/span&gt; &lt;span class="attr"&gt;runAllManagedModulesForAllRequests&lt;/span&gt;&lt;span class="kwrd"&gt;="true"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;add&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;="PasswordProtect"&lt;/span&gt; 
         &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;="BillRob.Web.PasswordProtectHttpModule, BillRob.Web"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;p&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;
And add a reference to BillRob.Web.&amp;nbsp; The HttpModule itself is very basic, it hooks the BeginRequest, as to not interfere with any other processing.&amp;nbsp; If the password app settings are defined, it will check the Authorization header of the incoming request and check it against a basic digest hash.&amp;nbsp; (Does anyone see how unsecured this process is?)&amp;nbsp; All modern browsers support this type of WWW-Authenticate header.&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;if&lt;/span&gt; (!String.IsNullOrEmpty(username) &amp;amp;&amp;amp; !String.IsNullOrEmpty(password))
{
    var data = String.Format(&lt;span class="str"&gt;"{0}:{1}"&lt;/span&gt;, username, password);
    var correctHeader = &lt;span class="str"&gt;"Basic "&lt;/span&gt; + 
          Convert.ToBase64String(Encoding.UTF8.GetBytes(data));
    &lt;span class="kwrd"&gt;string&lt;/span&gt; securityString = request.Headers[&lt;span class="str"&gt;"Authorization"&lt;/span&gt;];
    &lt;span class="kwrd"&gt;if&lt;/span&gt; (securityString == &lt;span class="kwrd"&gt;null&lt;/span&gt;)
        &lt;span class="kwrd"&gt;goto&lt;/span&gt; forceRedirect;
    &lt;span class="kwrd"&gt;if&lt;/span&gt; (securityString != correctHeader)
        &lt;span class="kwrd"&gt;goto&lt;/span&gt; forceRedirect;
&lt;/pre&gt;&lt;pre class="csharpcode"&gt;    &lt;span class="kwrd"&gt;return&lt;/span&gt;;
forceRedirect:
    var host = request.Url.Host.ToLower();
    response.AddHeader(&lt;span class="str"&gt;"WWW-Authenticate"&lt;/span&gt;, 
		String.Format(&lt;span class="str"&gt;@"Basic realm="&lt;/span&gt;&lt;span class="str"&gt;"{0}"&lt;/span&gt;&lt;span class="str"&gt;""&lt;/span&gt;, host));
    response.StatusCode = 401;
    response.End();
}
&lt;/pre&gt;
&lt;p&gt;Yeah, that’s right, I used a goto statement.  Here is a zip of the full sample application and a prebuilt assembly.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://billrob.com/images/brobertson/PasswordProtectSites_798DD97D.rar" mce_href="http://billrob.com/images/brobertson/PasswordProtectSites_798DD97D.rar" target="_self"&gt;PasswordProtectSites.rar&lt;/a&gt;&lt;/p&gt;&lt;p&gt;I've added this as a GitHub repo.&amp;nbsp; &lt;a href="https://github.com/billrob/billrob-web" mce_href="https://github.com/billrob/billrob-web"&gt;https://github.com/billrob/billrob-web &lt;/a&gt;&lt;br&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:F60BB8FA-6F02-4999-8F5E-9DD4E92C4DA7:cd3830e7-5bbe-4da5-97c8-a61f1c119c74" class="wlWriterEditableSmartContent"&gt;&lt;/div&gt;
&lt;img src="http://billrob.com/aggbug.aspx?PostID=50598" width="1" height="1"&gt;</description></item><item><title>Replace Spaces With Tabs</title><link>http://billrob.com/archive/2011/04/21/replace-spaces-with-tabs.aspx</link><pubDate>Thu, 21 Apr 2011 05:14:00 GMT</pubDate><guid isPermaLink="false">8b1d07c6-e0f0-4f83-95e2-70212e46c249:45866</guid><dc:creator>Bill Robertson</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Our code base was diverging with tab people and space people and it needed to be addressed.&amp;nbsp; It can be quite dramatic having the “tabs vs spaces” developer discussions.&amp;nbsp; If the discussion is at a post conference bar trip, you can name call, insult, belittle the opposite position.&amp;nbsp; When this comes up at work it is vitally important the goal is to have consistency&lt;/p&gt;  &lt;p&gt;We had a team meeting about it and the vote came down to 4v4 with some abstainers. We decided the vote with the only way reasonable people can to resolve things.&amp;nbsp; We all bowed our heads and prayed to the Almighty God--&lt;/p&gt;  &lt;p&gt;Of course not.&amp;nbsp; I said reasonable people.&amp;nbsp; We decided via paper-rock-scissors.&amp;nbsp; It was a tie the first round.&amp;nbsp; Both sides regrouped and finished dramatically with 2 wrapping defeats of spaces versus tabs.&lt;/p&gt;  &lt;p&gt;Having proved the superiority of the tab argument, it came time to decide who would go in and standardize the code base.&amp;nbsp; I fell on that grenade because I was the one that pulled the pin.&lt;/p&gt;  &lt;p&gt;Tabify was mentioned.&amp;nbsp; I did some bing searches, installed Visual Studio Power Tools, found the tabify, found out it doesn’t do the whole project.&amp;nbsp; Wasted effort.&amp;nbsp; Then realized it messed with all my studio settings for keyboard code navigation and ( ) { } autocompletion spacing.&amp;nbsp; Took another 30 minutes to uninstall, settings partially restored, had to go find an old settings backup file.&amp;nbsp; Jesus&lt;/p&gt;  &lt;p&gt;Pulled out my trusty console application and wrote a console utility to do it.&amp;nbsp; I’ve attached the code and it is pretty simple to follow along.&lt;/p&gt;  &lt;p&gt;Good luck with your future tabs vs spaces troubles and I hope this helps anyone who is facing this same issue.&amp;nbsp; This will also convert from tabs back to spaces.&lt;/p&gt;  &lt;p&gt;&amp;nbsp;&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:F60BB8FA-6F02-4999-8F5E-9DD4E92C4DA7:ecc0fb46-80cb-48da-bf4d-3f65179f8088" class="wlWriterEditableSmartContent"&gt;&lt;div&gt;&lt;a href="http://billrob.com/images/brobertson/AllFilesInARecursiveDirectoryTreeReplaceSpacesWithTabs_2D537C31.rar" mce_href="http://billrob.com/images/brobertson/AllFilesInARecursiveDirectoryTreeReplaceSpacesWithTabs_2D537C31.rar" target="_self"&gt;AllFilesInARecursiveDirectoryTreeReplaceSpacesWithTabs.rar&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://billrob.com/aggbug.aspx?PostID=45866" width="1" height="1"&gt;</description></item><item><title>Happy 21th Chad Starkey</title><link>http://billrob.com/archive/2010/07/21/happy-21th-chad-starkey.aspx</link><pubDate>Wed, 21 Jul 2010 20:02:00 GMT</pubDate><guid isPermaLink="false">8b1d07c6-e0f0-4f83-95e2-70212e46c249:43006</guid><dc:creator>Bill Robertson</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I wrote the following eulogy years ago when my brother, &lt;a href="http://chadstarkey.com" mce_href="http://chadstarkey.com" target="_blank"&gt;Chad&lt;/a&gt;, was misdiagnosed by &lt;a href="http://www.wellness.com/dir/1846186/family-doctor/tx/highland-village/john-m-tilley-md" mce_href="http://www.wellness.com/dir/1846186/family-doctor/tx/highland-village/john-m-tilley-md" target="_blank"&gt;John Tilley&lt;/a&gt; of &lt;a href="http://www.healthgrades.com/directory_search/physician/profiles/dr-md-reports/dr-john-tilley-md-dd4f9473" mce_href="http://www.healthgrades.com/directory_search/physician/profiles/dr-md-reports/dr-john-tilley-md-dd4f9473" target="_blank"&gt;Phoenix Associates&lt;/a&gt; in Flower Mound.&amp;nbsp; He went to see the doctor Friday complaining of stomach pains.&amp;nbsp; The doctor examined him and sent him with medicine for a stomach virus.&amp;nbsp; He went to sleep that evening to get doctor ordered rest. During the night his appendix ruptured and was found dead the next morning.&amp;nbsp; He was 14 years old.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;I was 11 when Chad was born.&amp;nbsp; I thought it was so awesome to have a brother that much younger.&amp;nbsp; I already had tying shoes all figured out when it was time to teach him.&amp;nbsp; Reading was covered. Multiplication tables all memorized.&amp;nbsp; I taught him that Might is Right when it comes to rough housing and fighting.&amp;nbsp; I wanted to teach him about being a catcher and pitcher.&amp;nbsp; I was waiting to teach him about computer programming.&amp;nbsp; Jimmy and I both were counting the days to teach him about mischief, but from what I have heard, he had that one figured out already.&amp;nbsp; And girls.&amp;nbsp; This year for Christmas I bought him a blue etch a sketch.&amp;nbsp; I told him it would come in handy when his girlfriend wanted to talk, because you girls love to talk on the phone. &lt;/p&gt;    &lt;p&gt;Last night I during my dazed wandering among his scores of scores of friends, I began to see my brother’s life through their eyes.&amp;nbsp; I heard words such as “he always made me laugh”, “he was so nice”, “he never said anything mean about anyone”.&amp;nbsp; Much, much more was said through the awkward postures, the tearful embraces, seeing tough boys become real men, and the genuine pain I saw in your eyes. &lt;/p&gt;    &lt;p&gt;I knew my brother was loved by me, but it was incredible witnessing how truly loved and respected he is by so many.&amp;nbsp; He has verily touched each and every one of us with his sparkling eyes, his infectious smile and his simple love of life.&amp;nbsp; Chad was quickly becoming the greatest man I know.&amp;nbsp; He has acquired more sincere and caring friends in his remarkable 14 years than I will in my entire life. &lt;/p&gt;    &lt;p&gt;It’s been said to me many times that Chad has gone to a better place.&amp;nbsp; But he hasn’t gone anywhere.&amp;nbsp; He came into my heart on July 21, 1989 at 5 in the morning with Jimmy and me sleeping shoulder to shoulder on the hospital floor.&amp;nbsp; And he will abide in my heart until I join him again…and there, Chad, you will be my teacher.&lt;/p&gt;&lt;/blockquote&gt;&lt;img src="http://billrob.com/aggbug.aspx?PostID=43006" width="1" height="1"&gt;</description></item><item><title>Unfuddle SVN Power Commands</title><link>http://billrob.com/archive/2010/05/11/unfuddle-svn-power-commands.aspx</link><pubDate>Tue, 11 May 2010 06:20:00 GMT</pubDate><guid isPermaLink="false">8b1d07c6-e0f0-4f83-95e2-70212e46c249:41982</guid><dc:creator>Bill Robertson</dc:creator><slash:comments>3</slash:comments><description>&lt;p&gt;Came across this digging into &lt;a href="http://unfuddle.com" mce_href="http://unfuddle.com" target="_blank"&gt;unfuddle&lt;/a&gt; tonight.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://unfuddle.com/docs/topics/powerful_commit_messages" mce_href="http://unfuddle.com/docs/topics/powerful_commit_messages"&gt;http://unfuddle.com/docs/topics/powerful_commit_messages&lt;/a&gt;&lt;/p&gt;&lt;p&gt;I've always known about #40 creating a change set.&amp;nbsp; I found tonight that entering a checkin comment of: &lt;br&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;resolves #40 Fixed spacing on the email line.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Will resolve ticket number 40 it and document it more fully in one step.&amp;nbsp; No more going to the website and filling it out twice.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://billrob.com/images/brobertson/image_51D982D1.png" mce_href="http://billrob.com/images/brobertson/image_51D982D1.png"&gt;&lt;img src="http://billrob.com/images/brobertson/image_thumb_7C45B3EE.png" style="border: 0px none; display: inline;" title="image" alt="image" mce_src="http://billrob.com/images/brobertson/image_thumb_7C45B3EE.png" border="0" height="229" width="312"&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;p&gt;There are assign commands a couple others.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;resolve #26     &lt;br&gt;assign #25 &amp;amp; #26 to alex&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Will resolve one tickets and assign both of them to alex.&amp;nbsp; Nice trick if you’ven’t seen it.&lt;/p&gt;&lt;img src="http://billrob.com/aggbug.aspx?PostID=41982" width="1" height="1"&gt;</description></item><item><title>DataContractSerializer Converting Objects to Xml String</title><link>http://billrob.com/archive/2010/02/09/datacontractserializer-converting-objects-to-xml-string.aspx</link><pubDate>Tue, 09 Feb 2010 23:19:00 GMT</pubDate><guid isPermaLink="false">8b1d07c6-e0f0-4f83-95e2-70212e46c249:41089</guid><dc:creator>Bill Robertson</dc:creator><slash:comments>6</slash:comments><description>&lt;p&gt;This isn't so much a post as a place I could put a common pattern of code.&amp;nbsp; .NET 3.5 introduced the 10th or 12th iteration of a serializer.&amp;nbsp; I've stopped to look up this pattern many times and wanted to put a quick sample up with the serialize and deserialize pattern for xml to object mapping.&lt;/p&gt;  &lt;p&gt;This will turn the tempData object into an xml string.&lt;/p&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;     &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; var serializer = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; DataContractSerializer(tempData.GetType());&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; (var backing = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; System.IO.StringWriter())&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; (var writer = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; System.Xml.XmlTextWriter(backing))&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt;     serializer.WriteObject(writer, tempData);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt;     data.XmlData = backing.ToString();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt;   7:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;This will return a full object.&amp;nbsp; This instance is using a generic based approach.&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; var serializer = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; DataContractSerializer(&lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(T));&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; (var backing = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; System.IO.StringReader(data.XmlData))&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; (var reader = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; System.Xml.XmlTextReader(backing))&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; serializer.ReadObject(reader) &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; T;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;
If there are actual questions about this and how to use it post it below and I might put together a real post about this.&lt;img src="http://billrob.com/aggbug.aspx?PostID=41089" width="1" height="1"&gt;</description></item><item><title>Killing Windows Live Messenger Photo Share "Feature"</title><link>http://billrob.com/archive/2009/10/13/killing-windows-live-messenger-photo-share-quot-feature-quot.aspx</link><pubDate>Wed, 14 Oct 2009 01:13:00 GMT</pubDate><guid isPermaLink="false">8b1d07c6-e0f0-4f83-95e2-70212e46c249:40317</guid><dc:creator>Bill Robertson</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;(This post applies to version 14.0.8089.726)&lt;/p&gt;  &lt;p&gt;Several versions ago windows live messenger decided it would be best to make the photo sending experience horrible.&amp;nbsp; If you want “attachment” based functionality where you can actual open, see it, zoom, basically make the image sent usable, the windows live team decided it wasn't going to support it anymore.&lt;br&gt;&lt;/p&gt;  &lt;p&gt;I’m only putting this post together so I can quickly send people who are complaining about it to fix it on their machines.&amp;nbsp; The following posts give a full explanation.&lt;/p&gt;  &lt;p&gt;This is the &lt;a href="http://www.withinwindows.com/2009/04/18/photo-sharing-feature-in-live-messenger-kill-it-dead/" mce_href="http://www.withinwindows.com/2009/04/18/photo-sharing-feature-in-live-messenger-kill-it-dead/" target="_blank"&gt;best resource&lt;/a&gt;, but only works for older versions.&lt;/p&gt;  &lt;p&gt;This covers the new version, but he only provided &lt;a href="http://www.cerb3ruz.com/" mce_href="http://www.cerb3ruz.com/" target="_blank"&gt;his site&lt;/a&gt; and not the post url, so you might have to dig for it.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Completely exit Microsoft Messenger&lt;/li&gt;    &lt;li&gt;Download &lt;a href="http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm#download" mce_href="http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm#download" target="_blank"&gt;XVI32&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;With XVI32, open c:\Program Files\Windows Live\Messenger\msnmsgr.exe&lt;br&gt;&lt;/li&gt;    &lt;li&gt;Browse in file to location: 0×164118&lt;/li&gt;    &lt;li&gt;Change the Hex Code “74” to “EB”&lt;/li&gt;    &lt;li&gt;Close the program and save the file.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;or&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://billrob.com/dl/msnmsgr.rar" mce_href="http://billrob.com/dl/msnmsgr.rar"&gt;Download&lt;/a&gt; this fixed version. ONLY version 14.0.8089.726&lt;/li&gt;    &lt;li&gt;Put in path C:\Program Files\Windows Live\Messenger&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Luckily this seems to fix even when people without the fix send files and they come in correctly.&lt;/p&gt;&lt;img src="http://billrob.com/aggbug.aspx?PostID=40317" width="1" height="1"&gt;</description></item><item><title>MVC Spaghetti Code</title><link>http://billrob.com/archive/2009/08/18/mvc-spaghetti-code.aspx</link><pubDate>Wed, 19 Aug 2009 03:12:00 GMT</pubDate><guid isPermaLink="false">8b1d07c6-e0f0-4f83-95e2-70212e46c249:39488</guid><dc:creator>Bill Robertson</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Some professional background info first.&amp;nbsp; I started my tech career as a network technician setting up networks and hardware support.&amp;nbsp; I was interested in programming back in 1997 (actually 321 Contact magazine on a Commodore 64) and it seemed back then, web was the way of the future.&amp;nbsp; I spent a week working on an asp (classic) project and knowing c++ just couldn’t stand the unstructured syntax for rendering the pages.&amp;nbsp; I left IT to go back to grocery stores.&lt;br&gt;&lt;/p&gt;  &lt;p&gt;I’ve been on this MVC project for 6 weeks now. I making progress and learning exactly what it behind the idea.&amp;nbsp; Simply put, your Controllers are the CodeBehind for your pages.&amp;nbsp; Rather than have one code file for each page, you have one code file for a plethora of “Views”.&amp;nbsp; I really don’t care.&amp;nbsp; A View is simply a page and changing the name doesn’t mean squat. &lt;/p&gt;  &lt;p&gt;I am going with it and working within the framework they provide, but had to post how ugly this code was.&amp;nbsp; Remember, I avoided classic asp because of the slaughtering of readability.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://billrob.com/images/brobertson/alt_2FC9CE67.jpg" mce_href="http://billrob.com/images/brobertson/alt_2FC9CE67.jpg"&gt;&lt;img src="http://billrob.com/images/brobertson/alt_thumb_750746F2.jpg" title="alt" style="border: 0px none; display: inline;" alt="alt" mce_src="http://billrob.com/images/brobertson/alt_thumb_750746F2.jpg" border="0" width="770" height="252"&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;I just wanted to alternate the style on table rows.&amp;nbsp; I admit the &amp;lt;%= ip.AttemptedCount %&amp;gt; is worlds better than &amp;lt;% Eval( “AttemptedCount”) %&amp;gt;. The “.ToShortDateString” is better than googling (or binging) the string format codes.&amp;nbsp; But seriously, this is the default formatting for the code.&amp;nbsp; I’m confident there is a more readable way to do this.&lt;/p&gt;&lt;p&gt;I want to also add that intellisense is the greatest developer tool created by Microsoft and even that is failing in this situation.&amp;nbsp; I'd almost rather turn off the validation for this type of logic when it is inside a funky script block.&amp;nbsp; I highly tout intellisense and has enabled me to become a better developer around self discovery of code and sure beats the hell out of looking in a book, which is where I started before the web really took off. &lt;br&gt;&lt;/p&gt;  &lt;p&gt;You can lecture me about HtmlHelper extension methods, and I’ll accept that, but seriously, this doesn’t seem to be that crazy of an idea: let’s alternate the style on the table rows.&lt;/p&gt;  &lt;p&gt;I’ll take any advice to make this more readable, but why abandon the entire idea of server controls.&amp;nbsp; Extracting this type of functionality is what makes server controls so much better than dryly rendering basic html.&lt;/p&gt;&lt;img src="http://billrob.com/aggbug.aspx?PostID=39488" width="1" height="1"&gt;</description></item><item><title>Asp.net MVC Without SessionState</title><link>http://billrob.com/archive/2009/07/15/asp-net-mvc-without-sessionstate.aspx</link><pubDate>Wed, 15 Jul 2009 17:32:00 GMT</pubDate><guid isPermaLink="false">8b1d07c6-e0f0-4f83-95e2-70212e46c249:38942</guid><dc:creator>Bill Robertson</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;When writing my first real MVC application, I instinctively turned off SessionState in the web.config.&lt;/p&gt;  &lt;div&gt;   &lt;div style="border-style: none; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"&gt;     &lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;sessionState&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;mode&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="Off"&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
  &lt;/div&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;
When I started the application I received this error:&lt;/div&gt;

&lt;h4&gt;&lt;i&gt;The SessionStateTempDataProvider requires SessionState to be enabled.&lt;/i&gt;&lt;/h4&gt;

&lt;p&gt;I crawled into it further and MVC by default requires SessionState for one type of ActionResult.&amp;nbsp; There is the concept of TempData in MVC where you can load some data, perform a redirect, and the temp data will be there on the next request.&amp;nbsp; Using TempData across web requests is a solution for keeping data across the stateless nature of the web.&lt;/p&gt;

&lt;p&gt;The application I’m writing will be hosted in a Farm.&amp;nbsp; I know there are solutions for using session state across the farm, primarily through SqlStateServer or setting sticky sessions on the load balancer machines.&amp;nbsp; However, even sticky sessions won’t work for me because I like the ability to take a server out of rotation and it not affect my users.&lt;/p&gt;

&lt;p&gt;The workaround is simply to create your own ITempDataProvider and attach it to your controller.&amp;nbsp; The ITempDataProvider has two methods: LoadTempData and SaveTempData.&amp;nbsp; Here is my implementation of ITempDataProvider I use now.&lt;/p&gt;

&lt;div&gt;
  &lt;div style="border-style: none; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"&gt;
    &lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;class&lt;/span&gt; NoTempDataProvider : ITempDataProvider&lt;/pre&gt;

    &lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"&gt;{&lt;/pre&gt;

    &lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"&gt;    &lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; IDictionary&amp;lt;&lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;, &lt;span style="color: rgb(0, 0, 255);"&gt;object&lt;/span&gt;&amp;gt; LoadTempData(ControllerContext controllerContext)&lt;/pre&gt;

    &lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"&gt;    {&lt;/pre&gt;

    &lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"&gt;        &lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; Dictionary&amp;lt;&lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;, &lt;span style="color: rgb(0, 0, 255);"&gt;object&lt;/span&gt;&amp;gt;();&lt;/pre&gt;

    &lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"&gt;    }&lt;/pre&gt;

    &lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"&gt;&amp;nbsp;&lt;/pre&gt;

    &lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"&gt;    &lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;void&lt;/span&gt; SaveTempData(ControllerContext controllerContext, IDictionary&amp;lt;&lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;, &lt;span style="color: rgb(0, 0, 255);"&gt;object&lt;/span&gt;&amp;gt; values)&lt;/pre&gt;

    &lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"&gt;    {&lt;/pre&gt;

    &lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"&gt;        &lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt; ( values.Count != 0 )&lt;/pre&gt;

    &lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"&gt;            &lt;span style="color: rgb(0, 0, 255);"&gt;throw&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; NotImplementedException(&lt;span style="color: rgb(0, 96, 128);"&gt;"Can not set tempdata, no session state available"&lt;/span&gt;);&lt;/pre&gt;

    &lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"&gt;    }&lt;/pre&gt;

    &lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"&gt;}&lt;/pre&gt;
  &lt;/div&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;The Load method just returns an empty collection.&amp;nbsp; The Save method won’t do anything either.&amp;nbsp; However, you’ll notice the save method checks to make sure the framework doesn't try to persist any state.&amp;nbsp; If so, it will blow up, letting your developers know this isn’t supported.&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;Of course you can just create your own base Controller that you can use
in your application; this sample is using the MVC Sample Application,
AccountController. Now you have to wire this new provider to the controller, line 5:&amp;nbsp; &lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;
  &lt;div style="border-style: none; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"&gt;
    &lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"&gt;&lt;span style="color: rgb(96, 96, 96);"&gt;   1:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; AccountController(IFormsAuthentication formsAuth, IMembershipService service)&lt;/pre&gt;

    &lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(96, 96, 96);"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"&gt;&lt;span style="color: rgb(96, 96, 96);"&gt;   3:&lt;/span&gt;     FormsAuth = formsAuth ?? &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; FormsAuthenticationService();&lt;/pre&gt;

    &lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(96, 96, 96);"&gt;   4:&lt;/span&gt;     MembershipService = service ?? &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; AccountMembershipService();&lt;/pre&gt;

    &lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"&gt;&lt;span style="color: rgb(96, 96, 96);"&gt;   5:&lt;/span&gt;     &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.TempDataProvider = &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; NoTempDataProvider();&lt;/pre&gt;

    &lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(96, 96, 96);"&gt;   6:&lt;/span&gt; }&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;





&lt;div&gt;&amp;nbsp; &lt;br&gt;&lt;/div&gt;

&lt;div&gt;If you decide you need some sort of TempData storage you can just process the data in the Load/Save methods and use your own custom data storage.&amp;nbsp; I’m hoping to not need this as I move forward in this application.&lt;/div&gt;&lt;img src="http://billrob.com/aggbug.aspx?PostID=38942" width="1" height="1"&gt;</description></item><item><title>Human Interaction Amazes Me</title><link>http://billrob.com/archive/2009/04/06/human-interaction-amazes-me.aspx</link><pubDate>Tue, 07 Apr 2009 03:19:00 GMT</pubDate><guid isPermaLink="false">8b1d07c6-e0f0-4f83-95e2-70212e46c249:36726</guid><dc:creator>Bill Robertson</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Sorry all for the bad photo, you could read it on my iphone, but when I uploaded it, it horribly mangled the photo.&amp;nbsp; Here is how it looked on my phone. with an transcription below.&lt;/p&gt;  &lt;p&gt;I also realized my neighbor’s name was on the paper. However, I wanted to give those interested the story, and get around to writing another blog post.&amp;nbsp; That gets Windows Live Writer in my recent when I click start and should “hint” me to remember.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://billrob.com/images/brobertson/photo_7329AD7D.jpg" mce_href="http://billrob.com/images/brobertson/photo_7329AD7D.jpg"&gt;&lt;img src="http://billrob.com/images/brobertson/photo_thumb_26F1A3CF.jpg" title="photo" style="border-width: 0px; display: inline;" alt="photo" mce_src="http://billrob.com/images/brobertson/photo_thumb_26F1A3CF.jpg" border="0" height="635" width="367"&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;p&gt;Dear Neighbors&lt;/p&gt;  &lt;p&gt;Whoever “took” my newspaper, I would appreciate if you would have allowed me to read it before you.&lt;/p&gt;  &lt;p&gt;You are welcome to knock on my door and I would gladly give it to you, however, only after I’ve had the change to peruse it first.&lt;/p&gt;&lt;img src="http://billrob.com/aggbug.aspx?PostID=36726" width="1" height="1"&gt;</description></item><item><title>Goto Statements</title><link>http://billrob.com/archive/2009/01/21/goto-statements.aspx</link><pubDate>Wed, 21 Jan 2009 23:15:00 GMT</pubDate><guid isPermaLink="false">8b1d07c6-e0f0-4f83-95e2-70212e46c249:34867</guid><dc:creator>Bill Robertson</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;I've been quietly lobbying to my programmer friends about the utility of using the old "goto" keyword.&amp;nbsp; I've gotten a little push back from them, mostly dismissive scorn, but hey, not everyone can be good.&amp;nbsp; :) I should start a series on this and this will serve as my first post on the glories of GOTO.&lt;/p&gt;  &lt;p&gt;The other day I posted a twitter image showing a good case of a goto statement.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://billrob.com/images/brobertson/WindowsLiveWriter/GotoStatements_100D6/goodgoto_2.jpg" mce_href="http://billrob.com/images/brobertson/WindowsLiveWriter/GotoStatements_100D6/goodgoto_2.jpg"&gt;&lt;img src="http://billrob.com/images/brobertson/WindowsLiveWriter/GotoStatements_100D6/goodgoto_thumb.jpg" style="border-width: 0px;" alt="goodgoto" mce_src="http://billrob.com/images/brobertson/WindowsLiveWriter/GotoStatements_100D6/goodgoto_thumb.jpg" border="0" width="517" height="205"&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;  &lt;p&gt;This is a utility method I use when parsing Xml documents into objects.&amp;nbsp; I received some push back from this specific twitter, mainly from my friend @&lt;a href="http://twitter.com/gbattle" mce_href="http://twitter.com/gbattle"&gt;gbattle&lt;/a&gt;.&amp;nbsp; The requirements I gave to Greg were: "no nested if's, no multiple exits, no unnecessary object assignments and better error explanation"&lt;/p&gt;  &lt;p&gt;He &lt;a href="http://leftovertakeout.com/post/71068415/the-perfect-wild-goto-statement" mce_href="http://leftovertakeout.com/post/71068415/the-perfect-wild-goto-statement"&gt;posted about his code&lt;/a&gt; for doing the same thing without using gotos.&amp;nbsp; There were a couple points where he was incorrect, and I wanted to walk through his post.&amp;nbsp; I start trivially and then increase for performance and readability.&amp;nbsp; He still made his points regardless of the library being used.&amp;nbsp; There was only one point, property accessing, that does behave different in .NET than say C++.&lt;/p&gt;  &lt;p&gt;I will accept from Greg that breaking down each error condition into exactly what caused the specific failure might be better, but on a utility method like this, if I can wrap up the failure condition into a single statement be accurate, I'm fine with it.&amp;nbsp; "Node should have one child CDATA section with data."&amp;nbsp; Sure, specifically telling the user which 3 words of the all inclusive error might be better, but any software dev that can't follow that error message and look at the node that caused the failure, prolly should not be programing anyway.&lt;br&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;// For style reasons, I always put the constant on the lhs within an if statement      &lt;br&gt;// for the compiler to automatically discover nasty undesired assignment errors       &lt;br&gt;if (1 != node.ChildNodes.Count)&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I understand the sentiment of the lhs positioning of constants, and in my c++ days, I was an advocate of his pattern; however in .NET it is an error to do an assignment in an IF evaluator.&amp;nbsp; (Which was extremely frustrating starting out because I &lt;i&gt;wanted&lt;/i&gt; to do it sometimes)&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;// There is no reason for you to create a new XmlNode return the value.      &lt;br&gt;// You waste time creating a new object and the assignment. Not needed.       &lt;br&gt;XmlNode dataNode = node.FirstChild;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;The assignment operator doesn't create a new object.&amp;nbsp; It creates a pointer to the return object of calling property FirstChild.&amp;nbsp; Creating a pointer to a Property result is the fastest way to access the property when you are accessing it more than once.&amp;nbsp; When loading an property it first must resolve the memory location of the containing object, then look into its method offset table, calling the accessor (get) method, which walks more memory offsets, to return an object.&amp;nbsp; Rather than repeatedly calling the Property (get method) I store the results in a stack variable pointer to the actual data returned by the Property call.&amp;nbsp; (I'm ignoring the code inlining that &lt;i&gt;might&lt;/i&gt; occur at run time, but that doesn't meet the speed of storing the reference locally)&lt;/p&gt;  &lt;p&gt;Now the money shot for why gotos are good in this situation is something in his code he did not account for.&amp;nbsp; When he is checking the number of ChildNodes off the parent node, if it comes out to zero, he has opened his code up for a NullReferenceException.&amp;nbsp; If ChildNodes.Count == 0, then FirstChild will be null.&amp;nbsp; Checking FirstChild.Value when first child is null will result in an exception.&amp;nbsp; And here lies the nested if statements that I'm trying to avoid.&lt;/p&gt;  &lt;p&gt;If the ChildNodes.Count property is 0 (or negatively not 1, the actual node count we are looking for), then you must branch this utility method into either a quick return or a nested if statement that continues checking the validity of the XmlNode when there are the correct number of ChildNodes.&lt;/p&gt;&lt;img src="http://billrob.com/aggbug.aspx?PostID=34867" width="1" height="1"&gt;</description></item><item><title>NYC January Code Camp and the Large Object Heap</title><link>http://billrob.com/archive/2009/01/13/nyc-january-code-camp-and-the-large-object-heap.aspx</link><pubDate>Tue, 13 Jan 2009 16:29:00 GMT</pubDate><guid isPermaLink="false">8b1d07c6-e0f0-4f83-95e2-70212e46c249:34771</guid><dc:creator>Bill Robertson</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I presented my Garbage Collection/Memory Management talk this last weekend at the NYC Code Camp at the Microsoft Office.&amp;nbsp; I had a great time and it was enjoyable catching up with old friends and meeting new people.&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:dc03f905-92ed-4709-88b5-ffa27a79f7c6" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;p&gt; &lt;a href="http://billrob.com/images/brobertson/WindowsLiveWriter/NYCJanuaryCodeCampandtheLargeObjectHeap_9E6E/Garbage%20Collection%201.1.rar" mce_href="http://billrob.com/images/brobertson/WindowsLiveWriter/NYCJanuaryCodeCampandtheLargeObjectHeap_9E6E/Garbage%20Collection%201.1.rar" target="_blank"&gt;Attached is the slides and code samples.&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;  &lt;p&gt;To the gentlemen who was asking about the Large Object Heap and DataSets.&amp;nbsp; A DataSet will not be placed on the LOH.&amp;nbsp; A value of a DataColumn instance might be placed there, but the DataSet itself has a footprint much smaller than the 85 K size required to be placed there.&lt;/p&gt;  &lt;p&gt;The Large Object Heap is a heap structure used by .net to allocate large objects greater than 85K.&amp;nbsp; It is not the size of the object graph that places it on the large object heap.&amp;nbsp; Translated to this example, the memory allocation of the DataSet is NOT the size of all the rows and all the columns.&amp;nbsp; The size of the object is determined immediately before the constructor executes (before the DataSet has any rows).&amp;nbsp; This is determine purely by the size of all the fields in the object, and some additional object overhead.&lt;/p&gt;  &lt;p&gt;When the memory size is determined and is (currently) above the threshold of 85K, it is placed in the Large Object Heap.&amp;nbsp; The LOH is very similar to the Small Object Heap in behavior with the ptrNextObj and serial allocation.&amp;nbsp; (The one covered in the session).&amp;nbsp; However, it does not have generational support and most importantly the LOH is never compacted.&lt;/p&gt;  &lt;p&gt;The lack of compaction is what will create out of memory exceptions because the LOH becomes fragmented and with the new allocations always appearing at the end of the heap, you can run out of memory.&lt;/p&gt;  &lt;p&gt;Using the new 2.0 &lt;a href="http://msdn.microsoft.com/en-us/library/system.runtime.memoryfailpoint.aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.runtime.memoryfailpoint.aspx"&gt;MemoryFailPoint&lt;/a&gt; object you can test the allocation and create an InsufficientMemoryException rather than the more fatal OutOfMemoryException.&amp;nbsp; &lt;/p&gt;  &lt;p&gt;This is only a tease because you still can't force a compaction of the LOH.&amp;nbsp; It is valid, in some scenarios, force a GC.Collect to help with the SMO and free up some memory.&amp;nbsp; However, the SMO is usually handled quite well by the CLR's collector and calling GC.Collect is nothing more than Jazz Hands to make you feel important.&amp;nbsp; Don't call it, ever...unless you have a good reason...but never call it.&lt;/p&gt;&lt;img src="http://billrob.com/aggbug.aspx?PostID=34771" width="1" height="1"&gt;</description></item><item><title>PDC 2008 Recommends List</title><link>http://billrob.com/archive/2008/11/02/pdc-2008-recommends-list.aspx</link><pubDate>Sun, 02 Nov 2008 05:15:00 GMT</pubDate><guid isPermaLink="false">8b1d07c6-e0f0-4f83-95e2-70212e46c249:33445</guid><dc:creator>Bill Robertson</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;I thought I would share the sessions at the PDC I really enjoyed and would recommend for viewing for those that didn't attend.&amp;nbsp; And you know who you are.&amp;nbsp; :)&amp;nbsp; And those who did attend but didn't get to watch these.&amp;nbsp; I'm sure there are more that were great, but these are the ones that stuck out to me.&lt;br&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://channel9.msdn.com/pdc2008/TL10/" mce_href="http://channel9.msdn.com/pdc2008/TL10/"&gt;Deep Dive: Dynamic Languages in Microsoft .NET&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/hugunin/" mce_href="http://blogs.msdn.com/hugunin/"&gt;Jim Hugunin&lt;/a&gt; gives a great session on Dynamic Languages.&amp;nbsp; This was the best talk I went to the entire PDC so I'm listing it first, but you should watch The Future of C# below first.&amp;nbsp; It is very reminiscent of the few Computer Sciences courses I've taken.&amp;nbsp; You won't learn any skills here that will directly apply, but covers theoretical aspects of cross language support.&amp;nbsp; He is also very entertaining to boot!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://channel9.msdn.com/pdc2008/TL16/" mce_href="http://channel9.msdn.com/pdc2008/TL16/"&gt;The Future of C#&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Anders Hejlsberg shows what's coming in C# 4.0.&amp;nbsp; He covers Dynamic Languages with javascript from c#, optional parameters values for overloads and named arguments.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://billrob.com/images/brobertson/WindowsLiveWriter/PDC2008RecommendsList_11B7/named%20optional%20parameters_2.jpg" mce_href="http://billrob.com/images/brobertson/WindowsLiveWriter/PDC2008RecommendsList_11B7/named%20optional%20parameters_2.jpg"&gt;&lt;img src="http://billrob.com/images/brobertson/WindowsLiveWriter/PDC2008RecommendsList_11B7/named%20optional%20parameters_thumb.jpg" style="border: 0px none ;" alt="named optional parameters" mce_src="http://billrob.com/images/brobertson/WindowsLiveWriter/PDC2008RecommendsList_11B7/named%20optional%20parameters_thumb.jpg" border="0" height="175" width="244"&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;With the dynamic language potentials, they must find a way to have an intellisense generator just like how the asp.net designer has its own plug in framework.&amp;nbsp; Maybe with interop type generation?&lt;/p&gt;  &lt;p&gt;dynamic video = youTubeServer.GetVideo( "" ); // returns xml&lt;/p&gt;  &lt;div&gt;   &lt;div style="border-style: none; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"&gt;     &lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"&gt;&lt;span style="color: rgb(96, 96, 96);"&gt;   1:&lt;/span&gt; dynamic video = GetYouTubeVideo( &lt;span style="color: rgb(0, 96, 128);"&gt;"3f73fv"&lt;/span&gt; ); &lt;span style="color: rgb(0, 128, 0);"&gt;//returns wrapped xml string &lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(96, 96, 96);"&gt;   2:&lt;/span&gt; ltTitle.Text = video.Title;&lt;/pre&gt;

    &lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"&gt;&lt;span style="color: rgb(96, 96, 96);"&gt;   3:&lt;/span&gt; ltObject.Text = video.Embed;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;The c# interpreter was really neat at the end.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://channel9.msdn.com/pdc2008/PC31/" mce_href="http://channel9.msdn.com/pdc2008/PC31/"&gt;ASP.NET and JQuery&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Stephen Walther taught me everything I needed to know about jquery in his hour long talk about it.&amp;nbsp; I know javascript extremely well and this just filled in the gaps so I could transfer my existing knowledge.&amp;nbsp; In fact, I am refactoring my advanced javascript talk to include jquery now, especially since it was announced Visual Studio will formally support JQuery.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://channel9.msdn.com/pdc2008/PC41/" mce_href="http://channel9.msdn.com/pdc2008/PC41/"&gt;ASP.NET: Cache Extensibility&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Stefan Schackow explains how the new Cache Api can work and what you can do when you open up the caching framework.&amp;nbsp; This will allow more powerful extensions such as &lt;a href="http://aspalliance.com/1705_A_New_Approach_to_HttpRuntimeCache_Management" mce_href="http://aspalliance.com/1705_A_New_Approach_to_HttpRuntimeCache_Management"&gt;David Penton's Cache Pattern&lt;/a&gt; being tied directly into the framework.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://channel9.msdn.com/pdc2008/TL14/" mce_href="http://channel9.msdn.com/pdc2008/TL14/"&gt;Project "Velocity": A First Look&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Murali Krishnaprasad does a good job introducing the new distributed caching framework called "velocity".&amp;nbsp; The option of a sending a read/write provider to a cache call&amp;nbsp; has some interesting possibilities.&lt;/p&gt;&lt;img src="http://billrob.com/aggbug.aspx?PostID=33445" width="1" height="1"&gt;</description><category domain="http://billrob.com/archive/tags/pdc2008/default.aspx">pdc2008</category></item><item><title>How to log remote user off...remotely</title><link>http://billrob.com/archive/2008/10/09/how-to-log-remote-user-off-remotely.aspx</link><pubDate>Thu, 09 Oct 2008 17:24:00 GMT</pubDate><guid isPermaLink="false">8b1d07c6-e0f0-4f83-95e2-70212e46c249:32121</guid><dc:creator>Bill Robertson</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;You're about to leave for the day, but you need to push one more thing to the data center.&amp;nbsp; You pop open trusty Remote Desktops and connect to your environment.&amp;nbsp; Then this message hits you in the face like a wet, smelly dog tail.&lt;/p&gt;  &lt;p&gt;&lt;img src="http://billrob.com/images/brobertson/WindowsLiveWriter/Howtolongremoteuseroff.remotely_BCA3/remotedesktopexceeed-thumb1_3.gif" style="border: 0px none;" alt="remotedesktopexceeed-thumb1" mce_src="http://billrob.com/images/brobertson/WindowsLiveWriter/Howtolongremoteuseroff.remotely_BCA3/remotedesktopexceeed-thumb1_3.gif" width="466" border="0" height="127"&gt;&lt;/p&gt;  &lt;p&gt;"Connect to console"?&amp;nbsp; Nope that doesn't help.&amp;nbsp; Normally, you holler across your team and tell whoever isn't on the servers, to log off; however it's late and everyone else is gone.&amp;nbsp; Or if someone is already on the server, ask them to use taskmgr to find your least favorite person and force them out of the server.&amp;nbsp; (Does anyone else get a power rush out of that?)&lt;/p&gt;  &lt;p&gt;&lt;img src="http://billrob.com/images/brobertson/WindowsLiveWriter/Howtolongremoteuseroff.remotely_BCA3/logoffremote_3.jpg" style="border: 0px none;" alt="logoffremote" mce_src="http://billrob.com/images/brobertson/WindowsLiveWriter/Howtolongremoteuseroff.remotely_BCA3/logoffremote_3.jpg" width="482" border="0" height="419"&gt; &lt;/p&gt;  &lt;p&gt;The above only works when you have access to the server.&amp;nbsp; When you don't, you can log people off remotely.&lt;/p&gt;  &lt;p&gt;There are two commands that are included in at least Windows Server 2003 and beyond:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;quser.exe - used for querying users logged on to a server&lt;/li&gt;    &lt;li&gt;logoff.exe - used for logging user off a server&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Using just quser.exe will give you the list of users that are logged onto the current machine.&amp;nbsp; You can also query a remote machine using the /server:&amp;lt;machinename&amp;gt;.&amp;nbsp; This will give a list of users.&amp;nbsp; The import things to notice are the ID and the State.&amp;nbsp; There are two states that I use when deciding who to kick off: Active and Disc.&lt;/p&gt;  &lt;p&gt;I always try to kick off Disc before active.&amp;nbsp; (There's no additional explanation)&lt;/p&gt;  &lt;p&gt;After you pinpointed the user to bounce, look at the ID column because that's what the logoff.exe command needs.&lt;/p&gt;  &lt;p&gt;The screen shot below shows how to query the users on WEB01 and then log off the disconnected session, named Session ID 2.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://billrob.com/images/brobertson/WindowsLiveWriter/Howtolongremoteuseroff.remotely_BCA3/logoffcommandline_2.jpg" mce_href="http://billrob.com/images/brobertson/WindowsLiveWriter/Howtolongremoteuseroff.remotely_BCA3/logoffcommandline_2.jpg"&gt;&lt;img src="http://billrob.com/images/brobertson/WindowsLiveWriter/Howtolongremoteuseroff.remotely_BCA3/logoffcommandline_thumb.jpg" style="border: 0px none;" alt="logoffcommandline" mce_src="http://billrob.com/images/brobertson/WindowsLiveWriter/Howtolongremoteuseroff.remotely_BCA3/logoffcommandline_thumb.jpg" width="532" border="0" height="118"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;With nearly all dos commands, passing "/?" as the only parameter will give you additional information about these commands. &lt;/p&gt;&lt;img src="http://billrob.com/aggbug.aspx?PostID=32121" width="1" height="1"&gt;</description></item><item><title>August NDDNUG Advanced Javascript Presentation</title><link>http://billrob.com/archive/2008/08/08/august-nddnug-advanced-javascript-presentation.aspx</link><pubDate>Fri, 08 Aug 2008 19:22:00 GMT</pubDate><guid isPermaLink="false">8b1d07c6-e0f0-4f83-95e2-70212e46c249:22152</guid><dc:creator>Bill Robertson</dc:creator><slash:comments>5</slash:comments><description>&lt;p&gt;I had a great time presenting an advanced javascript and MS Ajax at the &lt;a href="http://nddnug.net/" mce_href="http://nddnug.net/"&gt;North Dallas .NET User Group&lt;/a&gt;.&amp;nbsp; Attached is the slide deck and code samples I used.&amp;nbsp; I know...I didn't clean up the project files so there are some extra dll's included.&lt;/p&gt;
&lt;p&gt;The code samples are located at /Default.aspx and they run in increasing complexity.&lt;/p&gt;
The code samples include:
&lt;ul&gt;
&lt;li&gt;Ajax Helper - Helper class for registering client side script to work with MS Ajax, including the powerful RenderUserControl method.&lt;/li&gt;
&lt;li&gt;Object pattern - This includes a javascript singleton pattern, namespaces, constructors, inheritance, static and instance methods.&lt;/li&gt;
&lt;li&gt;Event Modal - Two different patterns for event handling in javascript, with a focus on my preference Event Level 0, inline function declarations.&lt;/li&gt;
&lt;li&gt;JSProcessor - This will combine multiple JS files into one and will remove excess spacing, comments to make the raw JS as small as possible.&lt;/li&gt;
&lt;li&gt;JSShortCircuiter - For reaching around the embed scripts when in debug mode so you don't have to constantly rebuild the dlls.&lt;br&gt;&lt;/li&gt;
&lt;/ul&gt;
There are many examples of client side caching, retrieving html from server, getting and saving Server Side objects.&lt;br&gt;
&lt;p&gt;There was more interest than I thought on the client side ThreadPool object, so I've included that.&amp;nbsp; It isn't functional as it stands because there
are some other frameworks it relies on.&amp;nbsp; Send me a message or post in
the comments if there is interest for me to make this object standalone
and only require the .net framework and I'll work towards that. &lt;/p&gt;
&lt;p&gt;Also, if there is any interest I can release a ajax back button module.&amp;nbsp; It is different from the MS Ajax one in that it is delegate based rather than serialized querystrings. &lt;br&gt;&lt;/p&gt;
&lt;p&gt;Hit me with any feedback or questions you have on the presentation or the code.&lt;/p&gt;
&lt;p&gt;Thanks! &lt;/p&gt;
&lt;p&gt;&lt;a href="http://billrob.com/files/folders/tools/entry22150.aspx"&gt;download &lt;/a&gt;&lt;br&gt;&lt;/p&gt;
&lt;img src="http://billrob.com/aggbug.aspx?PostID=22152" width="1" height="1"&gt;</description></item><item><title>Posting Again</title><link>http://billrob.com/archive/2008/08/08/posting-again.aspx</link><pubDate>Fri, 08 Aug 2008 19:20:00 GMT</pubDate><guid isPermaLink="false">8b1d07c6-e0f0-4f83-95e2-70212e46c249:22151</guid><dc:creator>Bill Robertson</dc:creator><slash:comments>0</slash:comments><description>&lt;P&gt;After a long hiatus, I'm back to posting again.&amp;nbsp; Look forward to more frequent updates.&amp;nbsp; :) &lt;BR&gt;&lt;/P&gt;&lt;img src="http://billrob.com/aggbug.aspx?PostID=22151" width="1" height="1"&gt;</description></item></channel></rss>