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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T05:59:43+00:00 2026-05-23T05:59:43+00:00

I have inherited some code that is not working as I think it should:

  • 0

I have inherited some code that is not working as I think it should:

There is a form with a file upload control on it, the file limit is set to the default of asp.net 4MB.

There is no real reliable way to test for file size on the client side without using flash/active x controls.

So I am catching the error in my Global.asax file and doing a server.transfer to a new location.

The problem I am having is that the server just hangs on the transfer, the page sits there “loading” and the process remains stuck on the Server.Transfer line of code.

I have even tried just transferring on any error, but when uploading the file it just sits there.

Server.Transfer("~/Error.aspx");

Any help here would be appreciated, this is a really big stumbling block, I need to be able to handle the user uploading a file bigger than that set in the configs. without a nasty error from the framework.

Edit — It would appear the transfer is working, as I get into the page_load events of the page I being transfered to, I can follow this through to page_prerender and then I get no rendered page and the browser just sits there looking like it is loading

Edit added stack trace of the error I am causing:

Exception = System.Web.HttpUnhandledException
Inner Exception = System.Web.HttpException
Server.GetLastError.InnerException.Message
Maximum request length exceeded.

Server.GetLastError.InnerException.StackTrace
   at System.Web.HttpRequest.GetEntireRawContent()
   at System.Web.HttpRequest.GetMultipartContent()
   at System.Web.HttpRequest.FillInFormCollection()
   at System.Web.HttpRequest.get_Form()
   at System.Web.HttpRequest.get_HasForm()
   at System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull)
   at System.Web.UI.Page.DeterminePostBackMode()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Also, the file I am trying to upload is 12MB. (in case that makes a difference)

  • 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-23T05:59:44+00:00Added an answer on May 23, 2026 at 5:59 am

    will you use response.redirect instead of server.transfer….

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

Sidebar

Related Questions

I have inherited some legacy PHP code what was written back when it was
I have some C# / asp.net code I inherited which has a textbox which
I have inherited a very old database that needs some data to be updated.
I have inherited a project that has class libraries written in VB.NET, some of
I have inherited a middle tier system with some multi-Threading issues. Two different threads,
I have inherited a visual studio 2003 project which uses some custom build steps.
I'm looking for some way to effectively hide inherited members. I have a library
I have a some JPA entities that inherit from one another and uses discriminator
Anybody out there have experience testing out of process assemblies? I'm testing some Com+
I have inherited a client site which crashes every 3 or 4 days. It

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.