IE8 and ASP.NET Sessions

One behavior that seems to have inexplicably changed between IE8 and IE7 is the handling of session cookies. In IE7 (and 6) each browser instance and tab had it’s own session cookie and, as a result, session on the server. Not so in IE8! Every tab and browser instance (with some minor exceptions) now shares the same session cookie. When designing ASP.NET applications, this is something you need to be aware of. If you, for example, store an item currently being edited in session state and a user opens two browsers to edit two different entities, expect all kinds of strange results. If you want to test the behavior of a specific browser to see for yourself, visit this page. In my quick test, the latest version of Chrome behaves just like IE8.

So how do you make sure an application can support multiple browser windows? Well, there are a couple options, none of which is completely satisfying:

  1. Eliminate the use of Session State and switch to cookies, hidden form elements or some other client side mechanism.
  2. Enable cookiesless sessions (URL rewriting). Beware that this approach has some security implications as well as some practical effects on things like bookmarking and URL sharing.
  3. Train your users to select “New Session” from the File menu in IE8. Not exactly easy since the menus are hidden by default. If you enable them you’ll notice that you have both “New Window” and “New Session” as options. The latter will allow multiple browsers running different sessions.

The moral of the story is that if you decide to use session state, be sure to plan for users opening more than one browser window.

SQL Azure 50GB Databases Now Available

Ahead of the promised June 28 target, the SQL Azure team updated SQL Azure with Service Update 3 (SU3), providing new database sizes up to 50GB.

Web Edition databases can now be scaled to either 1GB or 5GB, while Business Edition databases have increments of 10GB, 20GB, 30GB, 40GB, and 50GB.

The Web Edition tiers are $9.99 and $49.95 monthly, while the Business Edition tiers are increments of $99.99.

The new database tiers come with a new pricing model that evaluates your maximum daily usage, and each day’s cost accrues at the appropriate tier, based on the database edition chosen. For instance, if a 20GB Business Edition database never exceeds 10GB, its daily rate accrues at the 10GB tier. On days in which the database exceeds 10GB, it accrues at the 20GB tier.

For more details, see my post here.

Azure Guest OS 1.4

A few days ago, the Windows Azure team released a new Guest OS, version 1.4. The Guest OS is what runs in Azure’s environment and hosts your running applications.

The latest update includes fixes for Azure Drives and WCF Data Services. It also includes several security patches. If your Azure deployment is configured to automatically use the latest OS, then you’re already running Guest OS 1.4. This might have breaking changes for your code if you are using WCF Data Services.

For more details, see my post here.

Silverlight Unit Testing

I have just written a short series on doing Silverlight unit testing.

Azure SDK+Tools v1.2 now available!

Today, the Azure team launched the latest SDK and related Visual Studio tools, version 1.2. This release has several features:

  • Built-in support for .NET 4 roles in your Azure application
  • IntelliTrace for debugging deployed Azure applications
  • All-new publishing wizard, allowing apps to be deployed directly to Azure without having to visit the web portal or run an external build script
  • Built-in storage and service monitoring from Visual Studio

The SDK is available for download here.

I wrote two detailed posts about this release with more information and walkthroughs:

Microsoft’s Jim Nakashima provides further detail here.