0

I have a live site and a local development site. Live site was working ok, but I wanted to deploy my dev site to overwrite the live site. I took a bacpac of the live database, then tried to use SSMS to move the dev database on to the live Azure server and in the process of attempting this, deleted the original database. My attempts to deploy the dev database failed, so I decided to restore the original database while I retired to work out why I had failed. I used SSMS to restore the backup of the original database. The code for the site was unchanged. However, I now get the YSOD

Umbraco cannot start. A connection string is configured but Umbraco cannot connect to the database.

My connection string is

<add name="umbracoDbDSN" connectionString="Server=tcp:myserver.database.windows.net,1433;Database=mysitesdb;User ID=me@myserver;Password=myPassword" providerName="System.Data.SqlClient" />

What's gone wrong? I've tried encasing the password in single quotes as that seemed to help once before when I had connection string problems, but it doesn't help this time. Any ideas?

EDIT: It's weird but overnight the problem has gone away. The site is now up. I didn't change anything. Bit of a mystery. Maybe there is some kind of time lag betweeen a database being created and it being accessible from the web app?

3 Answers 3

0

When you restore an Azure SQL Database it's creating a new database. It doesn't have the firewall rules in place. Check that first.

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

1 Comment

Could only find server level firewall. Got the IP addresses for the web app and added those as rules in the server firewall. Didn't help.
0

Please verify the login and password used in the connection string are correct. Use the Admin login provided when you created the Azure SQL Database logical server. Go to the Azure Portal and verify the name of the database is mysitesdb.

1 Comment

Have checked. They are correct. After all I'm using them to connect to the server in SSMS and they work fine for that.
0

Long shot but...

There was a bug in Umbraco a while ago, that if you have a password with certain symbols in it it fails to parse your password correctly... from memory I think it was a combination of / and & that failed...

Do you have any of this characters in your password? maybe rest your password to something with no symbols and try again.

1 Comment

There are no symbols in the password

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.