Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to override Azure Sql connection in Azure portal

I tried to override connectionstring in Azure portal with this connection :

Server=tcp:server.database.windows.net,1433;Database=mydatabase;User ID=username@server;Password=xxxxxx;Trusted_Connection=False;Encrypt=True;Connection Timeout=30;

It gives me an error Keyword not supported: 'server' and when I tried it as:

metadata=res://*/DataAccess.MyDataBase.csdl|res://*/DataAccess.MyDataBase.ssdl|res://*/DataAccess.MyDataBase.msl;provider=System.Data.SqlClient;provider connection string="data source=tcp:server.database.windows.net,1433;initial catalog=MyDataBase;persist security info=True;user id=username@server;password=xxxxxx;MultipleActiveResultSets=True;App=EntityFramework""

It gives "Keyword not supported: 'metadata'. !!

So what is the exact connectionstring should I write ??

Also I tried all of connection string types as provided in the screenshot.enter image description here

like image 889
Mohamed Farrag Avatar asked Sep 27 '22 15:09

Mohamed Farrag


1 Answers

Ok I found an answer relative to my issue, but also I figured out something

First of all the connection string should be like

metadata=res://*/DataAccess.MyDataBase.csdl|res://*/DataAccess.MyDataBase.ssdl|res://*/DataAccess.MyDataBase.msl;provider=System.Data.SqlClient;provider connection string="Server=tcp:server.database.windows.net,1433;Database=MyDataBase;User ID=username@server;Password=xxxxxx;Trusted_Connection=False;Encrypt=True;Connection Timeout=30;"

And notice the quotation should be " not " , Also as Nick said it should be Custom .

like image 53
Mohamed Farrag Avatar answered Oct 07 '22 19:10

Mohamed Farrag