Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance
Friday, November 12, 2010
SQL Server Express: Failed to generate a user instance of SQL Server error
Thursday, October 28, 2010
Windows Phone 7 Trial API Walkthrough
The Windows Phone 7 Trial Mode functionality is a power and simple tool. For those unfamiliar, the Windows Phone Marketplace allows for developers to list their applications in three ways: Free, Buy, and Try-Before-Buy. In order to be more marketable, it is usually a better option to offer customers the ability to try out an application before they give you their hard earned money. Another difference between this approach and other phone marketplaces is the user experience for upgrading their app from trial to full version. It is a simple two-click process, one click to upgrade, the other to confirm the purchase.
Implementing the trial mode code is a very straight forward exercise. Here is an example:
Microsoft.Phone.Marketplace.LicenseInformation license = new Microsoft.Phone.Marketplace.LicenseInformation();public string ApplicationTitle
{
get
{
if (license.IsTrial() == true)
{
return "My App (Trial Version)";
}
else
{
return "My App";
}
}
}
The above example demonstrates how we can change the way the app behaves for a trial user versus a fully licensed user. In this case we are changing the Application Title of the app. A trial user will see “My App (Trial Version)” at the top of their screen and a fully licensed user will see “My App”. Not very limiting, I know, but it demonstrates how easy it is to implement this in your code.
The code implementation is simple because Microsoft is doing much of the heavy lifting here. The Microsoft.Phone.Marketplace.LicenseInformation class uses Microsoft’s Zune Marketplace to check the license currently installed on the phone. It returns true if the license is a trial version and false if it is the full version. This leaves the developer to spend writing code and polishing the user experience rather than writing their own licensing services or writing a completely separate trial version of their applications.
Thursday, August 5, 2010
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:
- Eliminate the use of Session State and switch to cookies, hidden form elements or some other client side mechanism.
- 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.
- 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.
Friday, June 25, 2010
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.
Wednesday, June 23, 2010
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.

