Re: HttpRequestValidationException

Discussion in 'ASP .Net' started by avnrao, May 14, 2004.

  1. avnrao

    avnrao Guest

    you must be checking for this..
    Server.GetLastError().GetType == typeof(HTTPRequestValidationException)

    Av.

    "" <> wrote in message
    news:...
    > We are using a custom guid generator with encryption, the problem is
    > sometimes pages will blow up when accessing this value through a post or
    > get. The encryption mechanism will sometimes generate the "bad"
    > characters to create this error. We would like to continue to leave
    > validateRequest turned on. What we would really like to be able to do is
    > call the method manually to catch an error before the user see's it and
    > generate a new guid for them that will pass when encrypted. I believe the
    > method is private, thus our dilema. Is there someway to get around this?
    > Right now, we generate the value, call a custom page to see if it fails,
    > if so, then generate a new value. This is way too much work....
    >
    > Any help much appreciated,
    >
    > jim butler
     
    avnrao, May 14, 2004
    #1
    1. Advertising

  2. avnrao

    Jim Butler Guest

    yeah, and we are trapping the error, but that requires an additional post...
    in pseudo code, this is what i would like to be able to do

    currently doing
    a. create new token
    b. encrypt the token
    c. post token to a dummy page
    d. return html error, if any
    e. either continue on or start at step a

    what i would like to do
    a. create new token
    b. encrypt the token
    c. call validateRequest method without posting/getting
    d. check for error
    e. either continue on or start at step a

    notice that we aren't posting to another page to determine if the token is
    bad or good

    thanks for the reply

    jim

    "avnrao" <> wrote in message
    news:...
    > you must be checking for this..
    > Server.GetLastError().GetType == typeof(HTTPRequestValidationException)
    >
    > Av.
    >
    > "" <> wrote in

    message
    > news:...
    > > We are using a custom guid generator with encryption, the problem is
    > > sometimes pages will blow up when accessing this value through a post or
    > > get. The encryption mechanism will sometimes generate the "bad"
    > > characters to create this error. We would like to continue to leave
    > > validateRequest turned on. What we would really like to be able to do

    is
    > > call the method manually to catch an error before the user see's it and
    > > generate a new guid for them that will pass when encrypted. I believe

    the
    > > method is private, thus our dilema. Is there someway to get around

    this?
    > > Right now, we generate the value, call a custom page to see if it fails,
    > > if so, then generate a new value. This is way too much work....
    > >
    > > Any help much appreciated,
    > >
    > > jim butler

    >
    >
     
    Jim Butler, May 14, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Victor Garcia Aprea [MVP]

    Re: Howto catch HttpRequestValidationException myself

    Victor Garcia Aprea [MVP], Jul 12, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    512
    Victor Garcia Aprea [MVP]
    Jul 12, 2003
  2. Shail
    Replies:
    1
    Views:
    6,158
    Mark Kucera
    Aug 25, 2003
  3. Jim Butler

    HttpRequestValidationException

    Jim Butler, May 18, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    2,205
    anant
    Jun 4, 2004
  4. Max Metral
    Replies:
    6
    Views:
    1,136
    Max Metral
    May 25, 2004
  5. bondzhou
    Replies:
    1
    Views:
    851
    Patrice
    Jun 9, 2004
Loading...

Share This Page