locked
WCF Rest Service: Passwords Contain Special Characters RRS feed

  • Question

  • I've seen a lot of solutions to the problem of sending special characters in the URL string sent to a WCF rest service, but none that relate to accepting passwords with special characters.

    I am using transport security with clientCredentialType="Windows"

    The error I get back is "401 - Unauthorized: Access is denied due to invalid credentials."

    Are there any known workarounds?

    Friday, February 14, 2014 6:58 PM

Answers

  • Hi,

    Yes, when the remote server requires authentication, we can include username and password in the input url string. But usernames and passwords should have the special characters percent-encoded:

    For examples (with username "user" and password "pass!word"), then the uri will look like as the following:

    http://user:pass%21word@example.com/service.svc

    For more information, please try to refer to the following article:
    #Special Characters in Usernames and Passwords:
    https://app.zencoder.com/docs/guides/getting-started/special-characters-in-usernames-and-passwords .

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Monday, February 17, 2014 6:50 AM