Is there a upload limit when using a web client in C #?

Using UploadFile ("upload.php", "POST", filePath) with WebClient nothing more than 4mb will be loaded. The PHP limit is set to 48 MB. Should I install in C #?

+3


source to share


2 answers


ASP.NET has a default maxRequestLength of 4MB, you can change it in the web.config file.

<configuration>
    <system.web>
        <!-- This will handle requests up to 1024MB (1GB) -->
        <httpRuntime maxRequestLength="1048576" timeout="3600" />
    </system.web>
</configuration>

      



The length is specified in KB in the configuration file. If you are using IIS, there is an additional 4MB limit for IIS.

+3


source


I solved the problem. By changing the following in php.ini

post_max_size = 40M



I already changed the upload_max_filesize file, but I was unaware of this other setting that needs to be changed.

+1


source







All Articles