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.
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
If that was the URL it was complaining about then it would not exceed the limit.
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>
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).
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