Solution for “Request Entity Too Large” error

By
Published 04-29-2019 02:33 PM 128K Views
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.

 

Note: In another case, the recommendations above didn't work to solve 413 error. Please check this post for more information

11 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

Occasional Visitor

Hi All ,

 

i have done the above recommendation but nothing wroks ! 

 any solution ?

Occasional Visitor

For MVC add [RequestSizeLimit(50_000_000)] annotation to the specific action or controller.

 

Setup the maxAllowedContentLength parameter in the system->webServer->security->requestFiltering section:

 

Capture.PNG

Occasional Visitor

@Udi123 , Hi!
I was helped by the change from point (4) of your post.


(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>

 

Occasional Visitor

In terms of performance, the above suggestion actually has the potential to significantly increase your memory consumption and negatively impact your application.

I came across the exact same issue early this year, and initially thought that your suggestion above would be an obvious way to solve it.

Unfortunately, further reading revealed the knock on effects of ramping up the sizes as suggested.

 

The answer came partially from this post:

https://forums.iis.net/t/1161838.aspx

Basically, what you need to do is force the server to negotiate the client certificate *before* it does anything else, and that way your server won't complain about being unable to buffer the request body as it will already have done the negotiation.

 

Here's the steps to follow

1) Open a command prompt

2) Run netsh http show sslcert
3) Note down the Certificate Hash and Application ID values for Your app (typically running on port 443 or similar)
4) Delete the existing certificate binding for port 443 (or whichever port you're using)

netsh http delete sslcert ipport=0.0.0.0:443


5) Re-create the port binding using the same certificate hash and application id that you noted in step 3 ensuring the appid is enclosed in braces as shown in the example below

Caution - below is an example - you need to substitute the certhash and appid before executing

netsh http add sslcert ipport=0.0.0.0:443 certhash=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx appid={xxxxx-xxxxx-xxxx-xxxx-xxxxxx} certstorename=WebHosting verifyclientcertrevocation=enable VerifyRevocationWithCachedClientCertOnly=disable UsageCheck=Enable clientcertnegotiation=enable


6) Run netsh http show sslcert
7) Validate that the Negotiate Client Certificate setting for the port is now enabled.

 

You should then find you can submit your request without having to do anything else at all :)

Occasional Visitor

There are lots of solutions/comments here, none of which address the fundamental question.  What entity is too large?   We had the same issue and we eventually identified that the entity in error was a viewstate object in the ASPX page.   Just making the size of the maxBufferPoolSize,  maxBufferSize and maxReceivedMessageSize to be enormously large is not really the correct solution.  It will work but you're only masking the problem and it'll occur at some point in the future.


ViewState
A web application is stateless. That means that a new instance of a page is created every time when we make a request to the server to get the page and after the round trip our page has been lost immediately. It only happens because of one server, all the controls of the Web Page is created and after the round trip the server destroys all the instances. So to retain the values of the controls we use state management techniques. View State is the method to preserve the Value of the Page and Controls between round trips. It is a Page-Level State Management technique. View State is turned on by default and normally serializes the data in every control on the page regardless of whether it is actually used during a post-back.

Solution
Our webpage was displaying a gridview of records which by user request gave access to every record in the underlying data query view.  As records were added to the tables outside of this view, the Gridview Dataset grew to be too large for the ASPX page to save and recall the viewstate object.  Our solution was to understand the business reasons why the whole of the dataset was required and as it turned out generally it was only the last 7 days worth of data that was required, any further back in time was catered for by a standing report.  Once this was understood then we simply amended the page query to limit to the last 7 days of data, promulgate the change and inform users.  Problem fixed.  

