Select to view content in your preferred language

Error 500 Maximum request length exceeded

3811
13
01-13-2017 11:13 AM
CCWeedcontrol
Regular Contributor

I have an app built with Web Appbuilder Dev 2.2 with some layers off of ArcGis Online. I down loaded it and put it on my IIS. with a proxy. It seems as when i try to print with a certain layer i get print error. Network tab indicates the following. I am not sure what this means other than the maximum request length exceeded. Any help would be great.

Server Error in '/DotNetProxy2' Application.


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

HttpException (0x80004005): Maximum request length exceeded.]    System.Web.HttpRequest.GetEntireRawContent() +11949368    System.Web.HttpRequest.get_InputStream() +54    proxy.readRequestPostBody(HttpContext context) +30    proxy.ProcessRequest(HttpContext context) +3180    System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +508    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +92

13 Replies
RobertScheitlin__GISP
MVP Emeritus

If that was the URL it was complaining about then it would not exceed the limit.

0 Kudos
CCWeedcontrol
Regular Contributor

I had to increase the runtime time out and max requestlength in the web.config file. Now it works fine

like so.

<?xml version="1.0"?>
<configuration>
  <system.web>
    <compilation debug="false" targetFramework="4.0"/>
  </system.web>
  <system.web>
<httpRuntime executionTimeout="100000" maxRequestLength="214748364" />
</system.web>
  <system.diagnostics>
    <switches>
      <add name="TraceLevelSwitch" value="Info" />
    </switches>
    <trace autoflush="true" indentsize="4">
      <listeners>
        <add name="agsProxyLogListener" type="System.Diagnostics.TextWriterTraceListener"
             initializeData="C:\Temp\Shared\proxy_logs\auth_proxy.log" />
        <remove name="Default" />
      </listeners>
    </trace>
  </system.diagnostics>
</configuration>
SigamGeo
New Contributor II

Thank you, to add the

  <system.web>
    <httpRuntime executionTimeout="100000" maxRequestLength="214748364" />
  </system.web>

section to the Web.config of my dotnet proxy resolved my attachment size limit (ArcGIS enterprise/portal).

0 Kudos
germyrinn
New Contributor

If you are using IIS for hosting your application, then the default upload file size is 4MB. To increase it, please use this below section in your asp.net web.config -

<configuration>
<system.web>
<httpRuntime maxRequestLength="1048576" />
</system.web>
</configuration>
For IIS7 and above, you also need to add the lines below:

<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="1073741824" />
</requestFiltering>
</security>
</system.webServer>
Note:

maxRequestLength is measured in kilobytes
maxAllowedContentLength is measured in bytes