unwanted URL encoding

Discussion in 'ASP .Net Security' started by ann, Aug 25, 2008.

  1. ann

    ann Guest

    I am writing my first .net app in vs 2008, .net 3.5 and using IIS 6. I am
    filling an iframe with an external url that I create dynamically. This is
    working fine except for the fact that my url is encoded - in specific the &
    of the querystring in my url is now &

    So basically this: http://someurl.com?query1=someval&query2=someval

    becomes this: http://someurl.com?query1=someval&query2=someval

    Is .net doing this or is it IIS? How do I disable this? If it's .net, can
    I disable at page level? I tried ValidateRequest="false" on the off chance
    it might help, but it doesn't change anything.

    Any help appreciated - thanks
     
    ann, Aug 25, 2008
    #1
    1. Advertising

  2. ann

    Niraj Ranka Guest

    Both the links are same.
    Welll url encoding can managed by encode / decode functions in request
    object.

    On Aug 26, 2:52 am, ann <> wrote:
    > I am writing my first .net app in vs 2008, .net 3.5 and using IIS 6.  Iam
    > filling an iframe with an external url that I create dynamically.  Thisis
    > working fine except for the fact that my url is encoded - in specific the&
    > of the querystring in my url is now &
    >
    > So basically this:  http://someurl.com?query1=someval&query2=someval
    >
    > becomes this:  http://someurl.com?query1=someval&query2=someval
    >
    > Is .net doing this or is it IIS?  How do I disable this?  If it's .net, can
    > I disable at page level?  I tried ValidateRequest="false" on the off chance
    > it might help, but it doesn't change anything.
    >
    > Any help appreciated - thanks
     
    Niraj Ranka, Aug 27, 2008
    #2
    1. Advertising

  3. ann

    ann Guest

    The reason they look the same is because I don't know how to get the amp
    portion to display (html encoding) in this forum.

    My question/problem is that I am not encoding but it ends up encoded. I
    don't want the url encoded - I am filling in a iframe from different url
    sources - and passing parameters - the issue is, I have no way of knowing if
    the other party/url will be able to decode the parameters/query string - so
    it has to go without being encoded.

    So my question remains - where is this happening from and how do I disable it?

    "Niraj Ranka" wrote:

    > Both the links are same.
    > Welll url encoding can managed by encode / decode functions in request
    > object.
    >
    > On Aug 26, 2:52 am, ann <> wrote:
    > > I am writing my first .net app in vs 2008, .net 3.5 and using IIS 6. I am
    > > filling an iframe with an external url that I create dynamically. This is
    > > working fine except for the fact that my url is encoded - in specific the &
    > > of the querystring in my url is now &
    > >
    > > So basically this: http://someurl.com?query1=someval&query2=someval
    > >
    > > becomes this: http://someurl.com?query1=someval&query2=someval
    > >
    > > Is .net doing this or is it IIS? How do I disable this? If it's .net, can
    > > I disable at page level? I tried ValidateRequest="false" on the off chance
    > > it might help, but it doesn't change anything.
    > >
    > > Any help appreciated - thanks

    >
    >
     
    ann, Aug 27, 2008
    #3
  4. "ann" wrote:
    > ...working fine except for the fact that my url is encoded - in specific
    > the [ampersand] of the querystring in my url is now [ampersand]amp;


    ..NET is doing this, and is quite persistent at blocking attempts to
    dynamically write URLs and stuff them into GridView cells.

    After some thrashing today, I found the <asp:HyperLinkField> is the
    ..NET-provided means for assembling URLs. It's their way or a very hard way.
     
    Tom von Alten, Dec 24, 2008
    #4
    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. Hardy Wang

    Encoding.Default and Encoding.UTF8

    Hardy Wang, Jun 8, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    19,061
    Jon Skeet [C# MVP]
    Jun 9, 2004
  2. Jon paugh
    Replies:
    1
    Views:
    954
  3. George
    Replies:
    0
    Views:
    681
    George
    Jun 14, 2008
  4. Just D.
    Replies:
    0
    Views:
    556
    Just D.
    Aug 11, 2004
  5. Replies:
    2
    Views:
    155
Loading...

Share This Page