Eduardo Rocha, I understand you have tried multiple steps to isolate the issue and uploading web.config crashed your app.
You may try increasing the default values for request headers size. You may add an AppSetting named JAVA_OPTS
to your App Service with the value of -Dserver.max-http-header-size=30000
which will pass this to the JVM.
Replace the 30000
(30KB) value of a value of your choice.
Also, just to highlight, The Front Ends that act as load balancers to the application(s) running behind them have a hard upper limit of 64KB for total request header sizes.
If you haven't done, you may scale-up your WebApp and then test the following ( later, scale-down as required).
You may navigate to Kudu console :
- Go to your KUDU console (https://<sitename>.scm.azurewebsites.net/debugconsole)
- Go to the “site” directory then the “wwwroot” directory.
The default Request Limits value for the maxAllowedContentLength on IIS which is 30000000 (roughly 28.6MB). To modify this value, add the following to your web.config file.
<configuration>
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="<valueInBytes>"/>
</requestFiltering>
</security>
</system.webServer>
</configuration>
Kindly let us know how it goes, I'll follow-up with you.
If the answer helped (pointed, you in the right direction) > please click Accept Answer - it will benefit community members to find the answers quickly.