Saturday, May 31, 2008

Error Handling

"Invalid length for a Base-64 char" error while converting a string to byte array using Convert.FromBase64String().

Ans: The string to be passed to Convert.FromBase64String() as Parameter e.g., in "Convert.FromBase64String(parameter)". The parameter must be containing white space. Remove it and it will start working.

No comments: