PC Review


Reply
Thread Tools Rate Thread

aspnet_regsql -ed -E -d AspNet

 
 
scotty
Guest
Posts: n/a
 
      24th May 2007
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.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: aspnet_regsql via API =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?= Microsoft ASP .NET 0 30th Nov 2006 06:54 PM
aspnetdb / aspnet_regsql.exe mehdi Microsoft ASP .NET 0 17th Oct 2006 08:07 PM
aspnet_regsql.exe Crashes Bryan Microsoft ASP .NET 0 10th Aug 2006 03:51 PM
aspnet_regsql Jeff Microsoft ASP .NET 2 30th Jul 2006 12:05 PM
Caching using aspnet_regsql Meena Desai Microsoft ASP .NET 0 14th Feb 2005 08:53 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:05 PM.