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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:36:22+00:00 2026-05-25T16:36:22+00:00

I am implementing a custom IHttpModule in a project, which filter file uploading and

  • 0

I am implementing a custom IHttpModule in a project, which filter file uploading and provide upload status.
I want the custom module to close the connection early (don’t want to receive all the data the other side send, which is allowed to be big, save the incoming bandwidth).

Is it a possibility using HTTP protocol?

I tried sending “ContentLength: 0” and “Connection: close” header, flush the response, close the connection (HttpWorkerRequest.CloseConnection).

workerRequest.SendStatus(400, "Bad request");
workerRequest.SendKnownResponseHeader(HttpWorkerRequest.HeaderContentLength, "0");
workerRequest.SendKnownResponseHeader(HttpWorkerRequest.HeaderConnection, "close");
workerRequest.FlushResponse(false);
workerRequest.CloseConnection();
((HttpApplication)sender).CompleteRequest();

The browser/firefox response is displaying the “Connection reset” error message.
Without any sign of receiving any data/header/status from the server.

Thanks in advance.

  • 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-25T16:36:23+00:00Added an answer on May 25, 2026 at 4:36 pm

    An http client expects response only after it has completed sending the data. You should modify the client to make multiple requests of small sizes so a response can be sent to it instead of having server close the connection (which will not work and isn’t working as you’ve tested already).

    Check the http handler implemented in http://slfileupload.codeplex.com/ for a sample of how it is typically done.

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

Sidebar

Related Questions

I'm implementing a custom UIButton with minimal functionality. The .h file: #import <Foundation/Foundation.h> @interface
I'm implementing a custom control that inherits from Control . I want it to
I am implementing a custom control which derives from ListView. I would like for
I'm implementing a custom TextView and I want to do some action when the
I am implementing a custom action for a WindowsCE CAB file, and I need
I'm currently implementing some custom exceptions in a project and can't decide wither to
I have a Telerik RadGrid in which I'm implementing custom paging binding to a
I am implementing a custom keyboard in my app. I want the keyboard to
I'm implementing a custom permissions application in my Django project, and I'm lost as
I'm looking for some pointers on implementing Custom Events in VB.NET (Visual Studio 2008,

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.