Home
%3CLINGO-SUB%20id%3D%22lingo-sub-501134%22%20slang%3D%22en-US%22%3ESolution%20for%20%E2%80%9CRequest%20Entity%20Too%20Large%E2%80%9D%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-501134%22%20slang%3D%22en-US%22%3E%3CP%3EIIS%20has%20a%20limit%20for%20the%20size%20of%20the%20files%20users%20can%20upload%20to%20an%20application.%20If%20the%20file%20size%20exceeds%20the%20limit%2C%20the%20application%20will%20throw%20%E2%80%9C%3CSTRONG%3EError%20in%20HTTP%20request%2C%20received%20HTTP%20status%20413%20(Request%20Entity%20Too%20Large)%3C%2FSTRONG%3E%E2%80%9D%20error.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20default%20file%20upload%20size%20is%20%3CSTRONG%3E49%20KB%20%3C%2FSTRONG%3E(49152%20bytes).%20The%20application%20records%20the%20log%20below%20if%20user%20tries%20to%20upload%20a%20file%20that%20is%20bigger%20than%20this%20size.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20638px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111015i2760A41C3FE08C3A%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%223.jpg%22%20title%3D%223.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhy%20this%20issue%20occurs%20for%20SSL%20sites%3F%20The%20reason%20is%20that%20the%20request%20body%20must%20be%20preloaded%20during%20the%20SSL%20handshake%20process.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1730499452%22%20id%3D%22toc-hId-1730502368%22%20id%3D%22toc-hId-1730502368%22%20id%3D%22toc-hId-1730502368%22%20id%3D%22toc-hId-1730502368%22%20id%3D%22toc-hId-1730502368%22%20id%3D%22toc-hId-1730502368%22%20id%3D%22toc-hId-1730502368%22%3ESolution%3C%2FH2%3E%0A%3CP%3EThe%20quickest%20solution%20is%20to%20increase%20the%20upload%20size%20limit.%20IIS%20uses%3CCODE%3EuploadReadAheadSize%3C%2FCODE%3E%20parameter%20in%20%3CCODE%3EapplicationHost.config%3C%2FCODE%3E%20and%20%3CCODE%3Eweb.config%3C%2FCODE%3E%20files%20to%20control%20this%20limit.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CBLOCKQUOTE%3E%0A%3CP%3E%3CSTRONG%3EuploadReadAheadSize%3C%2FSTRONG%3E%3CBR%20%2F%3EOptional%20uint%20attribute.%3CBR%20%2F%3ESpecifies%20the%20number%20of%20bytes%20that%20a%20Web%20server%20will%20read%20into%20a%20buffer%20and%20pass%20to%20an%20ISAPI%20extension%20or%20module.%20This%20occurs%20once%20per%20client%20request.%20The%20ISAPI%20extension%20or%20module%20receives%20any%20additional%20data%20directly%20from%20the%20client.%20The%20value%20must%20be%20between%200%20and%202147483647.%3CBR%20%2F%3EThe%20default%20value%20is%20%3CCODE%3E49152%3C%2FCODE%3E.%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fiis%2Fconfiguration%2Fsystem.webserver%2Fserverruntime%23006%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EServer%20Runtime%3C%2FA%3E%3C%2FP%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESteps%20to%20change%20the%20value%20of%20this%20parameter%3A%3C%2FP%3E%0A%3COL%3E%0A%3CLI%20style%3D%22font-weight%3A%20400%3B%22%3EOpen%20IIS%20Manager%3C%2FLI%3E%0A%3CLI%20style%3D%22font-weight%3A%20400%3B%22%3ESelect%20the%20site%3C%2FLI%3E%0A%3CLI%20style%3D%22font-weight%3A%20400%3B%22%3EDouble%20click%20%E2%80%9CConfiguration%20Editor%E2%80%9D%3C%2FLI%3E%0A%3CLI%20style%3D%22font-weight%3A%20400%3B%22%3ESelect%20%3CCODE%3Esystem.webServer%3C%2FCODE%3E%20and%20then%20%3CCODE%3EserverRuntime%3C%2FCODE%3E%3C%2FLI%3E%0A%3CLI%20style%3D%22font-weight%3A%20400%3B%22%3EModify%20the%20%3CCODE%3EuploadReadAheadSize%3C%2FCODE%3E%20value%3C%2FLI%3E%0A%3CLI%20style%3D%22font-weight%3A%20400%3B%22%3EClick%20%E2%80%9CApply%E2%80%9D%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20638px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111016iD1FE2D55DA4649E3%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%224.jpg%22%20title%3D%224.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20may%20also%20want%20to%20change%20%3CCODE%3EmaxRequestEntityAllowed%3C%2FCODE%3E%20parameter.%20It%20specifies%20the%20maximum%20number%20of%20bytes%20allowed%20in%20the%20request%20body.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-501134%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%20style%3D%22display%3A%20inline%20!important%3B%20float%3A%20none%3B%20background-color%3A%20%23ffffff%3B%20color%3A%20%23333333%3B%20cursor%3A%20text%3B%20font-family%3A%20inherit%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3EIIS%20has%20a%20limit%20for%20the%20size%20of%20the%20files%20users%20can%20upload%20to%20an%20application.%20If%20the%20file%20size%20exceeds%20the%20limit%2C%20the%20application%20will%20throw%20%E2%80%9C%3C%2FSPAN%3E%3CSTRONG%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoeui%26amp%3Bquot%3B%2C%26amp%3Bquot%3Blato%26amp%3Bquot%3B%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Carial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20bold%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3EError%20in%20HTTP%20request%2C%20received%20HTTP%20status%20413%20(Request%20Entity%20Too%20Large)%3C%2FSTRONG%3E%3CSPAN%20style%3D%22display%3A%20inline%20!important%3B%20float%3A%20none%3B%20background-color%3A%20%23ffffff%3B%20color%3A%20%23333333%3B%20cursor%3A%20text%3B%20font-family%3A%20inherit%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3E%E2%80%9D%20error.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-SUB%20id%3D%22lingo-sub-898301%22%20slang%3D%22en-US%22%3ERe%3A%20Solution%20for%20%E2%80%9CRequest%20Entity%20Too%20Large%E2%80%9D%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-898301%22%20slang%3D%22en-US%22%3E%3CP%3EDid%20the%20above%20and%20I'm%20still%20seeing%20413%20responses%20from%20my%20server%3A(%3C%2FP%3E%3CP%3ETrying%20to%20post%20back%20a%20RadSpreadheet%20over%2050KB%20on%20an%20SSL%20connection...%3C%2FP%3E%3CP%3EI%20set%20the%20uploadReadAheadSize%20to%20100MB%2C%20the%20actual%20file%20is%20around%20100KB%20so%20you%20wiuld%20think%20it%20would%20be%20fine%20right...%20rebooted%20the%20server%20just%20to%20be%20sure...%3C%2FP%3E%3CP%3ENo%20impact!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-902675%22%20slang%3D%22en-US%22%3ERe%3A%20Solution%20for%20%E2%80%9CRequest%20Entity%20Too%20Large%E2%80%9D%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-902675%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F421707%22%20target%3D%22_blank%22%3E%40JWANicholls2807%3C%2FA%3E%26nbsp%3BThanks%20for%20checking%20out%20the%20post!%20Can%20you%20please%20check%20what%20the%20substatus%20code%20in%20IIS%20logs%3F%20Additionally%2C%20please%20set%20up%20Failed%20Tracing%20Logs%20to%20see%20which%20module%20is%20throwing%20the%20error%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-993659%22%20slang%3D%22en-US%22%3ERe%3A%20Solution%20for%20%E2%80%9CRequest%20Entity%20Too%20Large%E2%80%9D%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-993659%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20I'm%20also%20encountering%20this%20in%20our%20On-premise%20instance%20of%20DevOps%20and%20this%20is%20the%20first%20time%20we%20are%20encountering%20such%20issues.%26nbsp%3B%20In%20our%20previous%20version%20of%20TFS%202017%20this%20was%20never%20an%20issue.%20Was%20there%20a%20big%20change%20in%20DevOps%202019%26nbsp%3Busing%20SSL%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-995298%22%20slang%3D%22en-US%22%3ERe%3A%20Solution%20for%20%E2%80%9CRequest%20Entity%20Too%20Large%E2%80%9D%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-995298%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F450969%22%20target%3D%22_blank%22%3E%40RayCuadra71%3C%2FA%3E%20I%20would%20appreciate%20if%20you%20post%20this%20question%20to%20our%20DevOps%20Community%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdevelopercommunity.visualstudio.com%2Fspaces%2F22%2Findex.html%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3Ehttps%3A%2F%2Fdevelopercommunity.visualstudio.com%2Fspaces%2F22%2Findex.html%3C%2FFONT%3E%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1062888%22%20slang%3D%22en-US%22%3ERe%3A%20Solution%20for%20%E2%80%9CRequest%20Entity%20Too%20Large%E2%80%9D%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1062888%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EThank%20you%20for%20the%20post.%20But%2C%20we%20still%20see%20the%20error.%20Please%20read%20below%20for%20what%20all%20we%20had%20tried.%20Please%20let%20us%20know%20if%20there%20is%20anything%20missing%20or%20that%20we%20should%20try.%20APpreciate%20your%20help.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3EWe%20made%20WCF%20web%20service%20using%20SOAP%20(factory%3A%20MultipleBaseAddressBasicHttpBindingServiceHostFactory)%20hosted%20in%20SharePoint%20environment%20(under%20ISAPI%20folder)%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3EWe%20are%20able%20to%20upload%20larger%20files%20(larger%20than%2049KB)%20in%20the%20SP2010%20farms%20but%20receive%20%22remote%20server%20returned%20an%20unexpected%20response%3A%20(413)%20Request%20Entity%20Too%20Large%22%20error%20after%20upgrading%20to%20SP2013%20environment.%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3E%26nbsp%3B%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3EAfter%20reading%20some%20posts%2C%20still%20received%20the%20same%20error%20message%3A%20%22remote%20server%20returned%20an%20unexpected%20response%3A%20(413)%20Request%20Entity%20Too%20Large%22.%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3E%26nbsp%3B%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3EWe%20wonder%20if%20anyone%20might%20have%20any%20sugegstions%20to%20resolve%20the%20issue.%20Thanks%20in%20advance!%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3E%26nbsp%3B%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3EChanges%20made%20are%3A%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3E(1)%20in%20IIS%2C%20check%20IIS%20Request%20Filtering%20features%20setting%20for%20the%20WCF%20service%20%26gt%3B%20ensure%20%22Maximum%20Allowed%20Content%20Length%22%20is%20large%20enough%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3E(2)%20in%20IIS%2C%20increase%20UploadReadAheadSize%20value%20from%2049152%20to%2052428800%20(even%20to%20maximal%20value%3A%202147483647)%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3E(3)%20in%20SP2013%20CA%20%26gt%3B%20Application%20Management%20%26gt%3B%20Manage%20web%20application%20%26gt%3B%20select%20%3CWEBAPP%3E%20%26gt%3B%20click%20%22General%20Setting%22%20in%20the%20ribbon%20%26gt%3B%20ensure%20%22File%20Upload%20Size%22%20is%20large%20enough%3C%2FWEBAPP%3E%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3E(4)%20update%20binding%20%26amp%3B%20enpoint%20in%20web%20service's%20web.config%2C%20e.g.%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3E%26nbsp%3B%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3E%3CBINDINGS%3E%3C%2FBINDINGS%3E%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CBASICHTTPBINDING%3E%3C%2FBASICHTTPBINDING%3E%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CBINDING%20maxbufferpoolsize%3D%22%26quot%3B2147483647%26quot%3B%26lt%3B%2FP%22%3E%3C%2FBINDING%3E%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20maxBufferSize%3D%222147483647%22%20maxReceivedMessageSize%3D%222147483647%22%20transferMode%3D%22Streamed%22%26gt%3B%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CREADERQUOTAS%20maxdepth%3D%22%26quot%3B2147483647%26quot%3B%22%20maxstringcontentlength%3D%22%26quot%3B2147483647%26quot%3B%26lt%3B%2FP%22%3E%3C%2FREADERQUOTAS%3E%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20maxArrayLength%3D%222147483647%22%20maxBytesPerRead%3D%222147483647%22%20maxNameTableCharCount%3D%222147483647%22%20%2F%26gt%3B%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSECURITY%20mode%3D%22%26quot%3BTransportCredentialOnly%26quot%3B%22%3E%3C%2FSECURITY%3E%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%3CTRANSPORT%20clientcredentialtype%3D%22%26quot%3BNtlm%26quot%3B%22%3E%3C%2FTRANSPORT%3E%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CP%3E%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3E%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3E%26nbsp%3B%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3E%3CSERVICES%3E%3C%2FSERVICES%3E%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSERVICE%20name%3D%22%26quot%3B%26lt%3Bnamespace%22%3E.%3CSERVICENAME%3E%22%20behaviorConfiguration%3D%22%3CNAMESPACE%3E.%3CSERVICENAME%3EBehavior%22%26gt%3B%3C%2FSERVICENAME%3E%3C%2FNAMESPACE%3E%3C%2FSERVICENAME%3E%3C%2FSERVICE%3E%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CENDPOINT%20address%3D%22%26quot%3Bbasic%26quot%3B%22%20binding%3D%22%26quot%3BbasicHttpBinding%26quot%3B%22%20contract%3D%22%26quot%3B%26lt%3Bnamespace%22%3E.%3CSERVICEINTERFACENAME%3E%22%26gt%3B%3C%2FSERVICEINTERFACENAME%3E%3C%2FENDPOINT%3E%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3E%26nbsp%3B%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3E%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3E%26nbsp%3B%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3E(5)%20update%20app.config%20in%20application%20console%20client%2C%20e.g.%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3E%26nbsp%3B%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CBINDING%20name%3D%22%26quot%3BBasicHttpBinding_%26lt%3Bserviceinterfacename%22%3E%22%20maxBufferPoolSize%3D%222147483647%22%20maxBufferSize%3D%222147483647%22%20maxReceivedMessageSize%3D%222147483647%22%26gt%3B%3C%2FBINDING%3E%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CREADERQUOTAS%20maxdepth%3D%22%26quot%3B2147483647%26quot%3B%22%20maxstringcontentlength%3D%22%26quot%3B2147483647%26quot%3B%22%20maxarraylength%3D%22%26quot%3B2147483647%26quot%3B%22%20maxbytesperread%3D%22%26quot%3B2147483647%26quot%3B%22%20maxnametablecharcount%3D%22%26quot%3B2147483647%26quot%3B%22%3E%3C%2FREADERQUOTAS%3E%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSECURITY%20mode%3D%22%26quot%3BTransportCredentialOnly%26quot%3B%22%3E%3C%2FSECURITY%3E%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CTRANSPORT%20clientcredentialtype%3D%22%26quot%3BNtlm%26quot%3B%22%3E%3C%2FTRANSPORT%3E%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FP%3E%3CP%20class%3D%22x_MsoNormal%22%3E%26nbsp%3B%3C%2FP%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1062890%22%20slang%3D%22en-US%22%3ERe%3A%20Solution%20for%20%E2%80%9CRequest%20Entity%20Too%20Large%E2%80%9D%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1062890%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F486697%22%20target%3D%22_blank%22%3E%40Udi123%3C%2FA%3E%2C%20it%20looks%20like%20you%20have%20already%20implemented%20the%20recommended%20solutions.%20Since%20you%20run%20into%20this%20issue%20in%20SharePoint%2C%20I%20think%20it's%20a%20good%20case%20for%20collaboration%20between%20SharePoint%20and%20IIS%20Teams.%20Can%20you%20please%20create%20a%20support%20request%20for%20further%20troubleshooting%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20style%3D%22box-sizing%3A%20border-box%3B%20background-color%3A%20%23f8f8f8%3B%20color%3A%20%23146cac%3B%20text-decoration%3A%20underline%3B%20font-family%3A%20SegoeUI%2C%20Lato%2C%20'Helvetica%20Neue'%2C%20Helvetica%2C%20Arial%2C%20sans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant-ligatures%3A%20normal%3B%20font-variant-caps%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20white-space%3A%20normal%3B%20widows%3A%202%3B%20word-spacing%3A%200px%3B%20-webkit-text-stroke-width%3A%200px%3B%22%20href%3D%22https%3A%2F%2Fsupport.microsoft.com%2Fen-ca%2Fhub%2F4343728%2Fsupport-for-business%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsupport.microsoft.com%2Fen-ca%2Fhub%2F4343728%2Fsupport-for-business%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Microsoft

