2

I have an table in SQL Server which maintains user edit privilege for specific applications.

One of my ASP.NET web applications query this table for a specific user Id to check if the user has edit privilege. If the user does, the "Manage Tables" tab in the navigation bar should be visible; otherwise, it should be invisible.

The "Manage Tables" tab visibility worked as desired after first release to production. I added new functionality to the web application but did not touch "Manage Tables" tab visibility logic code part, and made second time deploy to production.

Problem happened in IE browser. When I added new users and gave them edit privilege, They did not see the "Manage Tables" tab in IE even though they cleared cache. Two or three days later (sometimes longer)the "Manage Tables" tab showed up. The issue does not happen in my local machine.

Anybody know why this is happing? Is there any settings in the IIS of windows server or database server changed automatically which is causing this problem?

Wajahat
  • 1,593
  • 3
  • 20
  • 47
  • have a look at [http://stackoverflow.com/questions/11564979/is-it-possible-to-disable-off-line-caching-for-firefox-in-asp-net-at-the-server] – Sarvesh Mishra Feb 06 '14 at 16:20
  • Have you checked cache settings in their browsers (best it to be left on Auto). You can also disable caching of the page server-side via `Response.Cache.SetCacheability(HttpCacheability.NoCache)` – Yuriy Galanter Feb 06 '14 at 18:38
  • @Yuriy Galanter Thank you for your attention. I did not disable cashing of the page in source code, but I did clear their cache in their broswers and set it to auto. And then closed the broswer and reopened the web application, sometimes even retarted the computer. The "Manage Tables" tab still did not show up. But some days later, it appeared automatically for the new users. – user3279790 Feb 07 '14 at 15:51

1 Answers1

0

Check the expiration time for the cache that you have used. You might be getting stale data due to longer duration of cached item. From MSDN : ASP.NET can remove data from the cache for one of these reasons:

  • Because memory on the server is low, a process known as scavenging
  • Because the item in the cache has expired
  • Because the item's dependency changes

Considering your scenario, you can try SqlCacheDependency to update cache whenever the data gets updated. Here's a helpful link: SqlCacheDependency

ronilk
  • 303
  • 2
  • 4
  • 14