+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / A potentially dangerous Request.Path value was detected from the client (&).

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

2 posts, 0 answered
  1. Chandresh
    Chandresh avatar
    2 posts
    Registered:
    17 Sep 2012
    14 May
    Link to this post

    Hi,

    I have migrated some blog data using sitefinty native api. now I am seeing a error on my system 

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

     

    Full screenshot is attached below . I have tried solution provided over net using 

     

    http://www.sitefinity.com/developer-network/forums/developing-with-sitefinity-/mvc-url-with-query-string-fails-if-the-query-string-ends-in-a-period

    <httpRuntime relaxedUrlToFileSystemMapping="true" />

    like adding httpRuntime exceptions for characters. But nothing worked in my case. rather I am getting 500 error when I add these to my web.config file. 

    Please provide me a solution if I can fix them without changing records. 

    Server Error in '/' Application.

    A potentially dangerous Request.Path value was detected from the client (&).Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

    Exception Details: System.Web.HttpException: A potentially dangerous Request.Path value was detected from the client (&).

    Source Error: 

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
    Stack Trace: 

    [HttpException (0x80004005): A potentially dangerous Request.Path value was detected from the client (&).] System.Web.HttpRequest.ValidateInputIfRequiredByConfig() +12353311 System.Web.PipelineStepManager.ValidateHelper(HttpContext context) +166

    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34274

    Thank You

    Chandresh

  2. Sabrie Nedzhip
    Sabrie Nedzhip avatar
    534 posts
    Registered:
    06 Dec 2016
    19 May
    Link to this post
    Hi Chandresh,

    Usually this exception is thrown when the URL indeed contains a dangerous character like a "*", "&". The error just shows that an url encode is not called somewhere where it should be. In this case the invalid character on your side is (&).

    If you have created the blog posts using the API, please note to construct properly the url and replace the special characters in it.

    You can check the below article for more details about the creating blog posts where you can see a sample on how to construct the url:
    http://docs.sitefinity.com/for-developers-create-blog-posts

    Regards,
    Sabrie Nedzhip
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
2 posts, 0 answered