IIS has a limit for the size of the files users can upload to an application. If the file size exceeds the limit, the application will throw “Error in HTTP request, received HTTP status 413 (Request Entity Too Large)” error.

 

The default file upload size is 49 KB (49152 bytes). The application records the log below if user tries to upload a file that is bigger than this size.

 

3.jpg

 

Why this issue occurs for SSL sites? The reason is that the request body must be preloaded during the SSL handshake process.

 

Solution

The quickest solution is to increase the upload size limit. IIS uses uploadReadAheadSize parameter in applicationHost.config and web.config files to control this limit.

 

uploadReadAheadSize
Optional uint attribute.
Specifies the number of bytes that a Web server will read into a buffer and pass to an ISAPI extension or module. This occurs once per client request. The ISAPI extension or module receives any additional data directly from the client. The value must be between 0 and 2147483647.
The default value is 49152.

Server Runtime

 

Steps to change the value of this parameter:

  1. Open IIS Manager
  2. Select the site
  3. Double click “Configuration Editor”
  4. Select system.webServer and then serverRuntime
  5. Modify the uploadReadAheadSize value
  6. Click “Apply”

 

4.jpg

 

You may also want to change maxRequestEntityAllowed parameter. It specifies the maximum number of bytes allowed in the request body.

6 Comments
Occasional Visitor

