Copied to clipboard

Flag this post as spam?

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


  • jonok 297 posts 658 karma points
    Aug 01, 2021 @ 21:20
    jonok
    0

    How to update the config appsettings json

    I have an Umbraco 9 project that I have published and deployed to a development server. I am wondering how to make updates to the appsettings config files after a site has been published?

    My appsettings.json file is using './umbraco/config/appsettings-schema.json' for the $schema, but when I make changes to the appsettings-schema.json file, they aren't reflected in the website. Do I need to publish the project each time I want to make changes to the config files?

  • Søren Gregersen 441 posts 1884 karma points MVP 2x c-trib
    Aug 01, 2021 @ 21:40
    Søren Gregersen
    0

    Hi,

    All your settings are read from appsettings.json, and may be override by a appsettings.Development.json when you are working locally, or by configruation in Azure https://docs.microsoft.com/en-us/azure/app-service/configure-common

    The schema should not be edited, that's just to help your editor (Visual Studio) add some hints to how you can edit the appsettings.json.

    HTH :)

  • jonok 297 posts 658 karma points
    Aug 02, 2021 @ 12:28
    jonok
    0

    Thanks Søren, so if I want to change the Umbraco path, then I just need to add the relevant section to the appsettings.json file? And make it match what is in the appsettings-schema.json file?

    It doesn't seem to be working for me but I'm sure I'm doing something wrong. This is my appsettings.json, I have attempted to add the section to modify the Umbraco back-end path (sorry, not sure how to paste it formatted)...

    { "$schema": "./umbraco/config/appsettings-schema.json", "Serilog": { "MinimumLevel": { "Default": "Information", "Override": { "Microsoft": "Warning", "Microsoft.Hosting.Lifetime": "Information", "System": "Warning" } } }, "ConnectionStrings": { "umbracoDbDSN": "Data Source=|DataDirectory|\Umbraco.sdf;Flush Interval=1;" }, "Umbraco": { "CMS": { "Hosting": { "Debug": false }, "Global": { "Id": "17e8e164-9abf-4b7c-a65f-cbbcff3e940f" } } }, "umbracoGlobal": { "properties": { "ReservedUrls": { "description": "CSV string of reserved URLs (must end with a comma)", "type": "string", "default": "~/config/splashes/noNodes.aspx,~/.well-known,~/custom-path," }, "ReservedPaths": { "description": "CSV string of reserved paths (must end with a comma)", "type": "string", "default": "~/app_plugins/,~/install/,~/mini-profiler-resources/,~/umbraco/,~/custom-path," }, "UmbracoPath": { "description": "Umbraco back-office path", "type": "string", "default": "~/custom-path" } } } }

  • Søren Gregersen 441 posts 1884 karma points MVP 2x c-trib
    Aug 02, 2021 @ 12:31
    Søren Gregersen
    0

    I think your "umbracoGlobal" needs to be inside the "Umbraco"-element :)

  • Søren Gregersen 441 posts 1884 karma points MVP 2x c-trib
    Aug 02, 2021 @ 12:33
  • jonok 297 posts 658 karma points
    Aug 03, 2021 @ 04:26
    jonok
    0

    Thanks Søren! I knew it was a pebkac error of some sort.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies