Copied to clipboard

Flag this post as spam?

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


  • Fernando Oliveira 11 posts 52 karma points
    Jun 04, 2021 @ 14:49
    Fernando Oliveira
    0

    How to not overwrite some keys on Web.Config file

    Hello

    I'm creating a project using Umbraco and configured some sections on web.config and starting working ok.

    but today I updated the NuGet umbraco package from 8.13 to 8.14

    Published the project to the website. When first accessed it migrated from one version to another. Everything working ok.

    But my project still have the version 8.13 in the visual studio webconfig file.

    If I publish it again it will try to migrate again.

    What is the best practice to keep it right ?

    After site migration, copy the web.config file back to my project ? Or update manually Umbraco.Core.ConfigurationStatus to the latest version?

  • Asad Kizzie 28 posts 158 karma points
    Jun 04, 2021 @ 15:08
    Asad Kizzie
    0

    When I upgraded my site to a newer version, I saved my database connection string and mail settings from the web.config file and put them in notepade for safe keeping. I copied over my existing web.config file with the one from the updated version and then went back in and added my connection string and other customizations. I made sure the umbracoConfigurationStatus value was blank (around Line #39).

    Then I ran my project and Umbraco took me through the upgrade process. When I went back to look at my web.config file, the UmbracoConfigurationStatus value was now equal to the latest upgraded version.

    I completed my upgrade manually with a .zip file and not through NuGet but I think the process is mostly the same.

  • Fernando Oliveira 11 posts 52 karma points
    Jun 04, 2021 @ 15:22
    Fernando Oliveira
    0

    I just added web.config to my SVN source control, commited it.

    Then I just copied the website web.config after migration and compared the differences.

    I only changed the umbraco version and the DSN transformation key.

    I may just commit the umbraco version and reverse back DSN key. then commit again.

  • Brendan Rice 538 posts 1102 karma points
    Jun 04, 2021 @ 15:21
    Brendan Rice
    0

    Fernando, this sounds weird.

    When you upgrade Umbraco using Nuget, it should overwrite the version number in the web.config for you. If this hasn't happened it means there was an issue with the upgrade.

    I think the way it works is once you run Umbraco after the Nuget upgrade it checks the web.config value against the database value and if they are out of sync it performs migrations to upgrade the database.

    How did you go about the upgrade? Did you run the website after Nuget upgrade?

  • Fernando Oliveira 11 posts 52 karma points
    Jun 04, 2021 @ 15:27
    Fernando Oliveira
    0

    I upgraded using nuGet but didn't run locally. just pushed the new version to the website folder.

    But if I would do it locally first, I think I will have a problem in the website, because the site isn't migrated yet. So it will not detect the need to migrate and will give errors if something in the sql need to be done.

    I don't know it nuget changes the configurationstatus

    I think it is only changed when you first run the website.

  • Brendan Rice 538 posts 1102 karma points
    Jun 04, 2021 @ 18:20
    Brendan Rice
    0

    It sounds like the upgrade isn't being completed properly.

    Is there any way to run locally with the connection string pointed at the remote SQL Server, then commit the files after running the website locally?

  • Fernando Oliveira 11 posts 52 karma points
    Jun 04, 2021 @ 18:34
    Fernando Oliveira
    0

    May be it didnt upgrade completely ... I'm not sure.

    I'm trying to create a deployment scenario where I would have 3 places:

    localhost : to develop back classes, compile and test locally and deploy to test server

    test server : where we would test it changes before goint to production.

    production server : where design user and IT create web contents..

    I'm planning to use converge plugin to transfer changes between test server and production.

Please Sign in or register to post replies

Write your reply to:

Draft