question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Maximum request length exceeded.

See original GitHub issue

What did you expect?

Is library have Size Limit for files ?! min(7.5 Mg) its ok for small files max(3.5 Mg)

What happened instead?

onError after finished Upload

Version info

  • Android Upload Service version:
  • Android version and API version:
  • HTTP stack (e.g. HurlStack or OkHttpStack):

Steps to reproduce (if applicable):

Library initialization code:

// the code you wrote in your Application subclass here

 UploadService.NAMESPACE = BuildConfig.APPLICATION_ID;
        // Or, you can define it manually.
        UploadService.NAMESPACE = "dotis.ir.IGT";

Request code:

// the code you wrote to create the upload request


Where have you added the request code?

  • [=== ] Activity
  • Service
  • Other class (add additional info about it)

LogCat output (please set log level to DEBUG first)

// your LogCat output here
<!DOCTYPE html>
                                                                                         <html>
                                                                                             <head>
                                                                                                 <title>Maximum request length exceeded.</title>
                                                                                                 <meta name="viewport" content="width=device-width" />
                                                                                                 <style>
                                                                                                  body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} 
                                                                                                  p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
                                                                                                  b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
                                                                                                  H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
                                                                                                  H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
                                                                                                  pre {font-family:"Consolas","Lucida Console",Monospace;font-size:11pt;margin:0;padding:0.5em;line-height:14pt}
                                                                                                  .marker {font-weight: bold; color: black;text-decoration: none;}
                                                                                                  .version {color: gray;}
                                                                                                  .error {margin-bottom: 10px;}
                                                                                                  .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
                                                                                                  @media screen and (max-width: 639px) {
                                                                                                   pre { width: 440px; overflow: auto; white-space: pre-wrap; word-wrap: break-word; }
                                                                                                  }
                                                                                                  @media screen and (max-width: 479px) {
                                                                                                   pre { width: 280px; }
                                                                                                  }
                                                                                                 </style>
                                                                                             </head>
                                                                                         
                                                                                             <body bgcolor="white">
                                                                                         
                                                                                                     <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>
                                                                                         
                                                                                                     <h2> <i>Maximum request length exceeded.</i> </h2></span>
                                                                                         
                                                                                                     <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">
                                                                                         
                                                                                                     <b> Description: </b>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.
                                                                                         
                                                                                                     <br><br>
                                                                                         
                                                                                                     <b> Exception Details: </b>System.Web.HttpException: Maximum request length exceeded.<br><br>
                                                                                         
                                                                                                     <b>Source Error:</b> <br><br>
                                                                                         
                                                                                                     <table width=100% bgcolor="#ffffcc">
                                                                                                        <tr>
                                                                                                           <td>
                                                                                                               <code>
                                                                                         
                                                                                         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.</code>
                                                                                         
                                                                                                           </td>
                                                                                                        </tr>
                                                                                                     </table>
                                                                                         
                                                                                                     <br>
                                                                                         
                                                                                                     <b>Stack Trace:</b> <br><br>
                                                                                         
                                                                                                     <table width=100% bgcolor="#ffffcc">
                                                                                                        <tr>
                                                                                                           <td>
                                                                                                               <code><pre>
                                                                                         
                                                                                         [HttpException (0x80004005): Maximum request length exceeded.]
                                                                                            System.Web.HttpRequest.GetEntireRawContent() +11938880
                                                                                            System.Web.HttpRequest.get_InputStream() +54
                                                                                            System.Web.Http.WebHost.HttpControllerHandler.ConvertRequest(HttpContextBase httpContextBase) +327
                                                                                            System.Web.Http.WebHost.HttpControllerHandler.BeginProcessRequest(HttpContextBase httpContextBase, AsyncCallback callback, Object state) +102
                                                                                            System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +921
                                                                                            System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) +137
                                                                                         </pre></code>
                                                                                         
                                                                                                           </td>
                                                                                                        </tr>
                                                                                                     </table>
                                                                                         
                                                                                                     <br>
                                                                                         
                                                                                                     <hr width=100% size=1 color=silver>
                                                                                         
                                                                                                     <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1055.0
                                                                                         
                                                                                                     </font>
                                                                                         
                                                                                             </body>
                                                                                         </html>
                                                                                         <!-- 
                                                                                         [HttpException]: Maximum request length exceeded.
                                                                                             at System.Web.HttpRequest.GetEntireRawContent()
                                                                                             at System.Web.HttpRequest.get_InputStream()
                                                                                             at System.Web.Http.WebHost.HttpControllerHandler.ConvertRequest(HttpContextBase httpContextBase)
                                                                                             at System.Web.Http.WebHost.HttpControllerHandler.BeginProcessRequest(HttpContextBase httpContextBase, AsyncCallback callback, Object state)
                                                                                             at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
                                                                                            at System.Web.H

Server side

Which server did you use (e.g. node.js demo server provided in the examples, php script provided in the examples, own implementation)?

// your server side script (if applicable)
// do not write any passwords or personal data here.
// If you need to show some code, replace sensible values

Server log (if applicable)

// your server side log here

Additional info

Write some additional information about the error here. Upload also screenshots or other information which may help to reproduce your error or spot a possible bug. Thank you 😃

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
gotevcommented, Mar 13, 2018

Have you checked the troubleshooting wiki page? It seems almost surely a server side setting regarding the max post size. Try uploading to a different webserver, like httpbin or posttestserver and I’m sure it will work 😉

0reactions
emadphcommented, Mar 15, 2018

@NLLAPPS tanks guys …

Read more comments on GitHub >

github_iconTop Results From Across the Web

Maximum request length exceeded. - asp.net - Stack Overflow
In this case, my max upload is 1024 megabytes. maxRequestLength has 1048576 KILOBYTES, and maxAllowedContentLength has 1073741824 BYTES.
Read more >
How to resolve "Maximum request length exceeded"
The default maximum filesize is 4MB - this is done to prevent denial of service attacks in which an attacker submitted one or...
Read more >
ASP.Net Error : Maximum request length exceeded.
In ASP.Net, while uploading large files using FileUpload control, you may have experienced an error saying that "Maximum request length exceeded". The default ......
Read more >
Asp.net file upload control maximum length error - CodeProject
When Upload file more than 4 MB gives error Maximum request length exceeded. Maximum request length exceeded. Wrong message , File uploaded but ......
Read more >
c# Asp Web API: HttpException: Maximum request length ...
I an sending a serialized image into an Asp.net Web API method and am getting this error: System.Web.HttpException: Maximum request length ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found