Fix for ADO.NET 2.0 and SQL Server 2005

One of the demos I put together for my NHibernate talk at the Heartland Developers Conference this week involves managing transactions, where I show a couple different ways to accomplish the task. The database I'm using is a local SQL Server 2005 instance and everything was well and good until I get to the part where I make something go wrong so that the transaction gets rolled back appropriately. Once the transaction rolled back and I went to requery the database to show the data was in the same state as when I started, I got this weird error:

"New request is not allowed to start because it should come with valid transaction descriptor"

This wasn't quite a showstopper for the demo because I had a workaround, but it meant that part of the demo wouldn't run as smoothly as I wanted it to. I had a feeling it was specific to SQL Server 2005 because this same demo worked fine against SQL Server 2000 and after troubleshooting it for much longer than I should have, I found MS KB article 916002 that addresses the problem and provides a hotfix. I installed the hotfix and was good to go.

If you're developing an app that uses ADO.NET 2.0 transactions against a SQL Server 2005 database, you must install this hotfix to avoid the above exception (it turns out I would have eventually run into this anyway because this is what we'll be doing on my current project).
Print | posted on Wednesday, October 25, 2006 6:57 AM
Comments have been closed on this topic.