SqlCacheDependency Hell

I just emerged from SqlCacheDependency hell–actually, SQL Server 2005 hell. I thought I’d document the problem (and the solution) so others won’t have to waste as much time as I did. First, I’ve been using SqlCacheDependency with great success since early betas of ASP.NET 2.0 and SQL Server 2005. I marveled at how little work…

ASP.NET 2.0, SQL Server 2005, and SQL Cache Dependencies

If you used ASP.NET 2.0 SQL cache dependencies in early betas of the product with SQL Server 2005, you may be surprised when your code breaks on newer builds. You now have to call System.Data.SqlClient.SqlDependency.Start before using SQL cache dependencies. A good place to do it is in Application_Start. There’s a helpful document on MSDN…