aspnet_regsql -ed -E -d AspNet

S

scotty

In testing Notifications, adding the following lines to an Asp.Net
page make the notification process almost fully automatic:

SqlCacheDependencyAdmin.EnableNotifications(WebConfigurationManager.ConnectionStrings["Northwind"].ConnectionString);

SqlCacheDependencyAdmin.EnableTableForNotifications(ConfigurationManager.ConnectionStrings["Northwind"].ConnectionString,new
string[] { "Employees", "Categories", "Products"});

The two lines properly prepare the notifications table
( AspNet_SqlCacheTablesForChangeNotification ) in the database to be
accessed. If you delete the table
AspNet_SqlCacheTablesForChangeNotification, the lines restore it
properly as well.

But can you automate the processes required to make sure the AspNet
database exists with its proper table? The table that is created when
you run the command > aspnet_regsql -ed -E -d AspNet from the
command prompt? I thought I could trigger a batch file but you can't
do this within Asp.Net. Are there lines similar to the two noted
above that creates and prepares the AspNet database and its
corresponding AspNet_SqlCacheTablesForChangeNotification table?

Or does this part of it have to be done manually? Create the AspNet
table then run the command line aspnet_regsql -ed -E -d AspNet.
SQLServer 2000. I guess the AspNet database could be created if it
doesn't exist and you could probably test for the existence of the
required table, but thought there might be lines that do this
automatically.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top