Closed ShmuelCammebys closed 3 days ago
Hello @ShmuelCammebys,
Thank you for reaching out to us today! I’d be happy to assist you with your issue. To better understand what might be happening, could you please provide a code snippet or more details on your setup?
A few additional questions to help troubleshoot:
The more details you can share, the better we can pinpoint the issue and find a solution. Looking forward to hearing back from you!
could you please provide a code snippet or more details on your setup
Hello @ShmuelCammebys,
Thanks for your reply. I'm trying to gather more information from you so I can better assist. I previously requested code snippets, but I’d like to walk through the issue again.
You mentioned that you're copying a connection string from the Portal and also trying to use AzureKeyCredential
.
Let’s think through this for a minute. You mentioned you're receiving a FormatException
with the message:
"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."
This happens irrespective of whether you use a connection string or a credential, correct?
To help you further, I'd recommend checking out our documentation here if you haven't already.
Now, here's where I’d like to step in. I genuinely want to assist because your success is our success. But I need more information to move forward. How can I reproduce this issue? Have you tried building a simple application, as I suggested, using the documentation link above? Are you certain you're getting the Base-64 FormatException
with both approaches?
Please provide details on how to reproduce this issue, and let’s work together to identify the gap and resolve it.
Hello @ShmuelCammebys,
I will go ahead and close this issue for the time being. However, please don’t hesitate to reach out if you have any further questions or require additional assistance. I sincerely hope that the documentation we provided brings you closer to mitigating and ultimately resolving your issue.
Thank you once again for your continued support and for choosing to use our product. We greatly value your trust in us.
Describe the bug When passing either the exact connection string from the Azure Portal (i.e.
new CosmosClient("AccountEndpoint=...;AccountKey=...;")
) or separately passing the token and the URI (i.e.new CosmosClient("https://...", new AzureKeyCredential("<base64 string>"))
, the SDK throws the error:System.FormatException: 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.
To Reproduce Create Azure Functions template (isolated workers .NET 8.0) in Visual Studio, and add this to
Program.cs
Expected behavior
CosmosClient
created without an issue.Actual behavior Error is thrown.
Environment summary SDK Version: 3.43.1 OS Version: MacOSX (Sequoia 15.0)
Additional context Full stacktrace (app specific calls removed):