Amit Sharma
Amit Sharma

Reputation: 1088

A potentially dangerous Request.Path value was detected from the client (:)

I am getting a strange issue on production server, while on all other environments(DEV,UAT) are working fine.

When i trace log file there is only one error what i found:

Exception information: 
    Exception type: HttpException 
    Exception message: A potentially dangerous Request.Path value was detected from the client (:).
   at System.Web.HttpRequest.ValidateInputIfRequiredByConfig()
   at System.Web.HttpApplication.PipelineStepManager.ValidateHelper(HttpContext context) 

Could someone please suggest me, what is missing over there.

Upvotes: 1

Views: 7577

Answers (2)

MeSo2
MeSo2

Reputation: 466

I found that if you have something ending in this /tel: in your request path that it will cause the error.

Like for instance

<a href="tel:123456">Call ME!</a>

I found you can work around this by removing the href link and to this instead

<div onclick="window.open('tel:123456');"  
     style="cursor: pointer;">Call ME!</div>

Upvotes: 0

madcap
madcap

Reputation: 90

You are getting this because of built-in request validation. You can get by this by removing ':' in your configuration file:

> <system.web>
>     <httpRuntime requestPathInvalidCharacters="<,>,*,%,&,:,\,?" /> </system.web>

Here's the detailed article on the same.

Upvotes: 2

Related Questions