Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Mani 5 posts 25 karma points
    Dec 27, 2010 @ 08:00
    Mani
    0

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

    Hi All,

    I have upgraded from 2 to 4.5.2 successfully.

    But I am getting the following error when I click on PDF link in media folder, which has '&' in the name.

    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() +8884233
    System.Web.ValidateRequestExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +35
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184



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

    Please help me.

    Thanks in advance.

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Dec 27, 2010 @ 10:38
    Matt Brailsford
    1

    Hi Mani,

    This is a common problem, which the quickest solution is usualy to just rename the file to not contain an "&" character. I think others have also written event handlers to automatically rename files when one is saved to remove ilegal characters.

    If you just need to get it up an running though, I would just say rename it.

    Cheers

    Matt

  • David 57 posts 80 karma points
    May 11, 2011 @ 16:13
    David
    0

    We have multiple sites on one install with hundreds of images many of which have & in the name.   renaming these is not an adequate solution as it would take hours to track down all the images and rename.  is there another solution for this?

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    May 11, 2011 @ 16:16
    Matt Brailsford
    0

    Hi David,

    Could you not just run a batch process to rename all files?

    Matt

  • David 57 posts 80 karma points
    May 11, 2011 @ 16:26
    David
    0

    wouldn't that break the path in the db that the file points to?

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    May 11, 2011 @ 16:29
    Matt Brailsford
    0

    Hi David,

    Then do search and replace within the DB? (Making sure to limit by media file types)

    Also, just make sure you back everything up beforehand.

    Matt

Please Sign in or register to post replies

Write your reply to:

Draft