I has a fairly standard method that base64-encodes a string prior to sending that string over the wire to a client. When the communication was SOAP, everything worked fine but now that everything is running through the .NET version of JSON, the base64 decoding is blowing up with the error:
The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.
I noticed that .NET was adding a \" to the beginning and end of the string so I removed those and then I checked the length and noticed that it was not a multiple of 4 so I padded the beginning and end as needed with equal signs - nothing helped. I still get the same error noted above no matter what I do.
I am stuck and nobody else's answers to similar questions has helped - any ideas (and, no, I cannot get rid of .NET...)?
The string from the server is:
zkWv1UuGZX08g1s/k/Rp4edZJ/QkuQO88HxpWtpsSfZt4kdWotuqzDy7+YgrB/JUdmuU7FB7thtK1yah+bW0CL3NPP/WGeQHjL/pvpoaOVAiDODnXOvONwuMINpSTa6HvxHj5mJxDvIoEhUwzchFfxfjnDW6tGutBRCBhGHYTK4=
The string received on the client prior to me mucking around with it is:
\"zkWv1UuGZX08g1s\/k\/Rp4edZJ\/QkuQO88HxpWtpsSfZt4kdWotuqzDy7+YgrB\/JUdmuU7FB7thtK1yah+bW0CL3NPP\/WGeQHjL\/pvpoaOVAiDODnXOvONwuMINpSTa6HvxHj5mJxDvIoEhUwzchFfxfjnDW6tGutBRCBhGHYTK4=\"
\"to the beginning and end of the string; that's the way the debugger displays it. Please show us your code.\"when you send them. It looks like you're adding them in when you shouldn't.