Base solution for your next web application
Open Closed

Reload Settings in Code #9852


User avatar
0
carelearning created

We use 9.3 MVC/Jquery with .net framework

We understand that data in the abpSettings table is loaded at start-up. Is there a way to programmatically reload the settings form this table? We have a use case where a setting would change and we don't want the whole site to go down so that setting can be reloaded / refreshed.

Thank you for your time and effort.

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

3 Answer(s)
  • User Avatar
    0
    zony created
    Support Team

    Hi carelearning, You can inject ISettingManager and use its ChangeSettingXXX() method to change the value. For details, please refer to this document: https://aspnetboilerplate.com/Pages/Documents/Setting-Management#changing-settings

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    carelearning created

    Hi Zony,

    Thank you very much for your reply. This will work for some use cases, but not the one we have. We have a situation where multiple settings could be added and/or updated for a certain Tenant. Is there any API or process to reload all of the settings? Thank you again.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @carelearning

    Do you change settings on the server side like this https://aspnetboilerplate.com/Pages/Documents/Setting-Management#changing-settings ? If so, setting values must be updated without restarting the entire app.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)