RequestEntityTooLarge response from Web Api when trying to upload a file with HttpClient

后端 未结 1 1157
不思量自难忘°
不思量自难忘° 2020-12-18 08:23

I\'m trying to create a web service to upload files by Post with Asp.Net Web Api. These are the implementations for Client and Web Api respectively:

Client:

相关标签:
1条回答
  • 2020-12-18 09:08

    I solved the problem through this solution: http://www.smartdigitizers.com/net-development-tips/iis-7-how-to-resolve-error-https-413-request-entity-too-large/

    1. Launch “Internet Information Services (IIS) Manager”
    2. Select the site that you are hosting your web application under it.
    3. In the Features section, double click “Configuration Editor”
    4. Under “Section” select: system.webServer then serverRuntime
    5. Modify the “uploadReadAheadSize” section to be like 20MB (the value there is in Bytes)
    6. Click Apply
    0 讨论(0)
提交回复
热议问题