Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Elliott Brown 38 posts 208 karma points
    Aug 25, 2022 @ 10:16
    Elliott Brown
    0

    Deploying to Azure, db connection issue

    UMB10

    Hi, I'm hoping someone can help.

    I have successfully set up an Azure installation including db.

    On innitial local build, Umb gives me the chance to 'change db', which I select and then point at my Azure Sql db instance. Setup works and I'm redirected to the backoffice.

    Publishing to Azure directly from VS using the 'publish' option, everythhing is successful apart from I'm now faced with the 'install Umbraco' screen again.

    I no longer have the option the option to change the db and it appears to set to sqlLite (the default I believe). I then get an error saying my db credentials are invalid (which makes sense if it's not pointed at my Azure Sql db)

    enter image description here

    What have I missed?

    Thanks in advance for your help!

    Elliott

  • Jeavon Leopold 3055 posts 13417 karma points MVP 9x admin c-trib
    Aug 25, 2022 @ 10:32
    Jeavon Leopold
    0

    Hi Elliott,

    Most commonly with this issue it is that the Azure SQL Server isn't set to "Allow Azure services and resources to access this server" within the "Networking" settings on the portal.

    Jeavon

  • Elliott Brown 38 posts 208 karma points
    Aug 25, 2022 @ 11:28
    Elliott Brown
    0

    Thanks Jeavon,

    It is already checked. I wish that was the solution! :)

    I've added a picture to the original post. As you can see, It's decided the db is SqLite and I don't have the option to select an alternative. Could it be that it's not pointed at the connection string?! Is there there a difference between development and deployment connection string settings?

    Thanks!

  • Jeavon Leopold 3055 posts 13417 karma points MVP 9x admin c-trib
    Aug 26, 2022 @ 08:46
    Jeavon Leopold
    100

    I would use Kudu to check appsettings.json and appsettings.production.json to verify that both umbracoDbDSN & umbracoDbDSN_ProviderName are present and correct.

    The fact that the "Change Database" button is missing suggests it's finding something

  • Elliott Brown 38 posts 208 karma points
    27 days ago
    Elliott Brown
    1

    Thanks Jeavon - I don't think this question will turn out to be that useful to anyone else but you were right. It was do to with the connection - publishing to Azure from VS disregards the connection string information in favour of the publishing profile. This is great if the publishing profile is up to date! Anyway, issue solved by refreshing the publishing profile! Thanks for you help!

  • Jeavon Leopold 3055 posts 13417 karma points MVP 9x admin c-trib
    25 days ago
    Jeavon Leopold
    0

    Good to hear you solved it!

  • Kieron McIntyre 2 posts 22 karma points
    1 week ago
    Kieron McIntyre
    0

    Hi guys,

    I have a similar issue that is driving me nuts.

    • Umbraco v10 on Azure;
    • Connection string set in the app service including the provider;
    • I can extract the connection string into logging so I know it's present
    • I can query the database with a hard-coded, old skool SqlConnection/Data reader from Startup.cs, so I know the connection string is correct

    However, when I run the app I keep getting the "Install Umbraco" screen, exactly as Elliot has posted, with SQLite refernced et al.

    The only thing that is different is that the connection string is referencing to a Azure failover group and the authentication is AD integrated, so there are no credentials.

    Would this be it? Does Umbraco not support this type of authentication?

  • Jeavon Leopold 3055 posts 13417 karma points MVP 9x admin c-trib
    3 days ago
    Jeavon Leopold
    0

    The only thing that's come to mind is to check you have the umbracoDbDSN_ProviderName setting set to "Microsoft.Data.SqlClient" without this Azure will default to using "System.Data.SqlClient"

Please Sign in or register to post replies

Write your reply to:

Draft