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 6784785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:02:29+00:00 2026-05-26T17:02:29+00:00

I have an ASP.NET MVC 3 application with a SQL Server 2005 database backend.

  • 0

I have an ASP.NET MVC 3 application with a SQL Server 2005 database backend. It is linked to the database using LINQ to SQL. On certain instances, the database will get updated by the application, but sometimes it still caches old data that should not be getting cached.

For example, if the user fills out a form to post a BlogEntryComment (one of my LINQ to SQL types), it will get added to the database. But, the new BlogEntryComment won’t show up in my views that request it. In addition, if I remove a BlogEntryComment, it still shows up in the views. Here is what I have determined about this behavior:

  • It is not caused by browser caching. I have cleared the cache; tried simutaneously on different browsers and different computers; to no avail.

  • It is not happening with “top-level” types, like my BlogEntry type. It is happening with types like BlogEntryComment that have a relationship (one BlogEntry to many comments) with my “top-level” types.

  • If I restart the server, or try it on a different server, it seems to clear whatever cache it is in, and I don’t get erroneous results.

  • It will eventually show the updated data, but it takes up to 15 minutes for it to finally appear.

I have tried to turn off every kind of cache options that I have been able to find in Web.config:

...
<system.web>
    ...
    <caching>
        <outputCache enableOutputCache="false" enableFragmentCache="false">
        </outputCache>
    </caching>
    <httpRuntime enableKernelOutputCache="false" />
</system.web>
<system.webServer>
    ...
    <caching enabled="false">
    </caching>
</system.webServer>
...

…but with no luck. Any ideas?

  • 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-26T17:02:30+00:00Added an answer on May 26, 2026 at 5:02 pm

    Check out the documentation for l2s DataContext. Its meant to be short lived – i.e. create and dispose every http request. If it’s static as you describe, it’ll live as long as the app domain does.

    What’s most likely happening is that your DC is staying in memory and subsequent requests for data are not going to the db. After 15 minutes or whatever, your app domain recycles, and you get a fresh DC, and fresh data.

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

Sidebar

Related Questions

I have an ASP.Net MVC application and I'm using Forms authentication in SQL Server.
General Info: ASP.NET MVC app using ADO.NET Entity Framework SQL Server 2005 I have
I have an asp.net mvc 2 application with a SQL Server database accessed by
I have an ASP.NET MVC application that uses Linq to SQL repositories for all
I have a ASP.NET MVC application and I have used Linq-to-SQL queries to get
We are building an ASP.Net MVC 2 multi-tenant application on SQL Server using the
I have an ASP.NET MVC application up and running, using a SQL Sever express
I have an ASP.NET MVC Web Application that interacts with a SQL Server 2008
I have just started a new web application with asp.net mvc and sql server
I have an ASP.NET MVC application that I wrote using LINQ to communicate with

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.