Permalink
Browse files

Raise the value of maxQueryLength property.

The NuGet client auto converts HTTP GETs to POSTs when the query string
exceeds 4000 characters. However the server defaults to a max length of
2048 and begins rejecting queries longer than that. We need to keep the
two in sync.
  • Loading branch information...
1 parent f7be422 commit 8e0319871d9e94f26eaf035196b1cd20f890a3b1 @pranavkm pranavkm committed Jun 21, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 Website/Web.config
View
@@ -80,7 +80,7 @@
<add namespace="System.Web.WebPages" />
</namespaces>
</pages>
- <httpRuntime maxRequestLength="2000000000" requestPathInvalidCharacters="&lt;,&gt;,*,%,:,\,?" />
+ <httpRuntime maxQueryStringLength="4000" maxRequestLength="2000000000" requestPathInvalidCharacters="&lt;,&gt;,*,%,:,\,?" />
<httpModules>
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" />
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" />
@@ -106,6 +106,11 @@
<remove statusCode="500" subStatusCode="-1" />
<error statusCode="500" path="/Errors/Error.html" responseMode="ExecuteURL" />
</httpErrors>
+ <security>
+ <requestFiltering>
+ <requestLimits maxQueryString="4000" />
+ </requestFiltering>
+ </security>
<httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files">
<scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" />
<dynamicTypes>

0 comments on commit 8e03198

Please sign in to comment.