Scott Hanselman

SqlDependancy.Start and Conversation Handle Not Found

September 15, '05 Comments [1] Posted in ASP.NET | PDC
Sponsored By

When doing this with the Aug CTP:

Response.Write("Page created: " + DateTime.Now.ToLongTimeString())
Dim connStr As String = ConfigurationManager.ConnectionStrings("AppConnectionString1").ConnectionString
System.Data.SqlClient.SqlDependency.Start(connStr) ‘BOOM
Dim connection As New SqlConnection(connStr)
Dim command As New SqlCommand("Select * FROM Customers", connection)
Dim sqlDependency As New SqlCacheDependency(command)
connection.Open()
GridView1.DataSource = command.ExecuteReader()
GridView1.DataBind()
Connection.Close()
Response.AddCacheDependency(sqlDependency)

I got this:

Message="The conversation handle "206A971D-6F25-DA11-B22F-0003FF6FCCCA" is not found.
Invalid object name 'SqlQueryNotificationService - 41136655-4314-4536-a477-37156eb628db'."

And fixed it with this "alter database Northwind set trustworthy on". Thanks Steve Smith!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb
Thursday, 15 September 2005 22:31:27 UTC
Hello Scott.
interesting. btw, any info on how to use the dependecies with the sqldatasource control?
Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.