Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 28504

500 Internal server error for 1.8 GB file upload - IIS 7.5 and WebAPI

$
0
0

Hi All,

I have a WebAPI(.net 4.6) and hosted in IIS7.5, One of the action method is written to receive files to the server using PUT verb.
Refered details from the URL and written the code which uses WebHostBuferPolicySelctor to get bufferless stream to receive a file. Multipartformdata MIME type is used here. below is my code

using (StreamContent content = new StreamContent(HttpContext.Current.Request.GetBufferlessInputStream(true))) {
foreach (var header in this.Request.Content.Headers)
{ content.Headers.TryAddWithoutValidation(header.Key, header.Value);} 
await content.ReadAsMultipartAsync(new CustomMultipartFileStreamProvider(TPDirectoryPath, fileName))}

Config Settings(for bigger file size)

Below is the webapi config settings

<httpRuntime targetFramework="4.6" maxRequestLength="2147483647"/> <requestLimits maxAllowedContentLength="2147483647"/>

IIS Settings (for bigger file size)

maxRequestEntityAllowed = 4294967295

uploadReadAheadSize = 2147483647

Above things are working fine for the file sized up to 800 MB, but when I am trying to upload a file of size >1 GB; I am getting 500 internal server error in managedpipelineHandler module.Its not reaching application code and failed at IIS itself.

Error Summary - HHTP Error 500.0 - Internal Server Error

Detailed Error Information
Module: ManagedPipelineHandler
Notification: ExecuteRequestHandler
Handler System.Web.Http.WebHost.HttpControllerHandler
Error Code 0x8007000e

Could some can please help me out on what is the problem here with IIS for bigger file size?


Viewing all articles
Browse latest Browse all 28504

Latest Images

Trending Articles



Latest Images