Azure SQL is it possible?
# help-with-umbraco
c
Hi, Is there a way to use Umbraco running in a Web App service in Azure to connect to Azure SQL? I know it shows it in the install panel but I have obviously failed to set-up Azure SQL correctly as all I ever get is "Could not connect to database" Any help appreciated. Cliff.
a
Do you mean a SQL server (Database) on Azure ? If so, thats definitly possible
When you navigate to your database, you can get your servername to use in your connectionstring: for example:
mywebsite-db.database.windows.net
Perhaps you have some security settings that prevent access ?
s
Yeah make sure to test from your local SQL management to connect to the same thing, I bet you need to allow your IP address to connect to the server, which can be done through sql mgmt or through the azure portal.
c
Looks like I can connect from SSMS from local and build locally and install from local that affects the Azure SQL instance. However the Web App install on Azure can't seem to reach the Azure SQL instance so I now know after a few hours of investigation is that the issue is Azure related to connection between the two and not Umbraco.
Also just incase.. you don't have any connection string overrides in the azure portal app_service configuration?
Maybe like..
Copy code
{
    "name": "umbracoDbDSN",
    "value": "Server=tcp:{DBSERVER}.database.windows.net,1433;Initial Catalog={DBNAME};Persist Security Info=False;User ID={USER};Password={XXX};MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=900;",
    "type": "SQLAzure",
    "slotSetting": false
  },
Hopefully not telling you how to suck eggs 🙂
7 Views