Hi:
My application is a WCF RestFul Service. First time a user accesses it a method ..AuthenticateUser is called where his userid and passwd are passed as parameters. The method authenticates the user and retrieved other information about the user and
forms a token which is concatenation of encrypted user information:
e.g
<pre>User.TokenString = HttpUtility.UrlEncode(Encrypt(userID), Encoding.UTF8) & "*" & HttpUtility.UrlEncode(Encrypt(userAcctID), Encoding.UTF8) & "*" & HttpUtility.UrlEncode(pt(EncryuserAcctStatus), Encoding.UTF8) & "*"
The Encrypt method uses the Base64 internally and encrypts the passed parameters. The User object is the return type of the AuthenticateUser. The WebGet method has
ResponseFormat:=WebMessageFormat.Json
When I call theAuthenticateUser method fromFiddler , I get the output in JSON format. However, for the token adds characters and replaces some characters:
E.g
if the userID should have been : IvejqSWrZLDm7VHPjVh/PhzyEwh0oYnhWPi1QYnuZkCYkJ8W3sDwXPXRJv8s4nv2
JSON output is : IvejqSWrZLDm7VHPjVh\/PhzyEwh0oYnhWPi1QYnuZkCYkJ8W3sDwXPXRJv8s4nv2
Char "/" has been changed to "\/"
Furthermore
if the userAcctID should have been : bv/5EHAXP+bb+d/fBYXCew==
JSON output is : bv\/5EHAXP+bb+d\/fBYXCew==
When I use the JSON token from the Fiddler in my request, I get error while decrypting becuase for Base64 it is no more multiple of 4 as char's have been added.
How do I get JSON not to place the specail char's in my output, hence not corrupting the token.