Error in C# with connectionString CosmosDB

  • Hi Guys,

    I have the following error:
    System.Data.dll
    Additional information: Keyword not supported: 'mongodb://mycosmosdb:brVmi46RA7azECQro3m2sirrywJAzLdmpxiq6xKr4MK9iFsJdjFpQnX5UfttiGU1lPZg62AE1zo6Amhg==@mycosmosdb.documents.azure.com:10255/database?ssl'.

    I see that my var have the full connection string: mongodb://mycosmosdb:jFpQnX5UfttiGU1lPZg62AE1zo6Amhg==@mycosmosdb.documents.azure.com:10255/database?ssl=true

    But if it passing to my SQLconnection  it  dont make it full :mongodb://mycosmosdb:jFpQnX5UfttiGU1lPZg62AE1zo6Amhg==@mycosmosdb.documents.azure.com:10255/database?ssl'.

    I have follow this guideline:
    https://docs.microsoft.com/en-us/azure/cosmos-db/connect-mongodb-account

  • I notice in your screenshot that you're missing an equals sign in the middle of your connection string. I'm assuming it's an encrypted string, and probably is not able to be decrypted correctly. Does the connection work if you don't assign the string from the app.config file? I know C# has to escape some sequences in strings sometimes, and I wonder if this could be the problem here. You can also use an @ to indicate a string literal so that the string doesn't need to be escaped. But obviously this doesn't help much if you're trying to get it through your config file.

  • stevenb 14609 - Tuesday, June 27, 2017 2:03 PM

    I notice in your screenshot that you're missing an equals sign in the middle of your connection string. I'm assuming it's an encrypted string, and probably is not able to be decrypted correctly. Does the connection work if you don't assign the string from the app.config file? I know C# has to escape some sequences in strings sometimes, and I wonder if this could be the problem here. You can also use an @ to indicate a string literal so that the string doesn't need to be escaped. But obviously this doesn't help much if you're trying to get it through your config file.

    I dont get the first thing about the equals sign... But i have try to do it without the app.config, but still the same problem.

  • What i see at this point when i past the connectionstring getting the error:

    System.Data.dll
    Additional information: Keyword not supported: 'mongodb://mycosmosdb:brVmi46RA7azECQro3m2sirrywJAzLdmpxiq6xKr4MK9iFsJdjFpQnX5UfttiGU1lPZg62AE1zo6Amhg==@mycosmosdb.documents.azure.com:10255/database?ssl'.

    When I do this without ssl=true I get the following error:

    I know that the Azure COSMOSDB always needs SSL=True

  • Hi Guys,

    Still no anwsers 🙂

    I just  had make a documentdb in azure cosmosdb but I want still try a monogodb for this project mabye you guys can help again!!!

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply