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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T22:59:51+00:00 2026-06-08T22:59:51+00:00

In my .net application, I have used LINQ-to-SQL to get some data from the

  • 0

In my .net application, I have used LINQ-to-SQL to get some data from the database. The volume of data is not big at all (10 rows of data). But I constantly caught the “system.outofmemoryException” in my function even thought there is still spare memory in the server. Interestingly, I can still get the data with a ADO function from other pages.

The problem will be fixed once application pool restarts. From time to time, issue happen again. Do you have any clue how I should debug this scenario?

Note: I have used “using” block for all datacontext connection. Literally, All datacontext would be disposed after use.

Below is the code. It is simple.

using (StoreDataContext db = new StoreDataContext(conn)) 
{
     var list = from category in db.ProductCategories 
                select category;

     ddlCategory.DataSource = list.Distinct().ToList();
     ddlCategory.DataTextField = "CategoryName";
     ddlCategory.DataValueField = "CategoryName";
     ddlCategory.DataBind();
}
  • 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-06-08T22:59:54+00:00Added an answer on June 8, 2026 at 10:59 pm

    My suggestion would you use memory profiling tool such as JetBrains dotTrace or RedGate’s Ants Profiler (their are more in the market)

    Personal experience even I had the same issue on my web application and dotTrace traced the poorly written code for me

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

Sidebar

Related Questions

I have a ASP.NET MVC application and I have used Linq-to-SQL queries to get
My SSRS report fetches data from my DATAWAREHOUSE. The ASP.NET application I have is
I have an application using ASP.NET MVC, Unity, and Linq to SQL. The unity
I have an ASP.NET MVC3 application that uses entities generated from a database. Each
This is about asp.net mvc3 web application. We have used Object cache to store
I have an existing 32-bit ASP.NET application that used 32-bit unmanaged DLLs. If I
In an ASP.NET application, I have a small number of fairly complex, frequently used
We are developing a SaaS application in Asp.net, where we have used the Single
I have a ASP.NET Webforms application that is being used with Motorola Tablets (Android
I used to have a standard ASP.NET MVC 3 application that was Ninject-wired via

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.