internal void Validate ()
{
var cfg = HttpRuntime.Section;
string query = UrlComponents.Query;
if (query != null && query.Length > cfg.MaxQueryStringLength)
throw new HttpException (400, "The length of the query string for this request exceeds the configured maxQueryStringLength value.");
string path = PathNoValidation;
if (path != null) {
if (path.Length > cfg.MaxUrlLength)
throw new HttpException (400, "The length of the URL for this request exceeds the configured maxUrlLength value.");
char[] invalidChars = RequestPathInvalidCharacters;
if (invalidChars != null) {
int idx = path.IndexOfAny (invalidChars);
if (idx != -1)
throw HttpException.NewWithCode (
String.Format ("A potentially dangerous Request.Path value was detected from the client ({0}).", path [idx]),
WebEventCodes.RuntimeErrorValidationFailure
);
}
}
if (validateRequestNewMode)
ValidateInput ();
}
#endif