I am having an issue with the Azure connectionstring, i kept on having the error : "Login failed for user 'myuser'." after adding the connectionstring to the configuration of the app service and trying to call the REST API
I tried to login via SSMS with the same credentials and it is working and if i use the same connection string in web.config it is working as well.
my theory is maybe because i have the "ampersand" in the password and it is not escape .. i also tried to connect to a different database instance within the same resource group which the pwd does not have the "&" and was able to connect
Does anyone seen this issue before and how to resolve it ?
Azure connectionString does not work :
metadata=res:///Model.EFData.csdl|res:///Model.EFData.ssdl|res://*/Model.EFData.msl;provider=System.Data.SqlClient;provider connection string="data source=tcp:xxx.database.windows.net,1433;initial catalog=xxx;user id=myuser;password=Mypassword&123;Persist Security Info=True;TrustServerCertificate=True;multipleactiveresultsets=True;application name=EntityFramework"
Web.config connectionString when deploy to azure (note the password is escape with amp;)
metadata=res://*/;provider=System.Data.SqlClient;provider connection string="data source=tcp:xxx.database.windows.net,1433;initial catalog=xxx;user id=myuser;password=Mypassword&123;Persist Security Info=True;TrustServerCertificate=True;multipleactiveresultsets=True;application name=EntityFramework"
&, the HTML entity.web.configis parsed as XML so this should get converted to&when passed to Azure SQL. -- w3schools.com/html/html_entities.asp - evilSnobu