I was wondering if it is possible to connect a local database to a web application published on Azure.
Currently, I have modified my connection string by changing the instance name to the public IP provided by myip.opendns.com and adding port 1433 to the specification.
<add name="DB"
connectionString="metadata=res://*/Models.CNL.csdl|res://*/Models.CNL.ssdl|res://*/Models.CNL.msl;provider=System.Data.SqlClient;provider connection string="data source={myip},1433;initial catalog=cnl;persist security info=True;user id=sa;password=1234;multipleactiveresultsets=True;application name=EntityFramework;Connect Timeout=60;""
providerName="System.Data.EntityClient" />
It throws the error "The wait operation timed out," and if I remove the port specification, it says "Access is denied." I have the inbound rule for port 1433, as well as the option to allow remote connections in SQL. If I leave the same name as my local instance, "server\SQLEXPRESS," it throws an error stating that the instance cannot be found; and if I use the local IP address of my computer directly and handle it the same way as in the cases of using the public one, it throws the same errors.
I used this reference DOC, to connect to an Azure SQL server using
System.Data.EntityClient.data source=YourServerNameandinitial catalog=YourDatabaseName.