<?xml-stylesheet type="text/xsl" href="/rss.xsl" media="screen"?><rss version="2.0"><channel><title>softlogger Latest Articles ::ASP-NET</title><link>http://softlogger.com</link><description>softlogger Latest Articles ::ASP-NET</description><ttl>180</ttl><item><title>CurrentCulture, CurrentUICulture and DateTime strings</title><link>http://softlogger.com/20363/ASP-NET/currentculture-currentuiculture-and-datetime-strings.aspx</link><description>&lt;p&gt;There are a lot of blogs out that that tries to explain which is what, and why it is the way it is.&lt;/p&gt;  &lt;p&gt;To those of you who just want to know what the results are. I wrote a quick little app to show what happens.&lt;/p&gt;  &lt;p&gt;As you can see, DateTime.ToString() formatting is driven purely by CurrentCulture.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/kathykam/WindowsLiveWriter/CurrentCultureCurrentUICultureandDateTim_E66D/image_6.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="86" alt="image" src="http://blogs.msdn.com/blogfiles/kathykam/WindowsLiveWriter/CurrentCultureCurrentUICultureandDateTim_E66D/image_thumb_2.png" width="523" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;You can read more about the reasons and background here:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/system.globalization.cultureinfo.aspx"&gt;MSDN CultureInfo Documentation&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/michkap/archive/2007/01/11/1449754.aspx"&gt;Why we have both CurrentCulture and CurrentUICulture [MichKap]&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/ddietric/archive/2008/02/05/yacvcp-yet-another-currentculture-vs-currentuiculture-post.aspx"&gt;YACVCP (Yet another CurrentCulture vs. CurrentUICulture post) [Dennis Dietrich]&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;For other DateTime Format String info, check out my blog post &lt;a href="http://blogs.msdn.com/kathykam/archive/2006/09/29/.NET-Format-String-102_3A00_-DateTime-Format-String.aspx"&gt;&amp;quot;.NET Format String 102: DateTime Format String&amp;quot;&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8162911" width="1" height="1"&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=20363"&gt;</description><author>Kathy Kam</author><pubDate>2008-03-11T00:00:00</pubDate><category>ASP.NET</category></item><item><title>Silverlight 2 Beta 1 Control Samples</title><link>http://softlogger.com/20365/ASP-NET/silverlight-2-beta-1-control-samples.aspx</link><description>&lt;p&gt;My sample and its source is now live on &lt;a href="http://silverlight.net"&gt;http://silverlight.net&lt;/a&gt;! It show case a variety of controls we have built for the Silverlight 2 Beta 1. We have quite an good set of controls. It shouldn't surprise my readers to know that we have a DatePicker and a Calendar. :) And yes, I am the PM for those features. So for those of you who are sick of using my &lt;a href="http://blogs.msdn.com/kathykam/archive/2007/11/06/monthcalendar-and-datepicker-control-for-silverlight.aspx"&gt;Silverlight 1.1 Calendar/DatePicker&lt;/a&gt;. Pick up the latest &lt;a href="http://www.microsoft.com/silverlight/resources/installationFiles.aspx?v=2.0"&gt;Silverlight 2 Beta 1&lt;/a&gt;! &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;img height="172" alt=" " src="http://silverlight.net/Themes/silverlight/images/learn/controls.png" width="269" border="0" /&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://silverlight.net/Samples/2b1/SilverlightControls/run/default.html"&gt;Silverlight Control Demo Sample&lt;/a&gt;     &lt;br /&gt;Uploaded on March 5     &lt;br /&gt;&lt;em&gt;Created by:&lt;/em&gt; &lt;a href="http://blogs.msdn.com/kathykam/"&gt;Kathy Kam&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;A sample of twenty-four Silverlight 2 controls that can be viewed live together with the source code used to drive the controls. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Check out other samples here:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://silverlight.net/community/gallerydetail.aspx?cat=5&amp;amp;sort=1#vid1080" href="http://silverlight.net/community/gallerydetail.aspx?cat=5&amp;amp;sort=1#vid1080"&gt;http://silverlight.net/community/gallerydetail.aspx?cat=5&amp;amp;sort=1#vid1080&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Also, as mentioned by ScottGu this morning. You can download the source and unit tests to all the controls here:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=ea93dd89-3af2-4acb-9cf4-bfe01b3f02d4&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=ea93dd89-3af2-4acb-9cf4-bfe01b3f02d4&amp;amp;displaylang=en&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Love to hear what you think! I am excited to see applications people build with these controls. Tell me what you are building!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8056395" width="1" height="1"&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=20365"&gt;</description><author>Kathy Kam</author><pubDate>2008-03-05T00:00:00</pubDate><category>ASP.NET</category></item><item><title>Compression Decompression in .NET</title><link>http://softlogger.com/19073/ASP-NET/compression-decompression-in-net.aspx</link><description>&lt;img src="http://feeds.feedburner.com/~r/Microsoftnet/~4/233672404" height="1" width="1"/&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=19073"&gt;</description><author>Dutts DOTNET Support</author><pubDate>2008-02-12T00:00:00</pubDate><category>ASP.NET</category></item><item><title>Learning .NET debugging</title><link>http://softlogger.com/18542/ASP-NET/learning-net-debugging.aspx</link><description>&lt;p&gt;I often get questions like How do I learn .net debugging? What books should I read? Where can I find more information? &lt;/p&gt; &lt;p&gt;I know everyones learning style is different so this might not be the best way for you, but the way I try to learn things is by "teaching". For example the way I started out with .net debugging was by putting together a really silly .net debugging web cast series with one of my colleagues. Looking back at them now they make me laugh, both because seeing yourself on video is just horrible, and because of how convoluted we made things because of how little experience we had with debugging .net. &lt;/p&gt; &lt;p&gt;The reason learning by teaching works for me is because if I have to explain something to someone else I do a lot more research.&amp;nbsp; If&amp;nbsp;I read a book or go through a course I tend to skip over things and think "yeah, I pretty much know how that works so I won't worry about it" so I never delve into those things.&amp;nbsp; Blogging also makes me have to research a lot more and not leave it at "I have a pretty good idea what the issue is" but instead go deeper and really understand the issues, which gives me knowledge that I can reuse in other situations.&lt;/p&gt; &lt;p&gt;The other obvious and natural benefit from learning by teaching is that you spread the wealth and oftentimes I find that if I&amp;nbsp;really go&amp;nbsp;through&amp;nbsp;with actually&amp;nbsp;presenting it,&amp;nbsp;I also get a lot of feedback helping me understand the issues even further.&amp;nbsp; Sometimes though I just leave it at researching as though I would explain the topic to someone else but never end up doing it (because the&amp;nbsp;issue is really well explained already somewhere else). &lt;/p&gt; &lt;p&gt;The only drawback I see with this for me is that when you're in the learning phase you don't&amp;nbsp;really have the experience that I feel makes a good teacher, and sometimes like in&amp;nbsp;the case of the debugging web casts you do things in convoluted ways in the beginning because you don't know the shortcuts.&amp;nbsp; Still I think it is a worthwhile learning method, especially on&amp;nbsp;topics that are not all that explored and where there is not much good course/training material in existence. &lt;/p&gt; &lt;p&gt;With debugging specifically, I think there is no better way of learning debugging than creating your own issues and debugging them.&amp;nbsp; For example, set up a demo that you know will crash the process or hang the process or cause a memory leak and debug it.&amp;nbsp; It works extremely well for the beginning stages since you know what you are expected to find.&amp;nbsp; &lt;/p&gt; &lt;p&gt;&lt;em&gt;&lt;strong&gt;I was thinking of starting a quick series of demos that can be used to practice debugging.&amp;nbsp; Most of them items that I have already posted solutions to here, but with code and "lab" hints. Would that be of interest?&amp;nbsp;if you are interested, just send a quick yes&amp;nbsp;in the comments or contact me by email so I can gauge if it is something that would make sense to do... &lt;/strong&gt;&lt;/em&gt;&lt;/p&gt; &lt;p&gt;Ok, that was a whole lot of rambling about my learning style:)&amp;nbsp; having said this... here are some blogs that I subscribe to with good debugging/asp.net information if you want to learn debugging or keep your debugging skills up to date... &lt;/p&gt; &lt;p&gt;&lt;strong&gt;Support blogs with debugging case studies&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Speaking of which... (Johan Straarup)&amp;nbsp;&lt;a href="http://blogs.msdn.com/johan"&gt;http://blogs.msdn.com/johan&lt;/a&gt;&lt;br&gt;A developers stayings (Carlo Cardella)&amp;nbsp;&lt;a href="http://blogs.msdn.com/carloc"&gt;http://blogs.msdn.com/carloc&lt;/a&gt;&lt;br&gt;Notes from a dark corner (Doug Stewart)&amp;nbsp;&lt;a href="http://blogs.msdn.com/dougste"&gt;http://blogs.msdn.com/dougste&lt;/a&gt;&lt;br&gt;Cheshire's blog (Jim Cheshire)&amp;nbsp;&lt;a href="http://blogs.msdn.com/jamesche"&gt;http://blogs.msdn.com/jamesche&lt;/a&gt;&lt;br&gt;ASP.NET debugging (Tom Christian)&amp;nbsp;&lt;a href="http://blogs.msdn.com/tom"&gt;http://blogs.msdn.com/tom&lt;/a&gt;&lt;br&gt;Nico's weblog (Nicolas Dietrich)&amp;nbsp;&lt;a href="http://blogs.msdn.com/nicd"&gt;http://blogs.msdn.com/nicd&lt;/a&gt;&lt;br&gt;Solving the world's problem, one support incident at a time... (Lucas Canavan)&amp;nbsp;&lt;a href="http://blogs.msdn.com/lucascan"&gt;http://blogs.msdn.com/lucascan&lt;/a&gt;&lt;br&gt;Todd Carter's weblog (Todd Carter)&amp;nbsp;&lt;a href="http://blogs.msdn.com/toddca"&gt;http://blogs.msdn.com/toddca&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;b&gt;Other debugging related blogs:&lt;/b&gt; &lt;p&gt;Debugging toolbox - &lt;a href="http://blogs.msdn.com/debuggingtoolbox"&gt;http://blogs.msdn.com/debuggingtoolbox&lt;br&gt;&lt;/a&gt;Dotnet debug - &lt;a href="http://dotnetdebug.net"&gt;http://dotnetdebug.net&lt;/a&gt;&lt;br&gt;NT Debugging - &lt;a href="http://blogs.msdn.com/ntdebugging"&gt;http://blogs.msdn.com/ntdebugging&lt;/a&gt;&lt;br&gt;John Robbin's blog - &lt;a href="http://www.wintellect.com/cs/blogs/jrobbins/default.aspx"&gt;http://www.wintellect.com/cs/blogs/jrobbins/default.aspx&lt;/a&gt; &lt;p&gt;&lt;b&gt;Other ASP.NET blogs:&lt;/b&gt; &lt;p&gt;ASP.NET Team blog - &lt;a href="http://weblogs.asp.net/aspnet-team"&gt;http://weblogs.asp.net/aspnet-team&lt;/a&gt;&lt;br&gt;Scott Gu's blog - &lt;a href="http://weblogs.asp.net/scottgu"&gt;http://weblogs.asp.net/scottgu&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;b&gt;CLR Blogs:&lt;/b&gt; &lt;p&gt;CLR, Architectures and stuff - &lt;a href="http://blogs.msdn.com/patrick_dussud"&gt;http://blogs.msdn.com/patrick_dussud&lt;/a&gt;&lt;br&gt;Maoni's weblog - &lt;a href="http://blogs.msdn.com/maoni"&gt;http://blogs.msdn.com/maoni&lt;/a&gt; &lt;p&gt;and dont forget the &lt;a href="http://www.amazon.com/Debugging-Microsoft-NET-2-0-Applications/dp/0735622027"&gt;Debugging Microsoft .NET 2.0 Applications&lt;/a&gt; book by John Robbins&lt;/p&gt; &lt;p&gt;Laters,&lt;/p&gt; &lt;p&gt;Tess&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7325755" width="1" height="1"&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=18542"&gt;</description><author>If broken it is, fix it you should</author><pubDate>2008-01-30T00:00:00</pubDate><category>ASP.NET</category></item><item><title>Strongly Typed Datasets (.NET 2.0) - Course Notes</title><link>http://softlogger.com/18654/ASP-NET/strongly-typed-datasets--net-2-0--course-notes.aspx</link><description>&lt;p&gt;This course was created for the VBCity Academy where you can take online courses for free.  Unfortunately, the material I wrote is something I constantly want to keep linking to - so I've decided to place the course up as a flat article.&lt;/p&gt;

