JP
  •  JP
  • 100% (Exalted)
  • YAF Leader Topic Starter
2012-02-28T19:10:31Z
Just an issue with the Attach file to post feature.

Seems like a too big file is not checked against the YAF configuration limits set before upload and gives an unnecessary error.
HttpMaxRequestLength is set in web.config to accommodate about 5 MB files (max YAF configured 3MB), and one guy is trying to upload 11MB which breaks it. He should get a message about the file being too big instead of the error while trying this....


Server Error in '/forum' Application.

Maximum request length exceeded.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Web.HttpException: Maximum request length exceeded.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 

[HttpException (0x80004005): Maximum request length exceeded.]
System.Web.HttpRequest.GetEntireRawContent() +11484695
System.Web.HttpRequest.GetMultipartContent() +232
System.Web.HttpRequest.FillInFormCollection() +389
System.Web.HttpRequest.get_Form() +157
System.Web.HttpRequest.get_HasForm() +11486708
System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) +141
System.Web.UI.Page.DeterminePostBackMode() +100
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +259

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272 

He who asks a question is a fool for five minutes. He who does not ask a question remains a fool forever. [Old Chinese Proverb]
Sponsor
Jaben
  •  Jaben
  • 100% (Exalted)
  • YAF Developer
2012-02-29T05:15:23Z
This exception is thrown before YAF.NET gets a hold of the information about the file upload.

Basically, it's thrown by ASP.NET... the only thing we could do is hook the error handling for the entire application and intercept it -- not an elegant solution and can easily step on other systems toes. (We have to think about integration issues all the time...)
squirrel
2012-02-29T07:37:30Z
Originally Posted by: Jaben 

This exception is thrown before YAF.NET gets a hold of the information about the file upload.

Basically, it's thrown by ASP.NET... the only thing we could do is hook the error handling for the entire application and intercept it -- not an elegant solution and can easily step on other systems toes. (We have to think about integration issues all the time...)



Another way would be to just set a ridiculously high number in the web.config for YAF, then on most counts, YAF would catch the error properly, correct?

If you can't find it using the forum search, try my signature link -- searches this site using Google: Google is my Friend 
bbobb
  •  bbobb
  • 100% (Exalted)
  • YAF Developer
2012-02-29T07:57:05Z
A wrong way. What about a DDoS attack? The parameter restricts exactly this.

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved