RequestEntityTooLarge response from Web Api when trying to upload a file with HttpClient
问题 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: using (var client = new HttpClient()) { client.BaseAddress = new Uri("https://127.0.0.1:44444/"); using (var content = new MultipartFormDataContent("Upload----" + DateTime.Now.ToString(CultureInfo.InvariantCulture))) { content.Add(new ByteArrayContent(File.ReadAllBytes(filepath))); content.Headers.ContentType = new MediaTypeHeaderValue(