Is there an upload limit when using Web Client in C#?

前端 未结 2 590
北荒
北荒 2020-12-21 09:09

Using UploadFile(\"upload.php\", \"POST\", filePath) with WebClient anything over 4mb will not upload. The limit in PHP is set at 48mb. Is there I need to set in C# ?

2条回答
  •  再見小時候
    2020-12-21 09:48

    There is a default maxRequestLength set at 4MB in ASP.NET, you can change it in the web.config.

    
        
            
            
        
    
    

    The length is specified in KB in the config file. If you are using IIS there is an additional limit set at 4MB by IIS.

提交回复
热议问题