&lt;p&gt;I fully recommend that the take the course through the Academy where the structure and flow of the course should make a little more sense - however, if big long documents are your thing - check out the article at &lt;a href="http://blogs.vbcity.com/drydo/articles/8959.aspx"&gt;http://blogs.vbcity.com/drydo/articles/8959.aspx&lt;/a&gt;.&lt;/p&gt;&lt;img src ="http://blogs.vbcity.com/drydo/aggbug/8960.aspx" width = "1" height = "1" /&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=18654"&gt;</description><author>VB &amp;amp; .NET Blogs @ vbCity.com</author><pubDate>2008-01-24T00:00:00</pubDate><category>ASP.NET</category></item><item><title>It's .Net Source Day! Let the Source Loose.... Today is the day you can configure VS2008 to grab the actual source code to the .Net Framework and step into it as you debug...</title><link>http://softlogger.com/18167/ASP-NET/it-s-net-source-day-let-the-source-loose---today-is-the-day-you-can-configure-vs2008-to-grab-the-actual-source-code-to-the-net-framework-and-step-into-it-as-you-debug-.aspx</link><description>&lt;p&gt;&lt;a href="http://weblogs.asp.net/scottgu/default.aspx"&gt;ScottGu's Blog&lt;/a&gt; - &lt;a href="http://weblogs.asp.net/scottgu/archive/2008/01/16/net-framework-library-source-code-now-available.aspx"&gt;.NET Framework Library Source Code now available&lt;/a&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;quot;Last October I blogged about our plan to &lt;a href="http://weblogs.asp.net/scottgu/archive/2007/10/03/releasing-the-source-code-for-the-net-framework-libraries.aspx"&gt;release the source code to the .NET Framework libraries&lt;/a&gt;, and enable debugging support of them with Visual Studio 2008.&amp;#160; Today I'm happy to announce that this is now available for everyone to use. Specifically, you can now browse and debug the source code for the following .NET Framework libraries:&lt;/p&gt;    &lt;ul&gt;     &lt;li&gt;.NET Base Class Libraries (including System, System.CodeDom, System.Collections, System.ComponentModel, System.Diagnostics, System.Drawing, System.Globalization, System.IO, System.Net, System.Reflection, System.Runtime, System.Security, System.Text, System.Threading, etc). &lt;/li&gt;   &lt;/ul&gt;    &lt;ul&gt;     &lt;li&gt;ASP.NET (System.Web, System.Web.Extensions) &lt;/li&gt;   &lt;/ul&gt;    &lt;ul&gt;     &lt;li&gt;Windows Forms (System.Windows.Forms) &lt;/li&gt;   &lt;/ul&gt;    &lt;ul&gt;     &lt;li&gt;Windows Presentation Foundation (System.Windows) &lt;/li&gt;   &lt;/ul&gt;    &lt;ul&gt;     &lt;li&gt;ADO.NET and XML (System.Data and System.Xml) &lt;/li&gt;   &lt;/ul&gt;    &lt;p&gt;We are in the process of adding additional framework libraries (including LINQ, WCF and Workflow) to the above list. I'll blog details on them as they become available in the weeks and months ahead.&lt;/p&gt;    &lt;h5&gt;Enabling Reference Source Access in Visual Studio 2008&lt;/h5&gt;    &lt;p&gt;Enabling .NET Framework source access within Visual Studio 2008 only takes a few minutes to setup. Shawn Burke has a &lt;a href="http://blogs.msdn.com/sburke/archive/2008/01/16/configuring-visual-studio-to-debug-net-framework-source-code.aspx"&gt;detailed blog post&lt;/a&gt; that covers the exact steps on how to enable this in more depth &lt;a href="http://blogs.msdn.com/sburke/archive/2008/01/16/configuring-visual-studio-to-debug-net-framework-source-code.aspx"&gt;here&lt;/a&gt;. .&lt;/p&gt;    &lt;p&gt;..&amp;quot;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/sburke/default.aspx"&gt;Shawn Burke's Blog&lt;/a&gt; - Configuring Visual Studio to Debug .NET Framework Source Code&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;quot;It's finally here - the launch of the .NET Reference Source project.&amp;#160; This post (hopefully!) contains everything you need to know.&amp;#160; Over the past few weeks, we ran a pilot of this feature and collected lots of great data that helped us work through some issues and understand where people were likely to have problems.&amp;#160; &lt;/p&gt;    &lt;p&gt;First, though, if you have any problems, please make sure you've followed all of the steps exactly as described.&amp;#160; If you're still having problems, please check the &lt;a href="http://blogs.msdn.com/sburke/archive/2008/01/16/configuring-visual-studio-to-debug-net-framework-source-code.aspx#faq"&gt;FAQ/Troubleshooting&lt;/a&gt; section at the bottom.&amp;#160; If that doesn't work, post a comment below and I'll look into it.&lt;/p&gt;    &lt;p&gt;Basic Setup&lt;/p&gt;    &lt;p&gt;...&amp;quot;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Following Shawn's directions, it takes 5-10 minutes (or less) to configure your VS2008 (all editions except Express) to go to a MS site, download the symbols for the .Net Framework, which then leads to the magic of downloading the actual .Net source (if it's available).&lt;/p&gt;  &lt;p&gt;We're talking source source... Comments and all. And everything &amp;quot;works.&amp;quot; Watches, debug visualizers, etc, etc.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.google.com/gduncan411/R46l0ghmxbI/AAAAAAAAALE/V2zGjGzZNHU/VS2008-CSOnLoad%5B3%5D"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="391" alt="VS2008-CSOnLoad" src="http://lh6.google.com/gduncan411/R46l1QhmxcI/AAAAAAAAALM/J3FZzr3vZUc/VS2008-CSOnLoad_thumb%5B1%5D" width="644" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.google.com/gduncan411/R46l2QhmxdI/AAAAAAAAALU/whdX9pJjqac/VS2008-VB%5B3%5D"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="391" alt="VS2008-VB" src="http://lh6.google.com/gduncan411/R46l3QhmxeI/AAAAAAAAALc/J26e0Ow3_mw/VS2008-VB_thumb%5B1%5D" width="644" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Wow. That's just COOL.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Thanks to Scott (&lt;a href="http://scottisafooldev.spaces.live.com/"&gt;scottisafool&lt;/a&gt;) for the second head's up of the day... &lt;/p&gt;  &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/coolthingoftheday?a=B5i71VD"&gt;&lt;img src="http://feeds.feedburner.com/~f/coolthingoftheday?i=B5i71VD" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/coolthingoftheday?a=HXQdDYD"&gt;&lt;img src="http://feeds.feedburner.com/~f/coolthingoftheday?i=HXQdDYD" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/coolthingoftheday?a=30fde4D"&gt;&lt;img src="http://feeds.feedburner.com/~f/coolthingoftheday?i=30fde4D" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/coolthingoftheday/~4/217940610" height="1" width="1"/&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=18167"&gt;</description><author>Gregs Cool [Insert Clever Name] of the Day</author><pubDate>2008-01-20T00:00:00</pubDate><category>ASP.NET</category></item><item><title>Writing a custom ASP.NET Profile class</title><link>http://softlogger.com/18268/ASP-NET/writing-a-custom-asp-net-profile-class.aspx</link><description>&lt;p&gt;We made heavy use of the ASP.NET membership and profile system for &lt;a href="http://www.vertigo.com/VideoShow.aspx"&gt;Video.Show&lt;/a&gt; (a &lt;a href="http://silverlight.net"&gt;Silverlight&lt;/a&gt; 1.0 video community website system, available on &lt;a href="http://www.codeplex.com/videoshow"&gt;CodePlex&lt;/a&gt;). In addition to storing basic profile information, we created a custom profile with some additional fields. It's a really easy way to add add some additional personalization to your site without having to add a bunch of tables to your database.&lt;/p&gt; &lt;p&gt;This is really simple if you're using a Website Project - you can just add additional properties to the profile section of your web.config, and a custom profile class is generated on the fly when you rebuild your application. That makes things ridiculously easy. First, we'd define the property in web.config:&lt;/p&gt; &lt;div&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #008000"&gt;&amp;lt;!-- In web.config --&amp;gt;&lt;/span&gt;
&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;profile&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;properties&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;add&lt;/span&gt; &lt;span style="color: #ff0000"&gt;name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="FavoritePasta"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;properties&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;profile&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;div&gt;Then you can refer to the Profile.FavoritePasta profile setting anywhere in your web application, and it's automatically mapped to the current user:&lt;/div&gt;
&lt;div&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;Profile.FavoritePasta = &lt;span style="color: #006080"&gt;"Pumpkin Ravioli"&lt;/span&gt;;&lt;/pre&gt;&lt;/div&gt;
&lt;div&gt;And you can access the data just as you would a session property:&lt;/div&gt;
&lt;div&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&amp;lt;span id=&lt;span style="color: #006080"&gt;"user-favorite-pasta"&lt;/span&gt;&amp;gt;&amp;lt;%= Profile.FavoritePasta %&amp;gt;&amp;lt;/span&amp;gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;Not so fast, I'm using a Web Application Project&lt;/h3&gt;
&lt;p&gt;Yeah, here's the catch. If you're using the Web Application Project model, the custom build handling for the profile doesn't kick in, so those custom properties you've lovingly crafted in your web.config aren't going to be compiled into a custom profile class.&lt;/p&gt;
&lt;p&gt;There's a Visual Studio 2005 add-in called &lt;a href="http://www.codeplex.com/WebProfile"&gt;WebProfile&lt;/a&gt; that reads your custom profile and creates a custom class for you. That's handy, but I passed on it. For one thing, I haven't heard that there's a VS 2008 version of this. Additionally, I don't like to require a custom add-in in order to get my code to work in case I want to add a new profile property - especially when I'm working on a project that's going to be distributed on CodePlex. &lt;/p&gt;
&lt;p&gt;Fortunately, it's not very hard to implement a custom profile. First, we'll write a class that inherits from System.Web.Profile.ProfileBase. I added a few static accessors, too:&lt;/p&gt;
&lt;div&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Web.Profile;
&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Web.Security;

