0

I'm trying to use jquery dataTables with a few extras on Azure Websites. It generates a sizeable query string (2121 characters in testing). This returns a bad code on Azure websites (The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.).

To get it working locally I edited the web.config with this:

<httpRuntime maxQueryStringLength="4000" maxUrlLength="4000"/>

(I believe only the maxQueryStringLength is really needed).

Anyway, all is fine locally and on another server but on WA Web Sites I can't get it working. Any ideas?

Jono Rogers
  • 181
  • 8

1 Answers1

1

Try customizing IIS Request Filtering parameters. I suspect you're using Cassini (Visual Studio development server) to develop locally.

Limitations related to Query String and/or URL max lengths occur at two levels on Azure Websites (or any IIS environments) :

  • ASP.NET Runtime : These limits are lifted using the httpRuntime node and its associated attributes
  • IIS Requests Filtering module : IIS also applies its own filtering rules regarding URL and Query String length, even before the request is processed by the ASP.NET Runtime. By default, the maximum allowed length for a query string is 2048 (see here). You should set the appropriate values in your Web.config, under the requestLimits subnodes, eg :

    <system.webServer>
      <security>
        <requestFiltering>
          <requestLimits maxQueryString="4096"/>
        </requestFiltering>
      </security>
    </system.webServer>
    

See also this question

Community
  • 1
  • 1
Gabriel Boya
  • 761
  • 8
  • 17