Copied to clipboard

Flag this post as spam?

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


  • Nicholas Westby 1800 posts 5936 karma points c-trib
    5 days ago
    Nicholas Westby
    0

    Unable to Externalize Connection Strings with Umbraco Cloud

    I tried to put my connection string in an external file:

    <connectionStrings configSource="Config\connection-strings.config" />
    

    That worked on my local. However, I got an error when I deployed that to Umbraco Cloud (I'm guessing Umbraco Cloud does some transforms or something and gets confused by configSource).

    I tried to modify the Latch.Web.live.xdt.config file to restore the original connection strings on deploy:

    <connectionStrings xdt:Transform="Replace">
      <remove name="umbracoDbDSN" />
      <add name="umbracoDbDSN" connectionString="Data Source=|DataDirectory|\Umbraco.sdf;Flush Interval=1;" providerName="System.Data.SqlServerCe.4.0" />
    </connectionStrings>
    

    However, that didn't work (still got an error on the development environment on Umbraco Cloud).

    Any ideas for how I might go about this?

    FYI, the reason I'm trying to do this is a bit convoluted, but in short a coworker ran into issues using the default setup, and so needs his own connection string, which I'm attempting to accomplish by externalizing the connection strings (and then ignoring that file in Git).

Please Sign in or register to post replies

Write your reply to:

Draft