Help with base64 encoding

Discussion in 'ASP .Net' started by mm, Feb 13, 2004.

  1. mm

    mm Guest

    Hello everyone,

    I have an asp.net application executing under .net framework 1.1 that sends
    a base64 encoded string token to a remote server running weblogic
    application server. for some odd reason when the token reaches its
    destination the '+' symbols in the token are converted to spaces which are
    not valid base64 characters.

    I am using HttpWebRequest to send the data and the content type is
    application/x-www-form-urlencoded and the method is 'POST'

    I have tried to change the content type to text/plain but this does not
    work.

    Thanks in advance for your help

    best
    MM
    mm, Feb 13, 2004
    #1
    1. Advertising

  2. How does it send the string? A + symbol translates to a space when
    Url-decoding a string.

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    Big things are made up
    of lots of little things.

    "mm" <> wrote in message
    news:...
    > Hello everyone,
    >
    > I have an asp.net application executing under .net framework 1.1 that

    sends
    > a base64 encoded string token to a remote server running weblogic
    > application server. for some odd reason when the token reaches its
    > destination the '+' symbols in the token are converted to spaces which are
    > not valid base64 characters.
    >
    > I am using HttpWebRequest to send the data and the content type is
    > application/x-www-form-urlencoded and the method is 'POST'
    >
    > I have tried to change the content type to text/plain but this does not
    > work.
    >
    > Thanks in advance for your help
    >
    > best
    > MM
    >
    >
    Kevin Spencer, Feb 13, 2004
    #2
    1. Advertising

  3. mm

    Tommy Guest

    What about urlencode the base64 string before sending it.

    Server.UrlEncode("dDwtMTI3OTMzNDM4NDs7Psy+A21q+f5l5HEOayec3EEb/MkF")

    This will replace the '+' character with '%2b'.

    Tommy,

    "mm" <> wrote in message news:<>...
    > Hello everyone,
    >
    > I have an asp.net application executing under .net framework 1.1 that sends
    > a base64 encoded string token to a remote server running weblogic
    > application server. for some odd reason when the token reaches its
    > destination the '+' symbols in the token are converted to spaces which are
    > not valid base64 characters.
    >
    > I am using HttpWebRequest to send the data and the content type is
    > application/x-www-form-urlencoded and the method is 'POST'
    >
    > I have tried to change the content type to text/plain but this does not
    > work.
    >
    > Thanks in advance for your help
    >
    > best
    > MM
    Tommy, Feb 13, 2004
    #3
  4. mm

    mm Guest

    Thanks guys, your advise payed off, it works now

    Best
    MM
    "mm" <> wrote in message
    news:...
    > Hello everyone,
    >
    > I have an asp.net application executing under .net framework 1.1 that

    sends
    > a base64 encoded string token to a remote server running weblogic
    > application server. for some odd reason when the token reaches its
    > destination the '+' symbols in the token are converted to spaces which are
    > not valid base64 characters.
    >
    > I am using HttpWebRequest to send the data and the content type is
    > application/x-www-form-urlencoded and the method is 'POST'
    >
    > I have tried to change the content type to text/plain but this does not
    > work.
    >
    > Thanks in advance for your help
    >
    > best
    > MM
    >
    >
    mm, Feb 13, 2004
    #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. -intl.com

    Base64 Encoding with streams.

    -intl.com, Mar 2, 2006, in forum: Java
    Replies:
    10
    Views:
    21,823
    Greg R. Broderick
    Mar 3, 2006
  2. wenmang
    Replies:
    3
    Views:
    557
    Dennis E. Hamilton
    Sep 5, 2003
  3. Sridhar Anupindi
    Replies:
    0
    Views:
    589
    Sridhar Anupindi
    May 25, 2004
  4. Replies:
    14
    Views:
    2,763
    aruna
    Jul 9, 2007
  5. Gregg Pollack
    Replies:
    2
    Views:
    215
    Anthony DeRobertis
    Feb 23, 2006
Loading...

Share This Page