Copied to clipboard

Flag this post as spam?

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


  • Giampaolo Cutroneo 29 posts 159 karma points
    Jun 13, 2023 @ 09:21
    Giampaolo Cutroneo
    0

    Appsettings reload on change

    Hi, I’m using version 11.4 of Umbraco. I added color picker to RTE, and I created a color map in the appsettings. The map can change if a user adds or removes a color in a list. Each time the list is changed, the appsettings update accordingly, but the changes are taken only if I restart the site. Is there a way to reload the appsettings without restarting the site?

    Thanks!

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Jun 17, 2023 @ 12:08
    Huw Reddick
    0

    I haven't tried this in Umbraco, but the article below shows how to do this in .Net core

    https://www.coderschmoder.com/reload-changes-in-appsetting-json-without-website-restart/

  • Giampaolo Cutroneo 29 posts 159 karma points
    Jun 27, 2023 @ 19:55
    Giampaolo Cutroneo
    0

    Hi, thank you for your suggestion, but i am unable to apply that solution into Umbraco. In the forum I found another post referring to using custom appconfig, via this code:

    .ConfigureAppConfiguration(config => { config.AddJsonFile("appsettingsOM.json", optional: true, reloadOnChange: true); })

    It works, the RTE properties in appsettingsOM.json are loaded, but Umbraco ignore the reloadOnChange parameter.

    Does anyone know why?

Please Sign in or register to post replies

Write your reply to:

Draft