A potentially dangerous querystring ... [ValidateRequest]

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default A potentially dangerous querystring ... [ValidateRequest]

    All,
    When i use .net FRamework 1.1, for my web application, i get an error
    saying "A potentially dangerous querystring was detected from the
    client...."
    I have read the posts related to this and it seems this is due to some
    SECURITY FEATURE in 1.1!!!

    My code used to work in 1.0!!! now when the web server gets upgraded
    to 1.1, my app. breaks.

    So, If i introduce a validateRequest= false in Web.config, i can
    overcome this error without ANY Code change.

    BUT unfortunately, assume this scenario for me..I have 2 deployment
    servers ServerA [with framework 1.1 installed] and Server B [ for some
    reason has not upgraded to 1.1 as of now.] [which means i must
    continue to support both 1.0 and 1.1 for sometime now].

    So with this change in 1.1, does this mean that i cannot have one
    "common Web.config" which i cannot deploy in both Server A and Server
    B?
    Because the Web.config in ServerB will complain on detecting a
    validaterequest tag.

    So to wrap my problem....Is there any way to include
    "validateRequest=false" in web.config, but still allow 1.0 to compile
    correctly?

    Or the only way is to have seperate web.config for 1.0 and 1.1?


    Thanks in advance
    Ben
    Boris Guest

  2. Similar Questions and Discussions

    1. Dangerous rounding bug when placing/importingdata from Excel spreadsheet (CS2)
      We've just come out of a client meeting in which they pointed out a seemingly random spattering of data errors throughout the financial section of...
    2. Macromedia Flash Player has stopped a potentially
      I have got my Cisco curriculum, when I try to access it offline, I am receiving the above message, what should I do to disable this message ?,...
    3. Getting "A potentially Dangerous Request.Cookies Value" error
      Hello, I recently upgraded from VS.NET 2002 to VS.NET 2003. Since I did that, I receive the following error from time to time: A potentially...
    4. Potentially odd animated gif question...
      Greetings. I'm new to Fireworks... as in I just got the thing about nine hours ago *lol*. I've been tinkering with the various capabilites and...
    5. A potentially dangerous Request.QueryString value was detected
      Hi, The querystring contains a custom error message while we are trapping any duplicate record entry. The exact string is as given below: ...
  3. #2

    Default Re: A potentially dangerous querystring ... [ValidateRequest]

    > So to wrap my problem....Is there any way to include
    > "validateRequest=false" in web.config, but still allow 1.0 to compile
    > correctly?
    Ben, I've not tries this, but I believe it will work (although it may
    not have the exact effect you're after). You could tweak the
    machine.config for 1.1 to include the validateRequest=false. Therefore,
    you wouldn't have to fiddle with the Web.config.

    Of course the issue here is two-fold:

    (1) You must have access to the Web server's machine.config
    (2) You will be affecting the default validateRequest setting for ALL
    Web sites using ASP.NET 1.1 on the box

    But, for your situation, it might be of use. Hope this helps.

    --

    Scott Mitchell
    [email]mitchell@4guysfromrolla.com[/email]
    [url]http://www.4GuysFromRolla.com[/url]
    [url]http://www.ASPFAQs.com[/url]
    [url]http://www.ASPMessageboard.com[/url]

    * When you think ASP, think 4GuysFromRolla.com!
    Scott Mitchell [MVP] Guest

  4. #3

    Default Re: A potentially dangerous querystring ... [ValidateRequest]

    Alternatively, is there any way to get the server running v1.1 to go back
    to running v1.0 (I suppose, talk to your administrator) until the server
    running v1.0 can be upgraded to v1.1?

    Cheers
    Ken

    "Scott Mitchell [MVP]" <mitchell@4guysfromrolla.com> wrote in message
    news:ZlJfc.37370$XV2.11734@newssvr29.news.prodigy. com...
    : > So to wrap my problem....Is there any way to include
    : > "validateRequest=false" in web.config, but still allow 1.0 to compile
    : > correctly?
    :
    : Ben, I've not tries this, but I believe it will work (although it may
    : not have the exact effect you're after). You could tweak the
    : machine.config for 1.1 to include the validateRequest=false. Therefore,
    : you wouldn't have to fiddle with the Web.config.
    :
    : Of course the issue here is two-fold:
    :
    : (1) You must have access to the Web server's machine.config
    : (2) You will be affecting the default validateRequest setting for ALL
    : Web sites using ASP.NET 1.1 on the box
    :
    : But, for your situation, it might be of use. Hope this helps.
    :
    : --
    :
    : Scott Mitchell
    : [email]mitchell@4guysfromrolla.com[/email]
    : [url]http://www.4GuysFromRolla.com[/url]
    : [url]http://www.ASPFAQs.com[/url]
    : [url]http://www.ASPMessageboard.com[/url]
    :
    : * When you think ASP, think 4GuysFromRolla.com!


    Ken Schaefer Guest

  5. #4

    Default Re: A potentially dangerous querystring ... [ValidateRequest]

    Hi Scott, Ken,
    thanks for the replies.

    i think modifying the machine.config is not possible since it may
    affect other web app on the production box.

    In fact same reason applies to Ken also. I can change the settings in
    IIS to make it point to 1.0 again, but this will affect other Web app.

    phew...What a change from 1.0 to 1.1!!!!

    It is always good to fill in Security holes, but this i feel is a
    over-restiction. At least for 1.0 web application, there must be a
    better way to easily come thru this change...

    Any other suggestions are most welcome.

    Thanks again
    Ben


    "Ken Schaefer" <kenREMOVE@THISadOpenStatic.com> wrote in message news:<OnwY6t6IEHA.520@tk2msftngp13.phx.gbl>...
    > Alternatively, is there any way to get the server running v1.1 to go back
    > to running v1.0 (I suppose, talk to your administrator) until the server
    > running v1.0 can be upgraded to v1.1?
    >
    > Cheers
    > Ken
    >
    > "Scott Mitchell [MVP]" <mitchell@4guysfromrolla.com> wrote in message
    > news:ZlJfc.37370$XV2.11734@newssvr29.news.prodigy. com...
    > : > So to wrap my problem....Is there any way to include
    > : > "validateRequest=false" in web.config, but still allow 1.0 to compile
    > : > correctly?
    > :
    > : Ben, I've not tries this, but I believe it will work (although it may
    > : not have the exact effect you're after). You could tweak the
    > : machine.config for 1.1 to include the validateRequest=false. Therefore,
    > : you wouldn't have to fiddle with the Web.config.
    > :
    > : Of course the issue here is two-fold:
    > :
    > : (1) You must have access to the Web server's machine.config
    > : (2) You will be affecting the default validateRequest setting for ALL
    > : Web sites using ASP.NET 1.1 on the box
    > :
    > : But, for your situation, it might be of use. Hope this helps.
    > :
    > : --
    > :
    > : Scott Mitchell
    > : [email]mitchell@4guysfromrolla.com[/email]
    > : [url]http://www.4GuysFromRolla.com[/url]
    > : [url]http://www.ASPFAQs.com[/url]
    > : [url]http://www.ASPMessageboard.com[/url]
    > :
    > : * When you think ASP, think 4GuysFromRolla.com!
    Boris Guest

  6. #5

    Default Re: A potentially dangerous querystring ... [ValidateRequest]

    I believe that mappings can be set on a Web Application by Web Application
    basis.

    In IIS Manager, you will need to goto Web App Properties -> Directory -> App
    Configuration Button -> Mappings tab. Map the ASP.NET extensions (e.g.
    ..aspx) to the appropriate aspnet_isapi.dll

    So, even if you change one web app to use 1.0, the others can still use 1.1
    (I think they can - maybe the can't, but you coudl try it).

    Cheers
    Ken


    "Boris" <benboris78@yahoo.com> wrote in message
    news:c007e638.0404170455.279a6b66@posting.google.c om...
    : Hi Scott, Ken,
    : thanks for the replies.
    :
    : i think modifying the machine.config is not possible since it may
    : affect other web app on the production box.
    :
    : In fact same reason applies to Ken also. I can change the settings in
    : IIS to make it point to 1.0 again, but this will affect other Web app.
    :
    : phew...What a change from 1.0 to 1.1!!!!
    :
    : It is always good to fill in Security holes, but this i feel is a
    : over-restiction. At least for 1.0 web application, there must be a
    : better way to easily come thru this change...
    :
    : Any other suggestions are most welcome.
    :
    : Thanks again
    : Ben
    :
    :
    : "Ken Schaefer" <kenREMOVE@THISadOpenStatic.com> wrote in message
    news:<OnwY6t6IEHA.520@tk2msftngp13.phx.gbl>...
    : > Alternatively, is there any way to get the server running v1.1 to go
    back
    : > to running v1.0 (I suppose, talk to your administrator) until the server
    : > running v1.0 can be upgraded to v1.1?
    : >
    : > Cheers
    : > Ken
    : >
    : > "Scott Mitchell [MVP]" <mitchell@4guysfromrolla.com> wrote in message
    : > news:ZlJfc.37370$XV2.11734@newssvr29.news.prodigy. com...
    : > : > So to wrap my problem....Is there any way to include
    : > : > "validateRequest=false" in web.config, but still allow 1.0 to
    compile
    : > : > correctly?
    : > :
    : > : Ben, I've not tries this, but I believe it will work (although it may
    : > : not have the exact effect you're after). You could tweak the
    : > : machine.config for 1.1 to include the validateRequest=false.
    Therefore,
    : > : you wouldn't have to fiddle with the Web.config.
    : > :
    : > : Of course the issue here is two-fold:
    : > :
    : > : (1) You must have access to the Web server's machine.config
    : > : (2) You will be affecting the default validateRequest setting for ALL
    : > : Web sites using ASP.NET 1.1 on the box
    : > :
    : > : But, for your situation, it might be of use. Hope this helps.
    : > :
    : > : --
    : > :
    : > : Scott Mitchell
    : > : [email]mitchell@4guysfromrolla.com[/email]
    : > : [url]http://www.4GuysFromRolla.com[/url]
    : > : [url]http://www.ASPFAQs.com[/url]
    : > : [url]http://www.ASPMessageboard.com[/url]
    : > :
    : > : * When you think ASP, think 4GuysFromRolla.com!


    Ken Schaefer Guest

  7. #6

    Default Re: A potentially dangerous querystring ... [ValidateRequest]

    I'd recommend installing both versions of the Framework on the server and
    then using Denis Bauer's handy ASP.NET Version Switcher utility so that you
    can set framework versions on a vroot by vroot basis easily.
    [url]http://www.denisbauer.com[/url].

    You can also do this via the command line, but Denis' utility is SO much
    easier. We use it all the time to handle just these types of situations.

    Joe K.

    "Ken Schaefer" <kenREMOVE@THISadOpenStatic.com> wrote in message
    news:OT3MyjIJEHA.3596@tk2msftngp13.phx.gbl...
    > I believe that mappings can be set on a Web Application by Web Application
    > basis.
    >
    > In IIS Manager, you will need to goto Web App Properties -> Directory ->
    App
    > Configuration Button -> Mappings tab. Map the ASP.NET extensions (e.g.
    > .aspx) to the appropriate aspnet_isapi.dll
    >
    > So, even if you change one web app to use 1.0, the others can still use
    1.1
    > (I think they can - maybe the can't, but you coudl try it).
    >
    > Cheers
    > Ken
    >
    >
    > "Boris" <benboris78@yahoo.com> wrote in message
    > news:c007e638.0404170455.279a6b66@posting.google.c om...
    > : Hi Scott, Ken,
    > : thanks for the replies.
    > :
    > : i think modifying the machine.config is not possible since it may
    > : affect other web app on the production box.
    > :
    > : In fact same reason applies to Ken also. I can change the settings in
    > : IIS to make it point to 1.0 again, but this will affect other Web app.
    > :
    > : phew...What a change from 1.0 to 1.1!!!!
    > :
    > : It is always good to fill in Security holes, but this i feel is a
    > : over-restiction. At least for 1.0 web application, there must be a
    > : better way to easily come thru this change...
    > :
    > : Any other suggestions are most welcome.
    > :
    > : Thanks again
    > : Ben
    > :
    > :
    > : "Ken Schaefer" <kenREMOVE@THISadOpenStatic.com> wrote in message
    > news:<OnwY6t6IEHA.520@tk2msftngp13.phx.gbl>...
    > : > Alternatively, is there any way to get the server running v1.1 to go
    > back
    > : > to running v1.0 (I suppose, talk to your administrator) until the
    server
    > : > running v1.0 can be upgraded to v1.1?
    > : >
    > : > Cheers
    > : > Ken
    > : >
    > : > "Scott Mitchell [MVP]" <mitchell@4guysfromrolla.com> wrote in message
    > : > news:ZlJfc.37370$XV2.11734@newssvr29.news.prodigy. com...
    > : > : > So to wrap my problem....Is there any way to include
    > : > : > "validateRequest=false" in web.config, but still allow 1.0 to
    > compile
    > : > : > correctly?
    > : > :
    > : > : Ben, I've not tries this, but I believe it will work (although it
    may
    > : > : not have the exact effect you're after). You could tweak the
    > : > : machine.config for 1.1 to include the validateRequest=false.
    > Therefore,
    > : > : you wouldn't have to fiddle with the Web.config.
    > : > :
    > : > : Of course the issue here is two-fold:
    > : > :
    > : > : (1) You must have access to the Web server's machine.config
    > : > : (2) You will be affecting the default validateRequest setting for
    ALL
    > : > : Web sites using ASP.NET 1.1 on the box
    > : > :
    > : > : But, for your situation, it might be of use. Hope this helps.
    > : > :
    > : > : --
    > : > :
    > : > : Scott Mitchell
    > : > : [email]mitchell@4guysfromrolla.com[/email]
    > : > : [url]http://www.4GuysFromRolla.com[/url]
    > : > : [url]http://www.ASPFAQs.com[/url]
    > : > : [url]http://www.ASPMessageboard.com[/url]
    > : > :
    > : > : * When you think ASP, think 4GuysFromRolla.com!
    >
    >

    Joe Kaplan \(MVP - ADSI\) Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139