title: Azure API App Throwing Request Size constraints Errors
body: <p>I have a sample API hosted in Azure API App as <a href="https://epdpoc.azurewebsites.net/swagger/index.html" rel="nofollow noreferrer">https://epdpoc.azurewebsites.net/swagger/index.html</a>
  This is API.NET Core 5.0 based Web API. The 2nd paramter, htmlText, to pass as querystring. The query string value is as below</p>
  <pre><code>&lt;table border=&quot;0&quot; width=&quot;100%&quot;&gt;
  &lt;tr&gt;
  &lt;td width =&quot;50%&quot;&gt;&amp;nbsp;&lt;/td&gt;
  &lt;td width = &quot;50%&quot;&gt;&amp;nbsp;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;&lt;td colspan=2&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot; &gt;
  {{SALUTATION}}&lt;br&gt;
  
  &lt;font color=&quot;blue&quot;&gt;&lt;b&gt;Attachments can be located below the Subject line or at the end of the email.  For the Policy or Endorsement documents, please follow the AEPEx process.&lt;/font&gt;&lt;/b&gt;&lt;br&gt;&lt;br&gt;
  
  Thank you for choosing Zurich. Providing high-quality insurance solutions to our customers is a priority we share, and we appreciate your trust and your business. &lt;br&gt;&lt;br&gt;
  
  We are pleased to inform you that any policies, endorsements or audits that are associated with the policy number(s) referenced below will be delivered by Aon via AEPEx &lt;font color=&quot;blue&quot;&gt;&lt;b&gt;(normally within two business days)&lt;/font&gt;&lt;/b&gt;, per Aon's request. Please make sure that all Bridge headers have been updated to ensure that your document(s) is/are delivered to you, via AEPEx, as quickly as possible.&lt;br&gt;&lt;br&gt;
  
  &lt;font color=&quot;blue&quot;&gt;&lt;b&gt;AON has requested Zurich to not forward attachments that will be delivered via AEPEx.  If you have any questions concerning this policy, please contact your office AEPEx Champion.&lt;/font&gt;&lt;/b&gt;&lt;br&gt;&lt;br&gt;
  
  Please distribute a copy to the client along with all other relevant information.&lt;br&gt;&lt;br&gt;
  
  Our commitment does not stop here. We pride ourselves on helping customers protect what they value most, and that goal includes cultivating an effective and collaborative working relationship with you. We strive to exceed your expectations with personalized and responsive service. Should you have any questions or suggestions, do not hesitate to contact your Zurich International Service Representative listed below.&lt;br&gt;&lt;br&gt;
  
  We look forward to working together on behalf of our valued customers.&lt;br&gt;&lt;br&gt;
  &lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;
  
  &lt;tr&gt;&lt;td align=&quot;left&quot; valign=&quot;top&quot;&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;b&gt;
  Customer Name:
  &lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
  &lt;td valign=&quot;top&quot; colspan=3&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;
  {{CUST_NM}}
  &lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;
  
  &lt;tr&gt;&lt;td align=&quot;left&quot; valign=&quot;top&quot;&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;b&gt;
  Policy Number(s)/Effective Date(s):
  &lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
  &lt;td valign=&quot;top&quot; colspan=3&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;
  {{POL_NUM}}
  &lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;
  
  &lt;tr&gt;&lt;td align=&quot;left&quot; valign=&quot;top&quot; colspan=4&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;b&gt;
  International Service Representative contact information:&lt;/b&gt;&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;
  
  &lt;tr&gt;&lt;td align=&quot;left&quot; valign=&quot;top&quot;&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;/font&gt;&lt;/td&gt;
  &lt;td align=&quot;left&quot; valign=&quot;top&quot;&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot; colspan=3&gt;
  {{UDW_ASSIST_NM}}&lt;br&gt;
  {{UDW_ASSIST_PHONE}}&lt;br&gt;
  {{UDW_ASSIST_EMAIL}}&lt;br&gt;
  &lt;/font&gt;&lt;/td&gt;
  &lt;td valign=&quot;top&quot;&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;
  &lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;
  
  &lt;/table&gt;
  
  &lt;br&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;
  {{COMMENTS}}
  &lt;/font&gt;&lt;br&gt;
  &lt;br&gt;
  
  &lt;table width=&quot;100%&quot; border=&quot;1&quot;&gt;
  
  &lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;50%&quot;&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot; color=&quot;blue&quot;&gt;
  &lt;b&gt;Useful links for Brokers:&lt;/b&gt;&lt;br&gt;&lt;br&gt;
  &lt;a href=https://www.zurichna.com/en/brokers&gt;Zurich Broker Resource Center&lt;/a&gt;
  &lt;br&gt;&lt;br&gt;
  &lt;a href=https://www.zurichna.com/&gt;Zurich North America website&lt;/a&gt;
  &lt;br&gt;&lt;br&gt;
  &lt;a href=https://www.zurichna.com/en/industries/international/largeintl&gt;Zurich solutions for Large Multinational Global&lt;/a&gt;
  &lt;br&gt;&lt;br&gt;
  &lt;a href=https://www.zurichna.com/en/brokers/appetites&gt;Zurich appetite and contacts guide for Brokers&lt;/a&gt;
  &lt;br&gt;&lt;br&gt;
  &lt;/font&gt;&lt;/td&gt;
  
  &lt;td valign=&quot;top&quot; width=&quot;50%&quot;&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot; color=&quot;blue&quot;&gt;
  &lt;b&gt;Useful links for Clients:&lt;/b&gt;&lt;br&gt;&lt;br&gt;
  &lt;a href=https://www.zurichna.com/en/claims&gt;Zurich Claims Website (with kits and reporting guide)&lt;/a&gt;
  &lt;br&gt;&lt;br&gt;
  &lt;a href=https://www.zurichna.com/_/media/dbe/zna/docs/claims/zurich-accident-assistance-guide.pdf&gt;Zurich accident assistance guide (driver kit)&lt;/a&gt;
  &lt;br&gt;&lt;br&gt;
  &lt;a href=http://www.zurichna.com/en/risk&gt;Zurich Risk Engineering&lt;/a&gt;&lt;br&gt;&lt;br&gt;
  &lt;a href=https://esolutions.zurichna.com/s3/Boiler-Inspection-Request-System&gt;Boiler inspection request online&lt;/a&gt;&lt;br&gt;&lt;br&gt;
  &lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  <p>I have one Web.Config by setting request size as below.</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;configuration&gt;
    &lt;!-- To customize the asp.net core module uncomment and edit the following section. 
    For more info see https://go.microsoft.com/fwlink/?linkid=838655 --&gt;
    &lt;system.webServer&gt;
      &lt;handlers&gt;
        &lt;remove name=&quot;aspNetCore&quot; /&gt;
        &lt;add name=&quot;aspNetCore&quot; path=&quot;*&quot; verb=&quot;*&quot; modules=&quot;AspNetCoreModuleV2&quot; resourceType=&quot;Unspecified&quot; /&gt;
      &lt;/handlers&gt;
      &lt;aspNetCore processPath=&quot;%LAUNCHER_PATH%&quot; arguments=&quot;%LAUNCHER_ARGS%&quot; stdoutLogEnabled=&quot;false&quot; stdoutLogFile=&quot;.\logs\stdout&quot; hostingModel=&quot;InProcess&quot; /&gt;
      &lt;security&gt;
        &lt;requestFiltering&gt;
          &lt;!-- This will handle requests up to 50MB --&gt;
          ***&lt;requestLimits maxAllowedContentLength=&quot;52428800&quot; /&gt;***
        &lt;/requestFiltering&gt;
      &lt;/security&gt;
    &lt;/system.webServer&gt;
  &lt;/configuration&gt;
  </code></pre>
  <p>Still I am getting request size constraits error from API App as below.</p>
  <blockquote>
  <p>Verify the
  configuration/system.webServer/security/requestFiltering/requestLimits@maxQueryString
  setting in the applicationhost.config or web.config file.</p>
  </blockquote>
  <p>Any clue here? Any additional settings to do?</p>