0

I am trying to encrypt my app service's connection string via Azure Key Vault and this guide and I am getting the following error: The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid. I originally thought it was because of the " characters in the string so I replaced those with actual "'s. Now I'm thinking it may be because it is not a normal connection string, but a db first entity framework one as shown: connectionString="metadata="res://*/Models.{Project}.csdl|res://*/Models.{Project}.ssdl|res://*/Models.{Project}.msl";provider=System.Data.SqlClient;provider connection string="data source={datasource};initial catalog={db};persist security info=True;user id={id};password={password};MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />

(bracketed values are there just to hide the sensitive info). How do I get this to work w/ Azure Key Vault?

0

1 Answer 1

2

I figured it out. the ONLY quotes in the connection string have to be from after provider connection string= and at the end and most importantly they need to be SINGLE QUOTES i.e '.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you. This saved my ass. There was just additional problem that even though I did server restart right after adding the new version of the model connnection string secret to keyvault, it did not update right away. I had done logging of the connection string without credentials, which showed that the double quotes were still there, so I did refer to the specific secret version in the keyvault reference and it started working. My error page: > Keyword not supported: 'data source'. And fix: ;provider connection string='Data Source= to have single quote instead of " or ".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.