Copied to clipboard

Flag this post as spam?

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


  • Fredrik Esseen 608 posts 904 karma points
    Dec 12, 2022 @ 16:03
    Fredrik Esseen
    0

    Database not available when I create publish version

    Hi! Im trying to publish my website to our production server, but when I publish the site the connection string no longer works. Ive tested locally to use the same connection string to my local SQL server as I use in development but thats not working.

    And when I publish to server and change the connection string in appsettings.json thats not working either.

    Part of the error is: "Configured database is reporting as not being available. (provider: SNI_PN11, error: 25 - Connection string is not valid)"

    The connection string looks like this:

    "ConnectionStrings": { "umbracoDbDSN": "Server=\SQLEXPRESS;Database=xxx;user id=xxx;password=xxx", "umbracoDbDSN_ProviderName": "System.Data.SqlClient" }

    Im using v. 11.

  • Huw Reddick 1737 posts 6098 karma points MVP c-trib
    Dec 13, 2022 @ 04:44
    Huw Reddick
    0

    Hi,

    Try changing '\SQLEXPRESS' to '.\SQLEXPRESS'

  • Fredrik Esseen 608 posts 904 karma points
    Dec 13, 2022 @ 07:42
    Fredrik Esseen
    100

    Problem solved! It had to be 'localhost\SQLEXPRESS'... strange!

  • Huw Reddick 1737 posts 6098 karma points MVP c-trib
    Dec 13, 2022 @ 09:15
    Huw Reddick
    0

    Ah, needed the \ escaping, .\ would work too

Please Sign in or register to post replies

Write your reply to:

Draft