I follow the example but this does not work and I still get the error. Here's my class and how do I add it to web config
Configure my web:
& lt; HttpRuntime requestValidationType = "CustomRequestValidation" /> Public class CustomRequestValidation: {Private CustomRequestValidation () {} Protected Override Bold IsValidRequestString (HttpContext Reference, String Value, RequestValidationSource requestValidationSource,
string collection of, out int versionfileRead) {validationFailureIndex = -1; If (requestValidationSource == RequestValidationSource.Path) {// value "& amp;", "=" allowed (value.Contains ("& amp;") = value.Contains ("=") {validationFailureIndex = - 1; Return true; } Else {// Leave a forward check for ASP.NET Return base. ISIDIDRESTstring (reference, value, request verification, source, archive, validation outside confirmation)}} and {return base.IsValidRequestString (reference, value, validation source, archive, verification validationIndex); }}}
error descriptions:
A potentially dangerous request from the System.Web.HttpException client (=). Path math was found. System.Web.HttpException (0x80004005): A potentially dangerous request. Path value found with client (:). System.Web.HttpApplication.ExecuteStep (IExecutionStep Phase, Boolean & Full Synchronous) on System.Web.HttpRequest.ValidateInputIfRequiredByConfig () on System.Web.H.pt.Application.ValidateRequestExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute () Code> "post-text" itemprop = "text"> I also had this problem and to add it to the web. Configure resolved the problem.
& lt; HttpRuntime requestpath where invalid = "" />
By default, .NET 4.0 has requested all the & lt;> *% & amp ;: \? Rejected with? Characters that could cause problems for you, it was for me.
[Configuration property ("requestPathInvalidCharacters", DefaultValue = @ "& lt;,>, *,%, & amp;,:, \,?")] Public String RequestPathInvalidCharacters {get; Set; }
Comments
Post a Comment