Did the above and I'm still seeing 413 responses from my server:(

Trying to post back a RadSpreadheet over 50KB on an SSL connection...

I set the uploadReadAheadSize to 100MB, the actual file is around 100KB so you wiuld think it would be fine right... rebooted the server just to be sure...

No impact!

Microsoft

@JWANicholls2807 Thanks for checking out the post! Can you please check what the substatus code in IIS logs? Additionally, please set up Failed Tracing Logs to see which module is throwing the error

Occasional Visitor

Hi I'm also encountering this in our On-premise instance of DevOps and this is the first time we are encountering such issues.  In our previous version of TFS 2017 this was never an issue. Was there a big change in DevOps 2019 using SSL?

Microsoft

Hi @RayCuadra71 I would appreciate if you post this question to our DevOps Community: https://developercommunity.visualstudio.com/spaces/22/index.html

Occasional Visitor

Hi,

Thank you for the post. But, we still see the error. Please read below for what all we had tried. Please let us know if there is anything missing or that we should try. APpreciate your help.

 

We made WCF web service using SOAP (factory: MultipleBaseAddressBasicHttpBindingServiceHostFactory) hosted in SharePoint environment (under ISAPI folder)

We are able to upload larger files (larger than 49KB) in the SP2010 farms but receive "remote server returned an unexpected response: (413) Request Entity Too Large" error after upgrading to SP2013 environment.

 