&lt;span style="color: #0000ff"&gt;namespace&lt;/span&gt; VideoShow
{
    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; UserProfile : ProfileBase
    {
        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; UserProfile GetUserProfile(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; username)
        {
            &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; Create(username) &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; UserProfile;
        }&lt;p&gt;        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; UserProfile GetUserProfile()
        {
            &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; Create(Membership.GetUser().UserName) &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; UserProfile;
        }

        [SettingsAllowAnonymous(&lt;span style="color: #0000ff"&gt;false&lt;/span&gt;)]
        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; Description
        {
            get { &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff"&gt;base&lt;/span&gt;[&lt;span style="color: #006080"&gt;"Description"&lt;/span&gt;] &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt;; }
            set { &lt;span style="color: #0000ff"&gt;base&lt;/span&gt;[&lt;span style="color: #006080"&gt;"Description"&lt;/span&gt;] = &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;; }
        }

        [SettingsAllowAnonymous(&lt;span style="color: #0000ff"&gt;false&lt;/span&gt;)]
        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; Location
        {
            get { &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff"&gt;base&lt;/span&gt;[&lt;span style="color: #006080"&gt;"Location"&lt;/span&gt;] &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt;; }
            set { &lt;span style="color: #0000ff"&gt;base&lt;/span&gt;[&lt;span style="color: #006080"&gt;"Location"&lt;/span&gt;] = &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;; }
        }

        [SettingsAllowAnonymous(&lt;span style="color: #0000ff"&gt;false&lt;/span&gt;)]
        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; FavoriteMovie
        {
            get { &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff"&gt;base&lt;/span&gt;[&lt;span style="color: #006080"&gt;"FavoriteMovie"&lt;/span&gt;] &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt;; }
            set { &lt;span style="color: #0000ff"&gt;base&lt;/span&gt;[&lt;span style="color: #006080"&gt;"FavoriteMovie"&lt;/span&gt;] = &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;; }
        }
    }
}&lt;/p&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;Now we need to&amp;nbsp; hook that up in the profile section of web.config - notice that I've included &lt;strong&gt;inherits="VideoShow.UserProfile"&lt;/strong&gt; in the profile declaration:&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;profile&lt;/span&gt; &lt;span style="color: #ff0000"&gt;inherits&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="VideoShow.UserProfile"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;providers&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;clear&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;add&lt;/span&gt; &lt;span style="color: #ff0000"&gt;name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="AspNetSqlProfileProvider"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;type&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="System.Web.Profile.SqlProfileProvider"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;connectionStringName&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="VideoShowConnectionString"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;providers&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;profile&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;With that done, I can grab an instance of the custom profile class and set a property:&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #008000"&gt;//Write to a user profile from a textbox value&lt;/span&gt;
UserProfile profile = UserProfile.GetUserProfile(currentUser.UserName);
profile.FavoriteMovie = FavoriteMovie.Text;
profile.Save();
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Part of the reason for the accessor is to allow display of profile information for users other than the current user - for instance, a public profile page which displays information about other users in the system.&lt;/p&gt;
&lt;div&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #008000"&gt;//Write to a user profile from a textbox value&lt;/span&gt;
UserProfile profile = UserProfile.GetUserProfile(displayUser.UserName);
Response.Write(profile.FavoriteMovie)&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;And of course, I can still databind to it as well:&lt;/p&gt;
&lt;div&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&amp;lt;span id=&lt;span style="color: #006080"&gt;"user-favorite-movie"&lt;/span&gt;&amp;gt;&amp;lt;%= VideoShow.UserProfile.GetUserProfile().FavoriteMovie %&amp;gt;&amp;lt;/span&amp;gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;A few disclaimers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;This isn't news, it's been out since ASP.NET 2.0 shipped. Still, it's pretty handy to know about, and if you're like me you may have forgotten or never really dug into some of the ASP.NET 2.0 goodies. 
&lt;li&gt;This isn't the ultimate solution in terms of entity modeling. Custom profile information is stored in two columns in the aspnet_Profile table (delimited strings in one column, another column for binary serialized objects). That means that the only real way to read or write custom property values is via the profile API. That's not a real problem unless you need to query or join on information stored in a custom profile setting.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Further information:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.odetocode.com/Articles/440.aspx"&gt;Profiles in ASP.NET&lt;/a&gt; (K. Scott Allen)&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.amazon.com/Essential-ASP-NET-2-0-Fritz-Onion/dp/0321237706"&gt;Essential ASP.NET 2.0&lt;/a&gt;, Chapter 5 (Fritz Onion)&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5623283" width="1" height="1"&gt;
&lt;p&gt;&lt;a href="http://feeds.feedburner.com/~a/jongalloway?a=IjEpXm"&gt;&lt;img src="http://feeds.feedburner.com/~a/jongalloway?i=IjEpXm" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/jongalloway?a=xnN7IFD"&gt;&lt;img src="http://feeds.feedburner.com/~f/jongalloway?i=xnN7IFD" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jongalloway?a=Y979jHd"&gt;&lt;img src="http://feeds.feedburner.com/~f/jongalloway?i=Y979jHd" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jongalloway?a=OsfpurD"&gt;&lt;img src="http://feeds.feedburner.com/~f/jongalloway?i=OsfpurD" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jongalloway?a=08SiDtd"&gt;&lt;img src="http://feeds.feedburner.com/~f/jongalloway?i=08SiDtd" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jongalloway?a=kO7etmD"&gt;&lt;img src="http://feeds.feedburner.com/~f/jongalloway?i=kO7etmD" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/jongalloway/~4/219754644" height="1" width="1"/&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=18268"&gt;</description><author>JonGalloway.ToString()</author><pubDate>2008-01-20T00:00:00</pubDate><category>ASP.NET</category></item><item><title>.NET Framework Library Source Code Available - Browse ASP.NET, Winform, and ADO.NET Production Code</title><link>http://softlogger.com/18131/ASP-NET/net-framework-library-source-code-available--browse-asp-net-winform-and-ado-net-production-code.aspx</link><description>&lt;H1&gt;&lt;FONT face=Verdana&gt;.NET Framework Library Source Code Available - Browse ASP.NET, Winform, and ADO.NET Production Code&lt;/FONT&gt;&lt;/H1&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;by &lt;A href="http://www.davidhayden.com/"&gt;David Hayden&lt;/A&gt;, &lt;A href="http://www.davidhayden.com/"&gt;Microsoft MVP C#&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Scott Guthrie mentions the release of the .NET Framework Library Source Code.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;You can now browse and debug the source code for the following .NET Framework libraries:&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;.NET Base Class Libraries (including System, System.CodeDom, System.Collections, System.ComponentModel, System.Diagnostics, System.Drawing, System.Globalization, System.IO, System.Net, System.Reflection, System.Runtime, System.Security, System.Text, System.Threading, etc).&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;ASP.NET (System.Web, System.Web.Extensions)&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Windows Forms (System.Windows.Forms)&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Windows Presentation Foundation (System.Windows)&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;ADO.NET and XML (System.Data and System.Xml)&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The .NET Framework source is being released under a read-only reference license.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Talk about the ultimate way to learn best practices in .NET Development when looking at other people's code :)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Learn more &lt;A href="http://weblogs.asp.net/scottgu/archive/2008/01/16/net-framework-library-source-code-now-available.aspx" target=_blank&gt;here&lt;/A&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;img src ="http://davidhayden.com/blog/dave/aggbug/3442.aspx" width = "1" height = "1" /&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=18131"&gt;</description><author>David Hayden - Florida .NET Developer - C# and SQL Server</author><pubDate>2008-01-19T00:00:00</pubDate><category>ASP.NET</category></item><item><title>Some behind-the-scenes details about .NET Framework 2.0 SP1 and 3.0 SP1 setup</title><link>http://softlogger.com/18198/ASP-NET/some-behind-the-scenes-details-about-net-framework-2-0-sp1-and-3-0-sp1-setup.aspx</link><description>&lt;p&gt;Since the &lt;a href="http://blogs.msdn.com/astebner/archive/2007/11/19/6408888.aspx"&gt;.NET Framework 3.5&lt;/a&gt; shipped, I've written a &lt;a href="http://blogs.msdn.com/astebner/archive/tags/.NET+Framework+3.5+setup+and+deployment/default.aspx"&gt;few blog posts&lt;/a&gt; about some of the setup and deployment issues that can affect this product.&amp;nbsp; Behind the scenes, the installer for the .NET Framework 3.5 has some architectural differences from previous releases of the .NET Framework that I've alluded to in a few of those previous posts, and I wanted to take a little time to describe these differences in a bit more detail.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;How the .NET Framework 2.0, 3.0 and 3.5 fit together&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;The .NET Framework 3.5 is essentially an add-on that introduces new features to the .NET Framework 2.0 and 3.0 products but continues to run on the version of the common language runtime (CLR) that shipped in the .NET Framework 2.0.&amp;nbsp; This is similar to the model introduced in the .NET Framework 3.0, which is essentially an add-on for the .NET Framework 2.0 but did not introduce a new version of the CLR.&amp;nbsp; As a result of this add-on model, the .NET Framework 3.0 setup requires the .NET Framework 2.0 as a prerequisite, and the .NET Framework 3.5 requires both the .NET Framework 2.0 and the .NET Framework 3.0 as prerequisites.&amp;nbsp; This is sometimes called a "nesting doll" model for creating a product.&lt;/p&gt; &lt;p&gt;.NET Framework 3.5 setup includes service packs for both the .NET Framework 2.0 and 3.0.&amp;nbsp; These service packs install as prerequisites because some of the new features introduced in the .NET Framework 3.5 require updates to the originally released versions of both the .NET Framework 2.0 and 3.0.&lt;/p&gt; &lt;p&gt;When the .NET Framework 3.5 project first got started, the service packs for the .NET Framework 2.0 and 3.0 were being built as a series of Windows Installer patches (MSP files).&amp;nbsp; It quickly became clear that the number of files being changed by these service packs was going to lead to the service packs being nearly as large as the original versions of the products.&amp;nbsp; This would mean that any customers needing to redistribute the .NET Framework 3.5 with their products would have to include the original versions of the .NET Framework 2.0 and 3.0 and nearly equal-sized service packs for each of them, which would have caused the overall size to grow even larger than it already has.&lt;/p&gt; &lt;p&gt;As a result, the decision was made to create slipstream releases for both the .NET Framework 2.0 SP1 and 3.0 SP1.&amp;nbsp; These slipstream releases include the original payload plus all of the fixes that are a part of the service packs.&amp;nbsp; They will successfully install on systems that had the original releases of the .NET Framework 2.0 and 3.0 as well as on systems that did not yet have either version installed (whereas, standalone service packs only install if the original version of the product was previously installed).&lt;/p&gt; &lt;p&gt;&lt;strong&gt;.NET Framework 2.0 SP1 and 3.0 SP1 slipstream behind-the-scenes details&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Typical slipstreams for MSI-based products are produced by building a layout that is identical to the original release, but with updated binary content.&amp;nbsp; However, the slipstream releases of the .NET Framework 2.0 and 3.0 are constructed differently behind the scenes than a typical slipstream release.&lt;/p&gt; &lt;p&gt;The .NET Framework 2.0 SP1 and 3.0 SP1 setup packages consist of the following payload:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;A base MSI that contains no files of its own - it only writes some registry values used for product-level detection&lt;/li&gt; &lt;li&gt;A series of MSPs that contain the file payload for .NET Framework features, divided up logically into sub-features that will likely need to be updated as a unit in the future&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;The .NET Framework 2.0 SP1 and 3.0 SP1 setup packages include logic to do the following:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Detect the processor architecture and install the base MSI and the appropriate set of MSPs during the initial installation transaction.&amp;nbsp; The ability to install multiple patches in a single transaction like this is a new feature available starting in Windows Installer 3.0.&lt;/li&gt; &lt;li&gt;Use the &lt;a href="http://msdn2.microsoft.com/library/aa369786.aspx"&gt;Windows Installer major upgrade feature&lt;/a&gt; to automatically uninstall the original version of the .NET Framework 2.0 or 3.0 during SP1 setup if they are present on the system.&amp;nbsp; This ensures that all systems are baselined at the new service pack level after installing the slipstream package.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Each of the MSPs installed during .NET Framework 2.0 and 3.0 SP1 setup is marked to not allow uninstall, which is why you see a series of updates that do not have Uninstall buttons listed in Add/Remove Programs for each of these products (if you check the Show updates box at the top of the Add/Remove Programs control panel).&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Implications of this slipstream design&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;There are a few interesting results that fall out of this slipstream design that warrant a bit more in-depth discussion:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Because all of the files that are a part of the .NET Framework 2.0 SP1 and 3.0 SP1 are installed via patches, the source files are cached automatically by Windows Installer so they will be available for repair and uninstall scenarios.&amp;nbsp; The original releases of the .NET Framework 2.0 and 3.0 had to include specific logic to cache the source files for repair scenarios, but this logic is no longer needed in the slipstream service packs.&lt;/li&gt; &lt;li&gt;The original version of the .NET Framework 3.0 consisted of multiple MSIs with payload for different features (Windows Communication Foundation, Windows Presentation Foundation, Windows Workflow Foundation).&amp;nbsp; The slipstream 3.0 SP1 release consolidates this payload down to a single MSI with a set of associated MSPs.&amp;nbsp; This means that repairing or uninstalling the .NET Framework 3.0 SP1 only requires interacting with one MSI instead of several.&lt;/li&gt; &lt;li&gt;The .NET Framework 2.0 and 3.0 both support installing on 32-bit and 64-bit platforms.&amp;nbsp; In the original releases, the 64-bit packages were separate from the 32-bit packages and carried both 32-bit and 64-bit payload.&amp;nbsp; This meant that customers who needed to redistribute both the 32-bit and 64-bit versions had to carry the 32-bit payload twice - once in the 32-bit setup package and a second time in the 64-bit setup package.&amp;nbsp; Splitting the payload of the .NET Framework 2.0 SP1 and 3.0 SP1 into MSPs allows the .NET Framework 2.0 SP1 and 3.0 SP1 to use the same 32-bit source files for both 32-bit and 64-bit setup.&amp;nbsp; This will reduce the overall package size for customers who need to redistribute both the 32-bit and 64-bit versions of 2.0 SP1 and/or 3.0 SP1.&lt;/li&gt; &lt;li&gt;Partitioning the payload of the .NET Framework 2.0 SP1 and 3.0 SP1 into a series of patches allows for more easy creation of future slipstream packages that include updates to a subset of the collection of patches.&amp;nbsp; It becomes as simple as building the patches that include updated payload and then packaging them with the MSI and the rest of the MSPs that are included with SP1.&amp;nbsp; These future patches could also be delivered as standalone hotfixes that can be independently uninstalled if desired.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;strong&gt;Additional information&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;If you are interested, there are links in &lt;a href="http://blogs.msdn.com/heaths/archive/2007/12/18/fixes-in-microsoft-net-framework-2-0-sp1-and-3-0-sp1.aspx"&gt;this blog post&lt;/a&gt; to more detailed information about the fixes included in the .NET Framework 2.0 SP1, 3.0 SP1 and 3.5 and the install locations of each version.&lt;/p&gt; &lt;p&gt;It is also interesting to note that the &lt;a href="http://www.microsoft.com/silverlight"&gt;Silverlight 1.0&lt;/a&gt; installer uses a similar packaging scheme behind the scenes.&amp;nbsp; It includes an MSI that does not have any files of its own, and an MSP that includes the file payload.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7145670" width="1" height="1"&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=18198"&gt;</description><author>Aaron Stebners WebLog</author><pubDate>2008-01-18T00:00:00</pubDate><category>ASP.NET</category></item><item><title>Stepping into base class libraries of .NET Framework while debugging</title><link>http://softlogger.com/18145/ASP-NET/stepping-into-base-class-libraries-of-net-framework-while-debugging.aspx</link><description>&lt;P class=ident&gt;Here are some pieces of information about stepping into base class libraries of .NET Framework while debugging:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://blogs.msdn.com/sburke/archive/2008/01/16/configuring-visual-studio-to-debug-net-framework-source-code.aspx" mce_href="http://blogs.msdn.com/sburke/archive/2008/01/16/configuring-visual-studio-to-debug-net-framework-source-code.aspx"&gt;
&lt;P class=ident&gt;Configuring Visual Studio to Debug .NET Framework Source Code by Shawn Burke&lt;/P&gt;&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://httphandler.codebetter.com/blogs/james.kovacs/archive/2008/01/17/debugging-into-the-net-framework-source.aspx" mce_href="http://httphandler.codebetter.com/blogs/james.kovacs/archive/2008/01/17/debugging-into-the-net-framework-source.aspx"&gt;
&lt;P class=ident&gt;Debugging into the .NET Framework Source by James Kovacs&lt;/P&gt;&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7149059" width="1" height="1"&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=18145"&gt;</description><author>Marco Dorantes WebLog</author><pubDate>2008-01-18T00:00:00</pubDate><category>ASP.NET</category></item><item><title>Firefox and the FileUpload control in ASP.NET</title><link>http://softlogger.com/18041/ASP-NET/firefox-and-the-fileupload-control-in-asp-net.aspx</link><description>&lt;p&gt;
I&amp;rsquo;ve been pretty annoyed about the fact that FireFox ignores the width property of the ASP.NET &lt;a href="http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.fileupload.aspx"&gt;FileUpload&lt;/a&gt; control. It doesn&amp;rsquo;t matter if you set it by CSS or even in JavaScript, Firefox always ignores it and that results in a crippled layout since you have no control over the width of the upload input field. This actually has nothing to do with the FileUpload control, but with the rendered output of that control, which is just a standard &amp;lt;input type=&amp;quot;file&amp;quot;...&amp;gt; field.
&lt;/p&gt;
&lt;p&gt;
Here the width is set to 400px. The FileUpload control renders the Width attribute to the correct CSS style value of 400px at runtime. 
&lt;/p&gt;
&lt;div class="code"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:FileUpload&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="txtUpload"&lt;/span&gt; &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;="400"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt; &lt;/div&gt;&lt;p&gt;
But as mentioned, Firefox totally ignores that. Then I remembered a forum thread I read some years ago about a &lt;em&gt;size&lt;/em&gt; attribute. The only thing I could find was this &lt;a href="http://htmlhelp.com/reference/html40/forms/input.html"&gt;list of available HTML attributes&lt;/a&gt;, but I gave it a try. 
&lt;/p&gt;
&lt;p&gt;
This is what I ended up with.&amp;nbsp;The &lt;em&gt;size&lt;/em&gt; attribute&amp;nbsp;actually works in Firefox and IE ignores it, but adheres to the &lt;em&gt;Width&lt;/em&gt; attribute instead. 
&lt;/p&gt;
&lt;div class="code"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:FileUpload&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="txtUpload"&lt;/span&gt; &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;="400"&lt;/span&gt; &lt;span class="attr"&gt;size&lt;/span&gt;&lt;span class="kwrd"&gt;="50"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt; &lt;/div&gt;&lt;p&gt;
The &lt;em&gt;size&lt;/em&gt; attribute determines the number of characters should be visible and then adjusts the width accordingly. It is not the same as setting a maximum length of the file name, so it doesn&amp;rsquo;t break anything. 
&lt;/p&gt;
&lt;p&gt;
You should think that since a size of 50 generates the same width as 400px that you could always just divide the width in pixels with 8 to find the equivalent size. That is not the case. You have to manually adjust every time until you find the right size value that matches the pixel width. 
&lt;/p&gt;
&lt;p&gt;
Don&amp;rsquo;t you just love these kinds of obscure browser differences? 
&lt;/p&gt;
&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=18041"&gt;</description><author>.NET slave</author><pubDate>2008-01-17T00:00:00</pubDate><category>ASP.NET</category></item><item><title>Web Authoring Component can fail during VS 2008 setup if Program Files has a trailing backslash</title><link>http://softlogger.com/18200/ASP-NET/web-authoring-component-can-fail-during-vs-2008-setup-if-program-files-has-a-trailing-backslash.aspx</link><description>&lt;p&gt;I heard from a customer who ran into an interesting issue during Visual Studio 2008 setup that I hadn't seen until now.&amp;nbsp; I wanted to post a description of the issue, how we diagnosed it and how to work around the issue in case anyone else runs into a similar issue in the future. &lt;p&gt;&lt;strong&gt;Description of this issue&lt;/strong&gt; &lt;p&gt;On this customer's system, the Web Authoring Component prerequisite component failed to install and Visual Studio 2008 setup failed as a result.&amp;nbsp; There are many possible causes for this type of failure, so we need to dig deeper to try to find the exact cause of the failure. &lt;p&gt;&lt;strong&gt;How to diagnose this issue&lt;/strong&gt; &lt;p&gt;Visual Studio 2008 setup runs the Web Authoring Component setup package in silent mode, so the next step is to take a look at the log file for the Web Authoring Component to narrow down the issue further.&amp;nbsp; This issue will cause the following information to be written to the log file for the Web Authoring Component (named %temp%\SetupExe(*).log): &lt;blockquote&gt; &lt;p&gt;Catalyst valid path check failed: The path c:\Program Files\\Microsoft Web Designer Tools is invalid&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Notice that there is an extra backslash between Program Files and Microsoft Web Designer Tools in this log file.&amp;nbsp; I had the customer check their registry and we found that the path to the Program Files folder was being stored there with a trailing backslash, but Windows typically stores the path to Program Files and other system folders without trailing backslashes. &lt;p&gt;In this scenario, it is also possible to run Web Authoring Component setup directly from &amp;lt;VS install path&amp;gt;\WCU\WebDesignerCore\WebDesignerCore.exe in order to see a specific error message instead of looking at the log files. &lt;p&gt;&lt;strong&gt;How to work around this issue&lt;/strong&gt; &lt;p&gt;To work around this issue, you can change the value that Windows uses for the Program Files directory on your system by doing the following: &lt;ol&gt; &lt;li&gt;Click on the Start menu, choose Run, type regedit and click OK  &lt;li&gt;Locate the following registry value:&lt;br&gt;&lt;/li&gt;[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion]&lt;br&gt;ProgramFilesDir&lt;br&gt;&lt;br&gt; &lt;li&gt;Remove the trailing backslash from this ProgramFilesDir registry value &lt;li&gt;Close regedit and reboot the computer &lt;li&gt;Re-run Web Authoring Component setup from &amp;lt;VS install path&amp;gt;\WCU\WebDesignerCore\WebDesignerCore.exe  &lt;li&gt;Look at %temp%\SetupExe(*).log and verify that installation succeeded this time  &lt;li&gt;Re-run Visual Studio 2008 setup to complete installation&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;One note about this issue - the Web Authoring Component setup package uses the same setup wrapper as the Office 2007 family of products.&amp;nbsp; It appears that other Office 2007 products may have similar installation errors if the ProgramFilesDir value has a trailing backslash like this.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7104519" width="1" height="1"&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=18200"&gt;</description><author>Aaron Stebners WebLog</author><pubDate>2008-01-14T00:00:00</pubDate><category>ASP.NET</category></item><item><title>Correct using Cache in ASP.NET</title><link>http://softlogger.com/18102/ASP-NET/correct-using-cache-in-asp-net.aspx</link><description>&lt;p&gt;Often in ASP.NET application we see a code which looks like this one:&lt;/p&gt;
&lt;div class="codecolorer-container c#"&gt;&lt;div class="codecolorer" style="font-family: monospace;"&gt;&lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;(&lt;/span&gt;Cache&lt;span class="br0"&gt;[&lt;/span&gt;&lt;span class="st0"&gt;"SomeData"&lt;/span&gt;&lt;span class="br0"&gt;]&lt;/span&gt; != &lt;span class="kw2"&gt;null&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;br /&gt;
&lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;
    &lt;span class="kw4"&gt;string&lt;/span&gt; name = &lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;SomeClass&lt;span class="br0"&gt;)&lt;/span&gt; Cache&lt;span class="br0"&gt;[&lt;/span&gt;&lt;span class="st0"&gt;"SomeData"&lt;/span&gt;&lt;span class="br0"&gt;]&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;.&lt;span class="me1"&gt;Name&lt;/span&gt;;&lt;br /&gt;
    &lt;span class="co1"&gt;//.....&lt;/span&gt;&lt;br /&gt;
&lt;span class="br0"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Experienced developer, even if he is not a paranoiac, will find possible problem immediately — &lt;tt&gt;NullReferenceException&lt;/tt&gt;. That’s because of caching implementation in ASP.NET. In ideal case an object, that has been cached, will stay there up to application restart, but in real world it could be deleted between two calls: by the garbage collector when memory is over (because cache uses weak references &lt;tt&gt;WeakReference&lt;/tt&gt;); by another thread to refresh cached data.&lt;/p&gt;
&lt;p&gt;So the code I have mentioned before works in 99% of all cases, but sometimes you will get errors in your log, which can not be reproduced easily. Here is right cache usage approach:&lt;/p&gt;
&lt;div class="codecolorer-container c#"&gt;&lt;div class="codecolorer" style="font-family: monospace;"&gt;SomeClass someClass = Cache&lt;span class="br0"&gt;[&lt;/span&gt;&lt;span class="st0"&gt;"SomeData"&lt;/span&gt;&lt;span class="br0"&gt;]&lt;/span&gt; as SomeClass;&lt;br /&gt;
&lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;(&lt;/span&gt;someClass != &lt;span class="kw2"&gt;null&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;br /&gt;
&lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;
    &lt;span class="kw4"&gt;string&lt;/span&gt; name = someClass.&lt;span class="me1"&gt;Name&lt;/span&gt;;&lt;br /&gt;
    &lt;span class="co1"&gt;//.....&lt;/span&gt;&lt;br /&gt;
&lt;span class="br0"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Do not relax your vigilance, it’s exactly what &lt;strong&gt;they&lt;/strong&gt; are waiting for! (about bugs)&lt;/p&gt;
&lt;a href="http://kpumuk.info/tag/asp.net/" rel="tag"&gt;asp.net&lt;/a&gt;, &lt;a href="http://kpumuk.info/tag/caching/" rel="tag"&gt;caching&lt;/a&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/kpumuk?a=EILwcjd"&gt;&lt;img src="http://feeds.feedburner.com/~f/kpumuk?i=EILwcjd" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/kpumuk?a=lFKOQRd"&gt;&lt;img src="http://feeds.feedburner.com/~f/kpumuk?i=lFKOQRd" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/kpumuk?a=r6q6Nod"&gt;&lt;img src="http://feeds.feedburner.com/~f/kpumuk?i=r6q6Nod" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/kpumuk?a=Ijf5CrD"&gt;&lt;img src="http://feeds.feedburner.com/~f/kpumuk?i=Ijf5CrD" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/kpumuk/~4/215627214" height="1" width="1"/&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=18102"&gt;</description><author>Dmytro Shteflyuks Home</author><pubDate>2008-01-12T00:00:00</pubDate><category>ASP.NET</category></item><item><title>Getting your Control to Function, and putting your Function in Control</title><link>http://softlogger.com/17730/ASP-NET/getting-your-control-to-function-and-putting-your-function-in-control.aspx</link><description>&lt;P&gt;&lt;EM&gt;&lt;FONT color=#ff0000&gt;From the recently pre-recorded blogs collection...&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;The other day, Rob asked me via the Contact link:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT face="times new roman,times"&gt;&lt;EM&gt;I'm trying to find a way to fix the function key on the Mac Book Pro I got to run Vista on. Yes, seems a bit silly to run Vista on a computer tuned for Mac, but it's a fast laptop.&lt;BR&gt;&lt;BR&gt;One of the issues which has me stuck is that I want to swap the Control and Function Keys (apple made them backwards for people who are familiar with windows). I'd just get used to it, but I have more than one computer and my brain isn't as flexible as it used to be.&lt;BR&gt;&lt;BR&gt;So the question is, all of the keyboard mapping programs I've looked at don't recognize it when I press the function key on this keyboard. It seems like almost every other key is recognized.&lt;BR&gt;&lt;BR&gt;Your name popped up on a few webs about containing programs like these, so I though I might email you and see if you understood the innerworkings of keyboards enough to shed some light on the situation.&lt;BR&gt;&lt;BR&gt;Thanks much,&lt;BR&gt;Rob&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The good old &lt;STRONG&gt;Function&lt;/STRONG&gt; or &lt;STRONG&gt;Fn&lt;/STRONG&gt; key has been around laptops for a while, with a true purpose of doing all&amp;nbsp;manner of "special" operations. One on my Dell Latitude D800:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://trigeminal.com/images/fn_dell.png"&gt;&lt;/P&gt;
&lt;P&gt;and on my MacBook Pro:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://trigeminal.com/images/fn_apple.png"&gt;&lt;/P&gt;
&lt;P&gt;show the difference that Rob is talking about, and wanting to switch them makes a whole bunch of sense, in either direction -- because if the main goal is consistency, then as long as you can just choose one or the other, you can all it a day.&lt;/P&gt;
&lt;P&gt;Let's see what this key gives us for our programs in terms of scan code, say using that bit of code from &lt;A class=" " href="http://blogs.msdn.com/michkap/archive/2005/12/15/504092.aspx" mce_href="http://blogs.msdn.com/michkap/archive/2005/12/15/504092.aspx"&gt;&lt;STRONG&gt;Handling [Unicode] input in the console&lt;/STRONG&gt;&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;If you test with this key, it gives you nothing back at all on either machine, unless you combine it with one of the assigned combinations. The key simply does not exist to the operating system and appears to be entirely hardware mediated. Which means that in order to switch it you would need some kind of assistance/tool from the OEM to switch them.&lt;/P&gt;
&lt;P&gt;There seem to be helpful hints for some remappings like &lt;A class=" " href="http://www.macosxhints.com/article.php?story=20050801052917667" mce_href="http://www.macosxhints.com/article.php?story=20050801052917667"&gt;this one&lt;/A&gt;, but the same technique does not appear to help with the &lt;STRONG&gt;Fn&lt;/STRONG&gt; key. &lt;/P&gt;
&lt;P&gt;However there is a thread over on the apple site &lt;A class=" " href="http://discussions.apple.com/thread.jspa?threadID=1221241" mce_href="http://discussions.apple.com/thread.jspa?threadID=1221241"&gt;here&lt;/A&gt; that in answer to this very question pointed to a tool called DoubleCommand that seems to solve this problem nicely via a kernel extension. The same tool is apparently used to make other swap so that their Mac keyboard can be more Windows-ey....&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ff00ff&gt;&lt;EM&gt;This post brought to you by&lt;/EM&gt;&lt;FONT size=5&gt; ? &lt;/FONT&gt;&lt;EM&gt;(&lt;A class=" " href="http://www.fileformat.info/info/unicode/char/3399" mce_href="http://www.fileformat.info/info/unicode/char/3399"&gt;U+3399&lt;/A&gt;, aka SQUARE FM)&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7009288" width="1" height="1"&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=17730"&gt;</description><author>Sorting It All Out</author><pubDate>2008-01-11T00:00:00</pubDate><category>ASP.NET</category></item><item><title>Large file uploads in ASP.NET</title><link>http://softlogger.com/17861/ASP-NET/large-file-uploads-in-asp-net.aspx</link><description>&lt;p&gt;Uploading files via the &lt;a href="http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.fileupload.aspx"&gt;FileUpload&lt;/a&gt; control gets tricky with big files. The default maximum filesize is 4MB - this is done to prevent denial of service attacks in which an attacker submitted one or more huge files which overwhelmed server resources. If a user uploads a file larger than 4MB, they'll get an error message: "Maximum request length exceeded."&lt;/p&gt; &lt;h3&gt;Increasing the Maximum Upload Size&lt;/h3&gt; &lt;p&gt;The 4MB default is set in machine.config, but you can override it in you web.config. For instance, to expand the upload limit to 20MB, you'd do this:&lt;/p&gt; &lt;div&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;system.web&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;httpRuntime&lt;/span&gt; &lt;span style="color: #ff0000"&gt;executionTimeout&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="240"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;maxRequestLength&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="20480"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;
&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;system.web&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Since the maximum request size limit is there to protect your site, it's best to expand the file-size limit for specific directories rather than your entire application. That's possible since the web.config allows for cascading overrides. You can add a web.config file to your folder which just contains the above, or you can use the &amp;lt;location&amp;gt; tag in your main web.config to achieve the same effect:&lt;/p&gt;
&lt;div&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;location&lt;/span&gt; &lt;span style="color: #ff0000"&gt;path&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Upload"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;system.web&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;httpRuntime&lt;/span&gt; &lt;span style="color: #ff0000"&gt;executionTimeout&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="110"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;maxRequestLength&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="20000"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;system.web&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;location&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;What Happens When I Upload A File That's Too Big?&lt;/h3&gt;
&lt;p&gt;While expanding the upload restriction is a start, it's not a full solution for large file uploads. Milan explains one of the biggest problems with large file uploads in &lt;a href="http://aspnetresources.com/articles/dark_side_of_file_uploads.aspx"&gt;The Dark Side Of File Uploads&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;It gets really interesting if someone uploads a file that is too large. Regardless of what your &lt;code&gt;maxRequestLength&lt;/code&gt; setting mandates, IIS has to guzzle it, and then ASP.NET checks its size against your size limit. At this point it throws an exception.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;a href="http://aspnetresources.com/articles/dark_side_of_file_uploads.aspx"&gt;As Milan explains&lt;/a&gt;, you can trap the exception, but it's trickier than you'd expect. He talks about overriding Page.OnError and checking for HTTP error code 400 when the error is HttpException, which as he says is less than ideal.&lt;/p&gt;
&lt;h3&gt;At Least Give Me A Warning&lt;/h3&gt;
&lt;div&gt;If we've got a set limit on file upload sizes, we should at least tell our users what it is. Since this is a configurable value which we may change later, the best is to make our file size warning read directly from web.config setting. The best way to do this is to pull back the httpRuntime section as a HttpRuntimeSection object, which isn't too hard given: &lt;/div&gt;
&lt;div&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;System.Configuration.Configuration config = WebConfigurationManager.OpenWebConfiguration(&lt;span style="color: #006080"&gt;"~"&lt;/span&gt;);
HttpRuntimeSection section = config.GetSection(&lt;span style="color: #006080"&gt;"system.web/httpRuntime"&lt;/span&gt;) &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; HttpRuntimeSection;
&lt;span style="color: #0000ff"&gt;double&lt;/span&gt; maxFileSize = Math.Round(section.MaxRequestLength / 1024.0, 1);
FileSizeLimit.Text = &lt;span style="color: #0000ff"&gt;string&lt;/span&gt;.Format(&lt;span style="color: #006080"&gt;"Make sure your file is under {0:0.#} MB."&lt;/span&gt;, maxFileSize);&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;A Real Solution: an HttpModule to Handle File Uploads&lt;/h3&gt;
&lt;p&gt;There are better solutions to handling large file uploads in ASP.NET. A custom HttpHandler can provide a better user experience by displaying upload progress and allowing you to handle a file size problem in a more controlled fashion. Here's a summary from a cursory search:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.mediachase.com/fuploader/overview.aspx"&gt;FileUploader.NET&lt;/a&gt; (MediaChase, $310 and up) 
&lt;li&gt;&lt;a href="http://www.telerik.com/products/aspnet/controls/upload/overview.aspx"&gt;RadUpload&lt;/a&gt; (Telerik, $249) 
&lt;li&gt;&lt;a href="http://www.brettle.com/neatupload"&gt;NeatUpload&lt;/a&gt; (Free, LGPL license) 
&lt;li&gt;&lt;em&gt;Which others did I miss?&lt;/em&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;One of the longest running threads on the ASP.NET Forums (going back 5 years): &lt;a href="http://forums.asp.net/t/55127.aspx"&gt;HttpHandler or HttpModule for file upload, large files, progress indicator?&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;A Better Solution: a RIA upload component&lt;/h3&gt;
&lt;p&gt;The project which caused me to look into this, Video.Show, was based on ASP.NET and Silverlight 1.0, so we weren't able to take advantage of RIA platforms which would support more advance upload handling. In most cases, though, I'd recommend replacing the FileUpload component with a Silverlight or Flash based file upload control. In addition to a better upload experience, these controls generally look better than the the generic button displayed for the &amp;lt;input type="file"&amp;gt; element which is rendered by the FileUpload control. The input / file element doesn't allow for CSS formatting, although &lt;a href="http://www.shauninman.com/archive/2007/09/10/styling_file_inputs_with_css_and_the_dom"&gt;smart CSS hackers always seem to find a way around these things&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Although there doesn't seem to be a project / component to support Silverlight uploads yet, Liquid Boy has a nice sample of a &lt;a href="http://advertboy.wordpress.com/2007/12/20/flickr-multi-picture-uploader-done-in-silverlight/"&gt;Silverlight 1.1 (oops, 2.0) based upload control&lt;/a&gt;. I've heard good things about &lt;a href="http://swfupload.org/"&gt;SWFUpload&lt;/a&gt;, a Flash and JavaScript based upload system. Developers are responsible for handling a few JavaScript events as well as accepting the file on the server. That can be done pretty easily, as you can see from &lt;a href="http://swfupload.org/node/47"&gt;this ASP.NET sample implementation&lt;/a&gt;. Here's a screenshot from one of the &lt;a href="http://demo.swfupload.org/"&gt;SWFUpload online demos&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;a title="SWFUpload" href="http://www.flickr.com/photos/36836555@N00/2176842665/"&gt;&lt;img alt="SWFUpload" src="http://static.flickr.com/2005/2176842665_961cdc9180.jpg" border="0"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;What About IIS7?&lt;/h3&gt;
&lt;p&gt;Oh, and there's more thing to worry about. IIS7 has a built-in request scanning which imposes an upload file cap which defaults to 30MB. Again, this is a good feature, but it gets in the way if you're looking to upload files larger than 30MB. &lt;a href="http://weblogs.asp.net/steveschofield/archive/2007/05/11/iis7-post-40-adjusting-file-upload-size-in-iis7.aspx"&gt;Steve Schofield posted about how to change this from the comandline&lt;/a&gt;:&lt;/p&gt;
&lt;div&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;appcmd set config &lt;span style="color: #006080"&gt;"My Site/MyApp"&lt;/span&gt; -section:requestFiltering -requestLimits.maxAllowedContentLength:104857600 -commitpath:apphost&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;Why is this such a pain?&lt;/h3&gt;
&lt;div&gt;Browsers, and HTML in general, were never designed to handle large uploads gracefully. &lt;a href="http://codinghorror.com/blog"&gt;Jeff Atwood&lt;/a&gt; and I discussed this back in September, and he summed up the issue pretty well in his post asking &lt;a href="http://www.codinghorror.com/blog/archives/000964.html"&gt;Why Are Web Uploads So Painful?&lt;/a&gt; It's disappointing that browser standards have failed us to the point that we need to use browser extension technologies like Flash and Silverlight as a band-aid here. Browsers should support uploads over both HTTP and FTP (it is the &lt;em&gt;file&lt;/em&gt; transfer protocol, after all), and should manage the upload in a side or toolbar that allows us to continue browsing without breaking the upload. The &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/4724"&gt;Firefox Universal Upload&lt;/a&gt; add-on is an example of how this should work out of the box.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;Historical trivia: In ASP.NET 1.0 and 1.1, the entire file was loaded into memory before being written to disk. There were improvements in ASP.NET 2.0 to stream the file to disk during the upload process.&lt;/div&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5567941" width="1" height="1"&gt;
&lt;p&gt;&lt;a href="http://feeds.feedburner.com/~a/jongalloway?a=v0E3b4"&gt;&lt;img src="http://feeds.feedburner.com/~a/jongalloway?i=v0E3b4" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/jongalloway?a=1gAbJSD"&gt;&lt;img src="http://feeds.feedburner.com/~f/jongalloway?i=1gAbJSD" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jongalloway?a=uQqJQOd"&gt;&lt;img src="http://feeds.feedburner.com/~f/jongalloway?i=uQqJQOd" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jongalloway?a=a0Zrt9D"&gt;&lt;img src="http://feeds.feedburner.com/~f/jongalloway?i=a0Zrt9D" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jongalloway?a=LD5HIad"&gt;&lt;img src="http://feeds.feedburner.com/~f/jongalloway?i=LD5HIad" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jongalloway?a=gJk22yD"&gt;&lt;img src="http://feeds.feedburner.com/~f/jongalloway?i=gJk22yD" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/jongalloway/~4/213085211" height="1" width="1"/&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=17861"&gt;</description><author>JonGalloway.ToString()</author><pubDate>2008-01-08T00:00:00</pubDate><category>ASP.NET</category></item></channel></rss>