Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

SQLDataSource SQLCacheDependency with MSSQL 2008 R2

Posted on 2013-06-27
3
Medium Priority
?
757 Views
Last Modified: 2013-09-14
Running: ASP.NET ver. 4.5. MSSQL 2008 R2

I'm trying to get caching with SQL dependency working on a SQLDataSource control. However, I get the following error in runtime:

The database 'IM' is not enabled for SQL cache notification.

To enable a database for SQL cache notification, please use the System.Web.Caching.SqlCacheDependencyAdmin.EnableNotifications method, or the command line tool aspnet_regsql. To use the tool, please run 'aspnet_regsql.exe -?' for more information.
My confusion is that I believe cache notifications were discontinued after 2005 and replaced with a new service in 2008 R2. Is this correct? If so, what do I need to do to allow for caching with dependency out of the SQLDataSource?

Code for the SQLDataSource:
<asp:SqlDataSource ID="custItemsDS" runat="server" ConnectionString="<%$ ConnectionStrings:IMConnectionString %>" SelectCommand="...select command..." UpdateCommand="...update command..." EnableCaching="True" SqlCacheDependency="IM:ct_CustItem">
                ...parameters...
</asp:SqlDataSource>

Open in new window


Web.config
  <system.web>
    <caching>
      <sqlCacheDependency enabled="true">
        <databases>
          <add connectionStringName="IMConnectionString" name="IM" pollTime="1000"/>
        </databases>
      </sqlCacheDependency>
    </caching>

Open in new window


Thank you in advance for your help!
0
Comment
Question by:echobridge
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 2

Expert Comment

by:eli411
ID: 39282448
0
 
LVL 1

Accepted Solution

by:
echobridge earned 0 total points
ID: 39282470
That is a forum post from 2006, does that still apply in SQL Server 2008 R2?
0
 
LVL 1

Author Closing Comment

by:echobridge
ID: 39492411
No resolution found.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
The viewer will learn how to count occurrences of each item in an array.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question