I only upload small files to the server.
Where can I remove this restriction?
I put it in web.config, but even if I put big numbers, files, say 100-200 meters are uploaded.
Did like here
<system.web> <compilation debug="true" targetFramework="4.5" /> <httpRuntime targetFramework="4.5" maxRequestLength="2147483647" executionTimeout="1600" requestLengthDiskThreshold="2147483647" /> <security> <requestFiltering> <requestLimits maxAllowedContentLength="2147483647" /> </requestFiltering> </security> ... </system.web> Although, the reason, perhaps, in the client ... I do not send the browser, but the program with WebClient. Maybe here somehow it is necessary to register for a larger volume?
dynamic dyn = JObject.Parse(Params.Data); dynamic dat = new JObject(); using (var client = new HttpClient()) using (var formData = new MultipartFormDataContent()) using (var fileStream = File.OpenRead(dyn.FullPath.ToString())) { HttpContent fileStreamContent = new StreamContent(fileStream); var filename = Path.GetFileName(dyn.FullPath.ToString()); formData.Add(fileStreamContent, "upload", filename);// загрузка var response = client.PostAsync("http://localhost:2613/siteapi/postfile?code="+ dyn.Code.ToString(), formData).Result; //Отправка }