DatabaseNotEnabledForNotificationException Class
.NET Framework 2.0
The exception that is thrown when a SQL Server database is not enabled to support dependencies associated with the SqlCacheDependency class. This class cannot be inherited.
Namespace: System.Web.Caching
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
[SerializableAttribute] public sealed class DatabaseNotEnabledForNotificationException : SystemException
/** @attribute SerializableAttribute() */ public final class DatabaseNotEnabledForNotificationException extends SystemException
SerializableAttribute public final class DatabaseNotEnabledForNotificationException extends SystemException
Not applicable.
The following code example is an exception handler for a simple administration page for setting up change notification in a SQL Server database.
For the full code required to run the example, see the Example section of the SqlCacheDependencyAdmin class overview topic.
catch (DatabaseNotEnabledForNotificationException ex) { enabledTables.Visible = false; disableTable.Visible = false; enabledTablesMsg.Text = "Cache notifications are not enabled in this database."; tableName.Visible = false; enableTable.Visible = false; tableEnableMsg.Text = "Must enable database for notifications before enabling tables"; }
- AspNetHostingPermission for operating in a hosted environment. Demand value: LinkDemand; Permission value: Minimal.
System.Object
System.Exception
System.SystemException
System.Web.Caching.DatabaseNotEnabledForNotificationException
System.Exception
System.SystemException
System.Web.Caching.DatabaseNotEnabledForNotificationException
Community Additions
ADD
Show: