Archives / 2005
  • ASP.NET 2.0 Profile Feature

    K. Scott Allen recently published a good post on the new ASP.NET 2.0 Profile system.  The profile system provides an easy way to store and retrieve properties about users on your sites -- both logged-in and anonymous.  It can save you time and effort in providing a richer personalized experience for people using your site.

  • Making a List, Checking it Twice (Cool Ajax Sample App with ASP.NET 2.0 and Atlas)

    In case you haven’t checked out the new Atlas preview release yet (which given that it shipped a few days ago and almost everyone is on vacation this week is very likely), you might want to consider finding some time to-do so when you get a chance and are back online.  It makes common Ajax-style scenarios a breeze to build, and really makes programming a lot of fun. 

  • Upcoming Releases of Useful ASP.NET 2.0 Things

    A few people have asked me about what else is coming down the road in terms of downloads and other releases for ASP.NET 2.0.  Here is a non-exhaustive brain-dump of a few things coming out in the near future that we've been working on:

  • Free Microsoft Learning Online Course Available on ASP.NET 2.0

    Brad from the Microsoft Learning team just pointed me at a cool offer.  Basically it allows you to take a 3-hour ASP.NET 2.0 Training course for free if you register for it before January 4th (note: you then have up to 90 days after you register to take it).

  • How to Solve Beta Install Related Package Load Failures with VS 2005

    Right after VS 2005 shipped, a lot of people ran into "Package Load Errors" when trying to install and run the final release of the product.  These are often the result of having some left-over VS 2005 Beta or CTP bits that weren't uninstalled completely on the same machine.

  • Cross-Page Navigation Techniques in ASP.NET

    Ting (one of the key guys on the ASP.NET Team) has posted an awesome blog post detailing all of the different techniques for doing Cross-Page navigation in ASP.NET, including: client-side redirects, server-side redirects, the new ASP.NET 2.0 cross-page posting feature, the new ASP.NET 2.0 multi-view control, and the new ASP.NET 2.0 Wizard Control.  In his post he includes a sample for each.

  • Logging ASP.NET Application Shutdown Events

    Someone on a listserv recently asked whether there was a way to figure out why and when ASP.NET restarts application domains.  Specifically, he was looking for the exact cause of what was triggering them on his application in a production shared hosted environment (was it a web.config file change, a global.asax change, an app_code directory change, a directory delete change, max-num-compilations reached quota, \bin directory change, etc). 

  • "CSS Properties Window" Download Available for VS 2005

    One of the process things we've been doing on our team lately has been to provide an opportunity for team members to spend time building and shipping personal projects that enhance the core shipping products.  On the updated site that we launched last month, we created a "Sandbox" tab that provides an outlet for team members to make these projects available to the public.  Over time you'll start to see more and more projects appear there that you can take advantage of with web development.

  • Grid and Flow Modes in VS 2005 and Visual Web Developer

    One of the changes made between VS 2003 and VS 2005 was to change the default page layout mode in the WYSIWYG designer from "Grid" to "Flow" mode.  Mike Pope has a good post that talks about how to enable and still use 2D grid-layout mode if you prefer that.  One nice addition is the ability to optionally use absolute/grid layout on just individual controls instead of having to-do it for the entire page.

  • Sending Email with System.Net.Mail

    .NET 2.0 includes much richer Email API support within the System.Net.Mail code namespace.  I've seen a few questions from folks wondering about how to get started with it.  Here is a simple snippet of how to send an email message from “” to multiple email recipients (note that the To a CC properties are collections and so can handle multiple address targets):

  • Configuration Section Code Generator and XML Intellisense Schema Builder for Web.Config files

    Dmitry (the Dev Manager for ASP.NET) has been working in his spare time on building a cool disk-based output caching module for ASP.NET 2.0 (he is planning to post it on the web once it is done).  One of the things he discovered in building it was how repetitive it was to have to hand-generate configuration section handlers for web.config files, as well as the intellisense schema files to provide intellisense support for them in VS 2005.

  • Building your own Data Source Controls in ASP.NET 2.0

    ASP.NET 2.0 introduces a powerful new declarative data-source model.  Among other things, it makes doing data access much easier in a stateless-web world -- and eliminates many of the hurdles developers have to jump through today to handle repeated data UI operations on the server.  Included in the box is the new ObjectDataSource control, which you can use to databind to any .NET class -- no special databinding interfaces are required, and it enables pretty easy three-tier databinding scenarios.

  • Cache Manager

    Steve Smith has written a cool application that helps you monitor and manage your cache values in ASP.NET.  Read all about it and track its progress here.

  • VirtualPathProvider Extensibility in ASP.NET 2.0

    One of the really powerful things we did in ASP.NET 2.0 was to build a pluggable provider abstraction for a web app’s file activity, and to then re-plumb the ASP.NET parser, compiler, and other path/content/page related work to go through it.  What this ends up delivering is a lot of extensibility capabilities not possible in ASP.NET V1.1.

  • A few of my favorite new HTML source editor features in Visual Web Developer & VS 2005

    We spent a lot of time in Visual Web Developer and VS 2005 focusing on delivering a really great HTML source editing experience (we also did a lot in design-view – but this blog post is just about the HTML source editor).  Below are a few of the cool new features it enables (none of these were in VS 2003).  All but one of the features are in the free Visual Web Developer Express version that you can download.

  • ASP.NET 2.0 Security Best Practices (and the declarative PrincipalPermission attribute)

    This is a great MSDN whitepaper about ASP.NET 2.0 Security Best Practices.  I’d definitely recommend setting aside some time to read it.  At the bottom of the whitepaper there are then links to another 28 additional ASP.NET HowTo security whitepapers.  Most of the articles were rated a perfect 9 out of 9 from people who have read them – always a good sign of great content.

  • Url Mapper w/ Regex Support

    Several people have asked why the built-in URL Mapper in ASP.NET 2.0 doesn't support regular expressions.  There were actually a few reasons for this -- one of the big ones being that just about the time we were about to consider adding it my team started also working on IIS7.  We realized that a full-featured version would want/need to take advantage of some of the new features in IIS7 as well as the support all content types (in particular -- images and directories).  So we postponed making it feature rich until a future version.

  • Tips for Nested Master Pages and VS 2005 Design-Time

    One of the cool advanced features of the new Master Pages feature in ASP.NET 2.0 is the ability to nest them.  For example, you could define a top-level master-page called “MainMaster.master” that defines a common logo header and footer, and defines a content-placeholder for the page called “content”.  You could then define two sub-masters beneath it – one that provides a two-column layout model for the content (“TwoColumnMaster.master”), and one that provides a three-column layout model (“ThreeColumnMaster.master”).  These two nested-master pages could then use the MainMaster.master file as the root master, and only adjust the layout within its content section (each would fill in the "content" placeholder and in turn add their own content-placeholders for sub-pages within it).  The benefit of this approach is that if a designer ever changed the logo or top-level design of the site, they only have to update one file (MainMaster.master) and then have every page on the site automatically pick it up regardless of what master file they were based on.

  • Forms Authentication timeout default in ASP.NET 2.0

    One thing to be aware of when upgrading from ASP.NET V1.1 to V2.0 is that the forms authentication timeout value has changed to be 30 minutes by default.  This means that after 30 minutes of inactivity, a user will be prompted to login again (note: everytime they hit the site the 30 minute window clock gets reset -- so it is only if they are idle that it will timeout). 

  • Visual Studio 2005 Profiles and a Few Tweaks I like to Make

    One of the new features in VS 2005 is the support for “profiles” in the IDE.  Profiles provide the ability to define pre-set defaults for options, menus, key-bindings, and command-bars across the tool-set.  VS 2005 ships with several built-in profiles out of the box including: VB, C#, C++, Web, Test, and a General Development Settings similar to 2003.  When VS launches the very first time it prompts a user to pick which of these profiles to use by default (note that you can build all app types and even use all languages regardless of which profile you pick).

  • Great Site Navigation,TreeView and Menu Content

    Danny Chen on the ASP.NET product team has been blogging some really great content on the new Site Navigation, TreeView and Menu features in ASP.NET 2.0.  Definitely worth checking out -- these features can save a lot of time with common web-site navigation:

  • How to add a Login, Roles and Profile system to an ASP.NET 2.0 app in only 24 lines of code

    I’ve seen a few questions in the forums lately looking for examples on how to use the CreateUserWizard control to create new users in the ASP.NET 2.0 membership system, and then as part of the registration process assign the new user into custom roles and/or collect and store custom profile properties about them (country, address, gender, zipcode, etc).

  • Web Hosting Upsize Tool for SQL Express

    Brad and Polita on my team have been working on a cool tool for hosting providers that will enable developers to easily deploy and manage ASP.NET 2.0 database driven applications written using SQL Express on a hosted web-server.

  • Async Pages in ASP.NET 2.0

    One of the cool new advanced features in ASP.NET 2.0 is support for pages that execute otherwise blocking operations asynchronously.  This allows ASP.NET to re-use the worker thread while waiting for a completion (for example: calling a remote web-service and waiting for the response) and allows the server to execute much more efficiently.

  • On Vacation the Next Two Weeks

    I just wanted to post a quick note to say that I'll be on vacation (without any access to email) the next two weeks visiting scenic places in Italy.  If you post an email or comment to me through my blog I will get back to you when I return (just wanted to let you know I wasn't ignoring you <g>).

  • Microsoft Expression “Quartz Web Designer”

    This morning at the PDC Microsoft announced the new Expression Designer line of products.  Included as part of the Expression suite is the new product currently codenamed Microsoft Expression “Quartz Web Designer”.

  • Atlas Unleashed...

    I just finished up giving my keynote demo with Anders, Don and Chris about an hour ago.  Coding on the fly in front of 8,000 people for 45 minutes on a single machine with no cutaways or backups is fairly adrenaline rushing. :-)  I think it went pretty well and it was a lot of fun to-do.  A little later today I’m going to try and blog up the code we wrote for Atlas, as well as the screenshots so people can see what we did (update: here it is:

  • Defining Custom Item Templates in Web Projects with VS 2005

    One of the cool new features in VS 2005 that I was playing with a little today is the ability to export and then re-use project item templates.  This enables developers to easily define common templates that they can re-use over and over when adding new pages/classes/controls into web projects or class libraries, and avoid repetitively typing standard content or code.

  • PDC Soon

    I've seen a number of people post their "I'm off to the PDC" posts today and yesterday, so I thought I'd do my obligatory one too. :-)

  • Building Custom Build Providers with ASP.NET 2.0 and VS 2005

    One of the cool new features in ASP.NET 2.0 is support for what we call "build providers".  These are providers that can plug into the ASP.NET compilation system and provide custom compilation support for file-types.  ASP.NET ships with a number of built-in providers in the box -- including support for .wsdl and .xsd files.  These providers can automatically generate the appropriate proxy or dataset class for you without you having to manually generate code and keep it in sync with the declarative format (I believe they also generate as partial types -- so you can add your own object model and methods to extend them).

  • Building Re-Usable ASP.NET User Control and Page Libraries with VS 2005

    One of the questions I’ve been asked a few times recently is whether it is still possible to build web projects that encapsulate common libraries of .ascx web user controls or .aspx pages with VS 2005 that can then be easily re-used across multiple other web projects (note: the quick answer is “yes").

  • Some techniques for better managing files in VS 2005 Web Projects

    I’ve seen several questions come up in the last few days regarding techniques for structuring project layouts with web projects in VS 2005.  In particular, I’ve received several good questions asking for ways to manage large image directories as well as temporary storage directories underneath web project roots.  One goal with both questions has been to find ways to avoid these files from showing up in the VS web project solution explorer and cluttering up the web project view, as well as to avoid having these files/directories be prompted to be added to source control during check-in (note: you can just unclick having these files added to source control – but having to-do so can be a pain). 

  • Using IIS with VS 2005 and the new Web Project system

    A number of people have asked me questions through my blog over the last few days about how VS 2005 uses and handles IIS (especially in cases of nested applications and virtual directories).  This blog entry provides more information on how this works, and hopefully clears up a few questions people might have.

  • VS 2005 Web Project System: What is it and why did we do it?

    There has been a lot of online discussion lately about the new web project system that is being introduced with VS 2005.  My goal with this post is to explain a little more about what it is, and provide some background as to the features it provides and the motivation we had in introducing it.

  • Quick Web Project System Post

    I've been on vacation the last few days in Mexico (and fly back Sunday night), so am just catching up on all the web project system threads that have been flying the last 48 hours (serves me right for finding an internet cafe to check my email when I'm not supposed to).

    I'm planning on posting a blog post on Monday or Tuesday when I get back that goes into the web project system in more detail and why we've made some of the changes we've made.  My sense in reading some of the recent comments is: 1) we haven't done a good job of explaining all the new capabilities that the new web project system provides (and there are a lot of good new features), and 2) we haven't done a good job of clarrifying people's concerns about the changes and what they might worry about loosing in terms of functionality as a result of them.

  • Obscure but cool feature in ASP.NET 2.0

    I learned about a neat little feature that I didn't know existed in ASP.NET 2.0 today that I thought I'd pass on.  It is a way to extend the attributes supported by the <%@ Page %> directive at the top of a .aspx page.  Previously the supported page directive attributes were hard-coded and the parser only supported the specific ones that ASP.NET knew about out of the box.  With ASP.NET 2.0, if you declare a base-class with a public property, you can now set it using a page directive attribute. 

  • ASP.NET 2.0 and VS 2005 Web Cast

    I filmed a webcast at MS Studios about a month ago where I walked through ASP.NET 2.0 and Visual Studio 2005 in depth (some slides -- but mostly demos).  The quality of the recording (especially the demos) is pretty good.

  • Compatibility Testing with ASP.NET 2.0

    My team has been cranking hard on our RTM milestone, and we are driving to hit our final ASP.NET + Visual Web Developer ZBB (Zero Bug Bounce) on June 3rd.  Shortly after this we’ll enter lock-down and enter a phase where we’ll be responding to last minute bugs, customer reported issues, and driving long-haul stress results.

  • Whdbey Beta2 Build Number and the Build Numbering Scheme we use in DevDev

    A few people have sent me email wondering about the final build number of Beta2.  I posted in my blog yesterday that the Beta2 build was build #50215.45 -- and yet when people hit the About menu on the Beta2 bits on MSDN it comes back #50215.44. 

    The reason for the difference is that the only change between .44 and .45 was the inclusion of an updated drop of SQL Express binaries.  As such, we did not re-build the Visual Studio or .NET Framework binaries (since test had already signed off on those) - and instead just updated setup to pick up the new SQL binaries.  Consequently, when you hit the about box in VS you’ll see the .44 version string displayed -- even though technically it is from the .45 setup package. 

    As an aside, the version numbering system we use within the developer division is somewhat clever yet simple.  Some teams just increment the build number by one on each build (1, 2, 3, 4, n).  A few years ago we went to a model where we use the build date to drive the build number instead.  Specifically, the first digit of the build indicates the year, the next two digits the month, and the final two digits the day.  The benefit of an approach like this is that it makes it pretty easy to figure out which build was produced when -- and to be able to quickly figure out how old a bug is when we get a bug report.  So build 50215 would indicate the build from Feb 15th, 2005.  Build 50115 is the build from Jan 15th, 2005.  Build 40215 is the build from Feb 15th, 2004.

    As we get closer to releasing a product we will lock down the version number and instead go to point builds.  These increment one for each new release/build we make.   So the .45 build is the 45th build since we entered lock-down on Feb 15th.

  • Whidbey Beta2 Sign-Off (build #50215.45)

    Two nights ago we officially signed off on the Beta2 build of Whidbey (build# 50215.45).  It was a long time coming (9 months since Beta1!), but hopefully people will find it well worth the wait.

    Staying focused over such a long time is hard, but our team held up really well and did a super job shipping a high quality release.  I’m particularly proud of the folks on my team who run our stress program.  They keep a lab of ~1000 machines running 24/7 throughout the year, and delivered a punishing level of stress load on machines looking for hard to find production bugs.

    We have about 40 different stress variations that we run constantly -- some that do normal web operations (data access, security, output caching, session management, etc), some that do lots of less typical things (lots of compilation changes under load, changing configuration files under load to cause app-domain restarts), and some that do things that are deliberately downright nasty (memory leaks, AV crashes, deadlocks -- where the goal is to ensure that ASP.NET automatically recovers from them). 

    We hook up debuggers and watch for first-chance exceptions, monitor memory usage in the worker processes to watch for leaks, and ensure that performance stays within a consistent RPS range throughout the runs.  Any deviations trigger our debuggers to automatically break-into the process and halt the run for analysis and investigation.

    We basically repeat this process over and over again 24 hours a day until each of the 40 different variations passes 300 10-hour runs in a row without incident on each different hardware and OS configuration we support (Windows 2000 Single Proc, Windows 2000 2P, Windows 2003 1P, Windows 2003 2P -- with WS03 repeated for x86, x64 and IA64 processors).  We then also do longer-haul runs that run on higher-end 4P hardware that runs for a week under extreme load using a combination of different variations (we also then on the IIS side do long-haul runs that take a full 21 days and put extremely heavy load testing our worker process reliability). 

    Needless to say, it can take awhile to get everything passing.  In the early days of the stabilization for Beta2 it was pretty easy to find issues.  As we lock down changes in the overall stack, it takes longer and longer for them to surface.  Sometimes we had to-do 200-250 runs for a bug to surface, and even then it might take multiple “hits” before we could figure out what exactly was causing it.  The stress team did an awesome job driving this process forward and chasing down the final bugs through long days and late nights (it was not uncommon for them to be in the lab until 4-5am and then have to be back by 9am to give updates to our war team).

    We report our stress numbers every few days as all of the runs for a particular build complete in the lab.  Over the last month the numbers have steadily risen by a few percentage points a run as each remaining stress issue was found and fixed.  About two weeks ago we knew we were getting close -- with hardware architectures starting to report 100% one by one (x86 single proc and multi-proc first, then x64, etc).  A week ago we kicked off the final long-haul run -- it completed with 100% passing around 3:30pm on Thursday.  We officially signed off as a division on Beta2 a little later that night.

    Yesterday we held our obligatory ship party to celebrate.  It has been a long road together, and it was really cool to see the 1500+ people who have worked on the project all in one place kicking back.  Dmitry and I chipped in and bought some fun t-shirts that arrived just in time before the party to hand out.  They immortalize one of our last stress failure stack traces that we fixed (click the image to see the full details):

    The official beta2 bits should show up on MSDN shortly.  Along with the bits we’ll be releasing the “Go-Live” license which means that you’ll be able to go live with production applications on top of the beta (one of the reasons we’ve been so hardcore about fixing all stress issues the last few months).  We are also in the process of updating key Microsoft internal and external sites to run on top of the final Beta2 build starting this week as well.  The final result of this work will be the reliable, most scalable and fastest web platform out there.

    All of us on the team are looking forward to seeing all the cool apps built on top of it.  Good luck with it!

    - Scott

  • ScottGu chatting on MSDN right now

    Sorry for the late notice -- but I thought I'd pass along the fact that I'm in a online MSDN chat room talking about Whidbey right now.  You can join by following this link:

  • Mac OS X is fun

    I noticed a few blog posts on scroll by in the last day about the new breed of Apple machines coming out and the coolness of Panther:

  • ScottGu Channel 9 Interviews

    I did my first sit-down channel 9 interview last month which was fun.  They posted the first half of the interview last week, and just posted the second part today.  We covered a whole bunch of topics including: