Copied to clipboard

Flag this post as spam?

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


  • mohammed 5 posts 25 karma points
    May 29, 2012 @ 09:38
    mohammed
    0

    A potentially dangerous Request.Path error

    I am presently working on the security module of an umbraco website and have come across a serious issue which I am unable to solve. When the user inserts '<' or '&' in the URL an error is shown, I've attached a screenshot of it. I have managed to make a custom error page which takes care of error 404 but I am struggling to solve the above mentioned issue.i have to redirect user to default error page when such error take place.

     

    Hoping to hear from u soon.

    Thanking you,
    Mohammed .

  • Michael Latouche 504 posts 819 karma points MVP 4x c-trib
    May 29, 2012 @ 10:05
    Michael Latouche
    0

    Hi Mohammed,

    When you want to use "special characters" in a URL, it is best to use the Server.UrlEncode method when building the URL. This will transform the chartacters in URL-friendly version, which you will automatically get back as the original characters on the server.

    Hope this helps.

    Cheers,

    Michael.

  • mohammed 5 posts 25 karma points
    May 29, 2012 @ 10:46
    mohammed
    0

    Hi Michael

    I don't have to use special character in any case.but our website is under security audit,and acording their guidline security firm provided the above issue.

  • Michael Latouche 504 posts 819 karma points MVP 4x c-trib
    May 29, 2012 @ 10:52
    Michael Latouche
    0

    Hi Mohammed,

    In that case, I think you can catch the "not caught 404 errors" in your global.asax: you can implement a method

    Application_Error()
    {
    }

    in which you can set code to handle the error (log, ...) and then redirect to your default error page.

    Hope this helps.

    Cheers,

    Michael.

  • mohammed 5 posts 25 karma points
    May 29, 2012 @ 10:58
    mohammed
    0

    Hi Michael

    Can u provide me a best way to add "app_error()" method.i have tried with adding a http module but it's not working .

  • Stefan Kip 1614 posts 4131 karma points c-trib
    May 29, 2012 @ 13:59
  • mohammed 5 posts 25 karma points
    May 29, 2012 @ 14:10
    mohammed
    0

    HI Michael finally got the answer

    Thanks for your Quick Reply......!!!!

    Cheers,

    Mohammed Charolia

  • Michael Latouche 504 posts 819 karma points MVP 4x c-trib
    May 29, 2012 @ 14:27
    Michael Latouche
    0

    Hi Mohammed,

    Great! Sorry I could not reply earlier to your previous post, I was in meeting...

    But I am glad you figured it out :-)

    Cheers,

    Michael.

Please Sign in or register to post replies

Write your reply to:

Draft