I am calling a web request from my Delphi code to upload a file (size: 3 to 6 MB) but I am getting the error:
Maximum request length exceeded.
How do I fix this?
Update: I have updated the web.config
file with the below code but I am still getting the same error. My server is IIS 8.5 on HostGator. I have also asked the HostGator team to increase my file size from server end.
<configuration>
<system.web>
<webServices>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
</protocols>
</webServices>
<compilation debug="true" targetFramework="4.7.1" />
<httpRuntime targetFramework="4.7.1" />
</system.web>
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="268435456" />
</requestFiltering>
</security>
</system.webServer>
</configuration>
I have tried using this:
<httpRuntime maxRequestLength="51200" />
but I got:
internal server error