Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error related to caching

Status
Not open for further replies.

FarleySoftware

Programmer
Jan 14, 2008
18
US
I added caching to my local SQL Server 2005 database, and edited the web.config file as well as any .aspx pages accordingly. Everything worked fine.

Then, after uploading to the live server, I now get an error:

Code:
The 'MyDatabase:tblAppearances' SqlDependency attribute for OutputCache directive is invalid.

SQL cache dependency polling failed for SQL database 'MyDatabase' because of permission problem.

I tried re-running the aspnet_regsql utility, with no luck (first removing caching, then adding again). The error still occurs.

Any ideas where to look?

Farley Software Solutions
 
More code as additional info ...

Datasource:
Code:
                <asp:SqlDataSource 
                    ID="SqlDataSource1" 
                    runat="server" 
                    ConnectionString="<%$ ConnectionStrings:MyConnectionString %>"
                    SelectCommand="procGetSomeRecords" 
                    SelectCommandType="StoredProcedure"        
                    EnableCaching="true" 
                    SqlCacheDependency="MyDatabase:tblTableName" />

Web.config
Code:
      <sqlCacheDependency enabled="true" pollTime="5000">
        <databases>
          <add 
            name="MyDatabase" 
            connectionStringName="ASPNetConnection"/>
        </databases>
      </sqlCacheDependency>
    </caching>

(ASPNetConnection is a valid connection string & it does work)

Farley Software Solutions
 
Fixed!

The users whose logins were in the connection strings had to be added to the role aspnet_ChangeNotification_ReceiveNotificationsOnlyAccess.

For some reason this was not an issue on the local server. But now I know!

Farley Software Solutions
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top