%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%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%22%3Ehttps%3A%2F%2Fsupport.microsoft.com%2Fen-ca%2Fhub%2F4343728%2Fsupport-for-business%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1526288%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-1526288%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20All%20%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ei%20have%20done%20the%20above%20recommendation%20but%20nothing%20wroks%20!%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3Bany%20solution%20%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1705435%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-1705435%22%20slang%3D%22en-US%22%3E%3CP%3EFor%20MVC%20add%20%3CSTRONG%3E%5BRequestSizeLimit(50_000_000)%5D%3C%2FSTRONG%3E%20annotation%20to%20the%20specific%20action%20or%20controller.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESetup%20the%20%3CSTRONG%3EmaxAllowedContentLength%3C%2FSTRONG%3E%20parameter%20in%20the%20%3CSTRONG%3Esystem-%26gt%3BwebServer-%26gt%3Bsecurity-%26gt%3BrequestFiltering%3C%2FSTRONG%3E%20section%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-left%22%20image-alt%3D%22Capture.PNG%22%20style%3D%22width%3A%20728px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F221634i322DF1F19B478464%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Capture.PNG%22%20alt%3D%22Capture.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2181476%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-2181476%22%20slang%3D%22en-US%22%3E%3CP%3E%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%26nbsp%3B%2C%20Hi!%3CBR%20%2F%3EI%20was%20helped%20by%20the%20change%20from%20point%20(4)%20of%20your%20post.%3C%2FP%3E%3CP%3E%3CBR%20%2F%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%3E%3CSTRONG%3EmaxBufferPoolSize%3D%22%3CFONT%20color%3D%22%23FF0000%22%3E2147483647%3C%2FFONT%3E%22%3C%2FSTRONG%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%20%3CSTRONG%3EmaxBufferSize%3D%22%3CFONT%20color%3D%22%23FF0000%22%3E2147483647%3C%2FFONT%3E%22%3C%2FSTRONG%3E%20%3CSTRONG%3EmaxReceivedMessageSize%3D%22%3CFONT%20color%3D%22%23FF0000%22%3E2147483647%3C%2FFONT%3E%22%3C%2FSTRONG%3E%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%3CLINGO-SUB%20id%3D%22lingo-sub-2332009%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-2332009%22%20slang%3D%22en-US%22%3E%3CP%3EIn%20terms%20of%20performance%2C%20the%20above%20suggestion%20actually%20has%20the%20potential%20to%20significantly%20increase%20your%20memory%20consumption%20and%20%3CEM%3Enegatively%3C%2FEM%3E%20impact%20your%20application.%3C%2FP%3E%3CP%3EI%20came%20across%20the%20exact%20same%20issue%20early%20this%20year%2C%20and%20initially%20thought%20that%20your%20suggestion%20above%20would%20be%20an%20obvious%20way%20to%20solve%20it.%3C%2FP%3E%3CP%3EUnfortunately%2C%20further%20reading%20revealed%20the%20knock%20on%20effects%20of%20ramping%20up%20the%20sizes%20as%20suggested.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20answer%20came%20partially%20from%20this%20post%3A%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fforums.iis.net%2Ft%2F1161838.aspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Fforums.iis.net%2Ft%2F1161838.aspx%3C%2FA%3E%3C%2FP%3E%3CP%3EBasically%2C%20what%20you%20need%20to%20do%20is%20force%20the%20server%20to%20negotiate%20the%20client%20certificate%20*before*%20it%20does%20anything%20else%2C%20and%20that%20way%20your%20server%20won't%20complain%20about%20being%20unable%20to%20buffer%20the%20request%20body%20as%20it%20will%20already%20have%20done%20the%20negotiation.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHere's%20the%20steps%20to%20follow%3C%2FP%3E%3CP%3E1)%20Open%20a%20command%20prompt%3C%2FP%3E%3CP%3E2)%20Run%20netsh%20http%20show%20sslcert%3CBR%20%2F%3E3)%20Note%20down%20the%20Certificate%20Hash%20and%20Application%20ID%20values%20for%20Your%20app%20(typically%20running%20on%20port%20443%20or%20similar)%3CBR%20%2F%3E4)%20Delete%20the%20existing%20certificate%20binding%20for%20port%20443%20(or%20whichever%20port%20you're%20using)%3C%2FP%3E%3CP%3Enetsh%20http%20delete%20sslcert%20ipport%3D0.0.0.0%3A%3CSTRONG%3E443%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E5)%20Re-create%20the%20port%20binding%20using%20the%20same%20certificate%20hash%20and%20application%20id%20that%20you%20noted%20in%20step%203%20%3CEM%3Eensuring%20the%20appid%20is%20enclosed%20in%20braces%3C%2FEM%3E%20as%20shown%20in%20the%20example%20below%3C%2FP%3E%3CP%3E%3CEM%3E%3CSTRONG%3ECaution%3C%2FSTRONG%3E%20-%20below%20is%20an%20example%20-%20you%20need%20to%20substitute%20the%20certhash%20and%20appid%20before%20executing%3C%2FEM%3E%3C%2FP%3E%3CP%3Enetsh%20http%20add%20sslcert%20ipport%3D0.0.0.0%3A443%20certhash%3D%3CSTRONG%3Exxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%3C%2FSTRONG%3E%20appid%3D%7B%3CSTRONG%3Exxxxx-xxxxx-xxxx-xxxx-xxxxxx%3C%2FSTRONG%3E%7D%20certstorename%3DWebHosting%20verifyclientcertrevocation%3Denable%20VerifyRevocationWithCachedClientCertOnly%3Ddisable%20UsageCheck%3DEnable%20%3CSTRONG%3Eclientcertnegotiation%3Denable%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E6)%20Run%20netsh%20http%20show%20sslcert%3CBR%20%2F%3E7)%20Validate%20that%20the%20Negotiate%20Client%20Certificate%20setting%20for%20the%20port%20is%20now%20enabled.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20should%20then%20find%20you%20can%20submit%20your%20request%20without%20having%20to%20do%20anything%20else%20at%20all%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2382830%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-2382830%22%20slang%3D%22en-US%22%3E%3CP%3EThere%20are%20lots%20of%20solutions%2Fcomments%20here%2C%20none%20of%20which%20address%20the%20fundamental%20question.%26nbsp%3B%20What%20entity%20is%20too%20large%3F%26nbsp%3B%20%26nbsp%3BWe%20had%20the%20same%20issue%20and%20we%20eventually%20identified%20that%20the%20entity%20in%20error%20was%20a%20%3CFONT%20color%3D%22%23FF0000%22%3E%3CEM%3E%3CSTRONG%3Eviewstate%3C%2FSTRONG%3E%20%3C%2FEM%3E%3C%2FFONT%3Eobject%20in%20the%20ASPX%20page.%26nbsp%3B%20%26nbsp%3BJust%20making%20the%20size%20of%20the%20maxBufferPoolSize%2C%26nbsp%3B%26nbsp%3BmaxBufferSize%20and%20maxReceivedMessageSize%20to%20be%20enormously%20large%20is%20not%20really%20the%20correct%20solution.%26nbsp%3B%20It%20will%20work%20but%20you're%20only%20masking%20the%20problem%20and%20it'll%20occur%20at%20some%20point%20in%20the%20future.%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%3CSTRONG%3EViewState%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSPAN%3EA%20web%20application%20is%20stateless.%20That%20means%20that%20a%20new%20instance%20of%20a%20page%20is%20created%20every%20time%20when%20we%20make%20a%20request%20to%20the%20server%20to%20get%20the%20page%20and%20after%20the%20round%20trip%20our%20page%20has%20been%20lost%20immediately.%20It%20only%20happens%20because%20of%20one%20server%2C%20all%20the%20controls%20of%20the%20Web%20Page%20is%20created%20and%20after%20the%20round%20trip%20the%20server%20destroys%20all%20the%20instances.%20So%20to%20retain%20the%20values%20of%20the%20controls%20we%20use%20state%20management%20techniques.%26nbsp%3BView%20State%20is%20the%20method%20to%20preserve%20the%20Value%20of%20the%20Page%20and%20Controls%20between%20round%20trips.%20It%20is%20a%20Page-Level%20State%20Management%20technique.%20View%20State%20is%20turned%20on%20by%20default%20and%20normally%20serializes%20the%20data%20in%20every%20control%20on%20the%20page%20regardless%20of%20whether%20it%20is%20actually%20used%20during%20a%20post-back.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3ESolution%3C%2FSTRONG%3E%3CBR%20%2F%3EOur%20webpage%20was%20displaying%20a%20gridview%20of%20records%20which%20by%20user%20request%20gave%20access%20to%20every%20record%20in%20the%20underlying%20data%20query%20view.%26nbsp%3B%20As%20records%20were%20added%20to%20the%20tables%20outside%20of%20this%20view%2C%20the%20Gridview%20Dataset%20grew%20to%20be%20too%20large%20for%20the%20ASPX%20page%20to%20save%20and%20recall%20the%20viewstate%20object.%26nbsp%3B%20Our%20solution%20was%20to%20understand%20the%20business%20reasons%20why%20the%20whole%20of%20the%20dataset%20was%20required%20and%20as%20it%20turned%20out%20generally%20it%20was%20only%20the%20last%207%20days%20worth%20of%20data%20that%20was%20required%2C%20any%20further%20back%20in%20time%20was%20catered%20for%20by%20a%20standing%20report.%26nbsp%3B%20Once%20this%20was%20understood%20then%20we%20simply%20amended%20the%20page%20query%20to%20limit%20to%20the%20last%207%20days%20of%20data%2C%20promulgate%20the%20change%20and%20inform%20users.%26nbsp%3B%20Problem%20fixed.%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%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%20image-alt%3D%223.jpg%22%20style%3D%22width%3A%20638px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111015i2760A41C3FE08C3A%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%223.jpg%22%20alt%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-1730502368%22%20id%3D%22toc-hId-1730499452%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%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%20image-alt%3D%224.jpg%22%20style%3D%22width%3A%20638px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111016iD1FE2D55DA4649E3%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%224.jpg%22%20alt%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%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENote%3A%20In%20another%20case%2C%20the%20recommendations%20above%20didn't%20work%20to%20solve%20413%20error.%20Please%20check%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fiis-support-blog%2Fwcf-service-doesn-t-accept-files-over-64-kb%2Fba-p%2F2385315%22%20target%3D%22_self%22%3Ethis%20post%3C%2FA%3E%20for%20more%20information%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
Co-Authors
Version history
Last update:
‎May 25 2021 01:33 PM
Updated by: