Thursday, February 21, 2019

SharePoint Provider hosted app: Invalid length for a Base-64 char array exception

This error means the string which we are trying to convert to base 64 encoding does not have enough length. More explanation is available at https://stackoverflow.com/questions/12962992/invalid-length-for-a-base-64-char-array-exception.

To  fix this error, append '=' character to the string till it becomes divisible by four.

In a SharePoint provider hosted app, this generally means the client secret (or secondary client secret) needs to be appended as above.

No comments:

c# httpclient The remote certificate is invalid according to the validation procedure: RemoteCertificateNameMismatch

 If we get this error while trying to get http reponse using HttpClient object, it could mean that certificate validation fails for the remo...