Enables SqlCacheDependency change notifications on the specified database.
Assembly: System.Web (in System.Web.dll)
A connection to the database could not be established.
The security context of the ASP.NET application does not have permission to connect to the database.
The security context of the ASP.NET application does not have permission to disable notifications for the database.
The method adds support for change notifications from the database specified in the connectionString parameter. Once you have run the method, you must run the DisableNotifications method if you wish to disable change notifications for a database.
The following code example uses the method to enable change notifications for the database specified by the connection string MyConnectionString.
For the full code required to run the example, see the Example section of the SqlCacheDependencyAdmin class overview topic.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2