Reputation: 2824
I am getting error on file upload in asp.net and the file size is 780kb but it is uploading 147 bytes successfully
i did set this in web.config file but still getting error any idea why?
<system.web>
<compilation debug="true" targetFramework="4.0" />
<httpRuntime maxRequestLength="1000000" executionTimeout="360"/>
<!--<httpRuntime maxRequestLength="10000" requestValidationMode="2.0" executionTimeout="360"/>-->
</system.web>
Upvotes: 1
Views: 1401
Reputation: 182
Write the code as follows in web.config:
<configuration>
<system.web>
<httpRuntime maxRequestLength="600000" />
</system.web>
</configuration>
Upvotes: 0
Reputation: 100630
There could be another web.config on AdminPanel level that overrides the site level setting.
Another option: upload could be done with Base64 encoding that makes data about 1.4 times bigger than file size (+ headers of the request). Make sure to set restriction accordingly.
Upvotes: 0