Webservice error with non-alphanumeric data

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • chris fellows

    #1

    Webservice error with non-alphanumeric data

    I have a C# webservice with a web method that accepts a string parameter
    that contains encrypted data. For some parameter values with
    non-alphanumeric values then the web method fails with an HTTP status 400.
    Is there a way to prevent this error from happening?

    Obviously I can write a method to encode the encrypted parameter so that it
    only contains alphanumeric data but then I have to do the reverse in the web
    service.


  • =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=

    #2
    RE: Webservice error with non-alphanumeric data

    consider using Base64 encoding - there are utility methods in System.Convert
    that will enable you to handle this.
    -- Peter
    Recursion: see Recursion
    site: http://www.eggheadcafe.com
    unBlog: http://petesbloggerama.blogspot.com
    BlogMetaFinder: http://www.blogmetafinder.com



    "chris fellows" wrote:
    I have a C# webservice with a web method that accepts a string parameter
    that contains encrypted data. For some parameter values with
    non-alphanumeric values then the web method fails with an HTTP status 400.
    Is there a way to prevent this error from happening?
    >
    Obviously I can write a method to encode the encrypted parameter so that it
    only contains alphanumeric data but then I have to do the reverse in the web
    service.
    >
    >
    >

    Comment

    Working...