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

The Archive Base Latest Questions

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

We have set a fixed limit on the filesize of uploads on our site

  • 0

We have set a fixed limit on the filesize of uploads on our site – below the size of the default asp.net and iis setting.

I have a simple catch setup in Application_BeginRequest that catches this (it’s not excat since it checks the ContentLength including all other form data but it’s good enough).
I want to either resume processing of the page the user tried to upload to, or as a fallback plan redirect the user to a page, explaining that the filesize was too big (we already have a subtitle explaining this, but you know users – ‘they don’t need to read no stinking subtitles’).

So what’s the problem? Well it seems that my Response was already sent to the user – a 404 explaining that the page could not be found. I don’t want this behaviour, i want to flush this response, since it’s not the one i want the user to see – i want to show something else – build my own response, redirect or just process the page they were supposed to get anyways.

I think the problem might still be IIS rejecting the request/post since the file is bigger than what IIS wants. I really do dig this – a mad user trying to upload a 20meg picture shouldn’t be allowed to DoS the IIS to its knees, but is this it? Or do i get a chance to intercept this response to the user – instead of increasing the max size on the IIS and thus spending bandwith on receiving this file, i just want to identify this post as ‘being too big’ and sending an apropriate response back to the user.

  • 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-11T17:29:33+00:00Added an answer on May 11, 2026 at 5:29 pm

    I had this same problem and after lots of searching there seems to be no perfect solution to this. You can change the Max Request Length to set at which point IIS will serve the ASP.Net error. You can also catch this error on global.asax and show the user a more freindly error page.

    You can find more information on doing this here http://www.developer.com/db/article.php/10920_3426051_2

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

Sidebar

Related Questions

Situation: I have two fixed-height divs, overflow set to hidden on both, and dynamic
I have set of financial documents (Fixed terms deposit documents, Credit card documents). I
I have a simple update set php sql function on my site where I
I have had to set a fixed time out for a particular COM method
I have just been testing a web site I have set up in Internet
I have a content div that loads different pages. I can't set fixed position
I have set the eclipse java formatter to wrap lines that exceed 120 characters
I have set a background on the data-role=page element like so <div data-role=page style=background:
I have set up Eclipse Indigo to do line debugging with CFEclipse over port
I have set up upload_max_filesize and post_max_size to 32Mb in php.ini. I am using

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.