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

  • Home
  • SEARCH
  • 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 3877534
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T22:30:32+00:00 2026-05-19T22:30:32+00:00

My ASP.NET application is a download application (no pages) which reads huge binary files

  • 0

My ASP.NET application is a download application (no pages) which reads huge binary files (1-2 GB -> over 1 hours download time with resume support) from local network and stream them to web clients (each request -> one large binary response, so there’s no text/html response at all). I use a HTTP Handler (.ashx) instead of a (.aspx) page for processing requests. Using a shared buffer and producer-consumer pattern main thread (from ASP.NET thread pool) creates another thread and together they accomplish the job. At the end both threads exit (get back to pool).

So I have long-running request using threads from thread pool which is not recommended generally but I don’t have any page in my application, is it still a bottleneck using threads from ASP.NET thread pool ?

Environment: server 2008 64bit, IIS 7.0 and .NET 4.0

What considerations should be taken for this scenario ?
Any comment is appreciated.

  • 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-19T22:30:32+00:00Added an answer on May 19, 2026 at 10:30 pm

    As I explained here, just use IHttpAsyncHandler implementation in ASHX to launch a custom thread and finish with processing inside asp.net thread (thus returning it to the pool). Using this you can initiate thousands of downoads per second without running out of asp.net thread pool threads. (How and if you wish to serve that many requests is another topic of discussion)

    Edit: just don’t forget to call asyncRequestState.CompleteRequest() at the end of your thread, otherwise asp.net won’t know that you are done serving the request.

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

Sidebar

Related Questions

My ASP.NET application allows users to upload and download large files. Both procedures involve
I am running a website on IIS6 for ASP.NET application and enabled compression, which
I'm developing a page in asp.net/C# that displays files and HTML pages from a
Simple ASP.NET application. I have two drop-down controls. On the first-drop down I have
For ASP.Net application deployment what type of information (if any) are you storing in
The ASP.NET application that I am currently responsible for at my day job has
My ASP.NET application needs a number of supporting services to run periodically in the
I have an Asp.NET application (VS2008, Framework 2.0). When I try to set a
I have a ASP.NET application that we've written our own logging module for. My
When an ASP.NET application errors out and generates the yellow-screen display, I'd like to

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.