Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7632189
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T06:33:32+00:00 2026-05-31T06:33:32+00:00

In this project I’m using MVC-3, with output cache attributes and the appropriate references

  • 0

In this project I’m using MVC-3, with output cache attributes and the appropriate references in the web.config and, hopefully, the global.asax (below). I’m running production from a shared hosting and can’t run aspnet_regsql as a admin to create the appropriate objects, so I copied the AspNet_SqlCacheTablesForChangeNotification table, the SPs and triggers up from my dev box to setup the database.

In general, everything works great, however I’m finding that about once every 2 or 3 days all of the caching database objects are deleted and not getting recreated on app start. (no hosting co script is deleting them).

To get the site working again, I end up manually copying the database objects back up.

How can I not have the objects deleted, or, alternatively, have them automatically created?

My app start in the global.asax looks like this:

protected void Application_Start()
{
     RegisterGlobalFilters(GlobalFilters.Filters);

     SqlCacheDependencyAdmin.EnableNotifications(ConfigurationManager.ConnectionStrings["ApplicationServices"].ConnectionString);
    SqlCacheDependencyAdmin.EnableTableForNotifications(ConfigurationManager.ConnectionStrings["ApplicationServices"].ConnectionString, "be_Posts");
    SqlCacheDependencyAdmin.EnableTableForNotifications(ConfigurationManager.ConnectionStrings["ApplicationServices"].ConnectionString, "be_PostTag");

     SiteMap.Provider.SiteMapResolve += new SiteMapResolveEventHandler(SiteMapPathExpansionResolver.OnSiteMapResolve);
    RegisterRoutes(RouteTable.Routes);
}

and my app end looks like this:

protected void Application_End()
    {
        SqlCacheDependencyAdmin.DisableTableForNotifications(ConfigurationManager.ConnectionStrings["ApplicationServices"].ConnectionString, "be_Posts");
        SqlCacheDependencyAdmin.DisableTableForNotifications(ConfigurationManager.ConnectionStrings["ApplicationServices"].ConnectionString, "be_PostTag");
        SqlCacheDependencyAdmin.DisableNotifications(ConfigurationManager.ConnectionStrings["ApplicationServices"].ConnectionString);
    }

web.config entry looks like this:

<caching>
  <sqlCacheDependency enabled="true"   pollTime="10000"   >
    <databases>
      <add name=" db"
         connectionStringName="ApplicationServices"
         pollTime="10000"
      />
    </databases>
  </sqlCacheDependency>
</caching>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T06:33:34+00:00Added an answer on May 31, 2026 at 6:33 am

    So I effectively solved it by commenting/stripping out the Disables from the Application_End. I had read that this leaves sql server with open handles, but I didn’t find any other solution that worked. I tried adding create triggers and startup events to recreate the tables and such and a number of other approaches, but only removing the Disables seemed to work.

    I hope the shared and db server I’m on doesn’t have issues, but the hosting company hasn’t complained to me and there’s really no way for me to know if this approach causes complications because they don’t grant access to that kind of monitoring.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

in this project im using jquery and phonegap i have a link that if
This project is for iPhone with iOS 5 using ARC and Core Data. All
I have this project set up with EF4 and I'm using LINQ to Entities
If I have this project structure Foo.Data reference EntityFramework Foo.Business reference Foo.Data Foo.Web reference
I've had this project running for a couple of months using a couple of
This project is a basic ATM program. I'm using a file to store all
Using this project: https://github.com/dalexsoto/Monotouch-AdMob-Bindings I am adding the AdMob .a to my MonoTouch app.
I'm working on this project where the client has a virtual server setup. I
I have found this project on Codeplex. http://www.codeplex.com/ProjNET I need to integrate this code
I am referring to this project by Jimmy Bogard: http://www.codeplex.com/AutoMapper The code repository site

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.