After reading some posts, still received the same error message: "remote server returned an unexpected response: (413) Request Entity Too Large".

 

We wonder if anyone might have any sugegstions to resolve the issue. Thanks in advance!

 

Changes made are:

(1) in IIS, check IIS Request Filtering features setting for the WCF service > ensure "Maximum Allowed Content Length" is large enough

(2) in IIS, increase UploadReadAheadSize value from 49152 to 52428800 (even to maximal value: 2147483647)

(3) in SP2013 CA > Application Management > Manage web application > select <webapp> > click "General Setting" in the ribbon > ensure "File Upload Size" is large enough

(4) update binding & enpoint in web service's web.config, e.g.

 

<bindings>

      <basicHttpBinding>

        <binding maxBufferPoolSize="2147483647"

                  maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" transferMode="Streamed">

          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"

                maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />

          <security mode="TransportCredentialOnly">

            <transport clientCredentialType="Ntlm" />

          </security>

        </binding>

      </basicHttpBinding>

</bindings>

 

<services>

                <service name="<namespace>.<servicename>" behaviorConfiguration="<namespace>.<servicename>Behavior">

                                <endpoint address="basic" binding="basicHttpBinding" contract="<namespace>.<serviceinterfacename>">

                                </endpoint>

 

                </service>

</services>

 

(5) update app.config in application console client, e.g.

 

                <binding name="BasicHttpBinding_<serviceinterfacename>" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">

                  <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />

                    <security mode="TransportCredentialOnly">

                        <transport clientCredentialType="Ntlm" />

                    </security>

                </binding>

 

Microsoft

Hi @Udi123, it looks like you have already implemented the recommended solutions. Since you run into this issue in SharePoint, I think it's a good case for collaboration between SharePoint and IIS Teams. Can you please create a support request for further troubleshooting?

 

https://support.microsoft.com/en-ca/hub/4343728/support-for-business