Base solution for your next web application
Open Closed

Update fail in AbpSettings table #7319


User avatar
0
PMS created

Hi,

In HostSettingsAppService I am doing the code update the setting values to the database.

In my database there is value of my GoogleAPIKey

While I am using this code for the update value App.GeneralSetting.GoogleAPIKey await SettingManager.ChangeSettingForApplicationAsync("App.GeneralSetting.GoogleAPIKey", settings.GoogleAPIKey);

then I am getiing this error please give me solution asap.

 Abp.AbpException: There is no setting defined with name: App.GeneralSetting.GoogleAPIKey
   at Abp.Configuration.SettingDefinitionManager.GetSettingDefinition(String name) in D:\Github\aspnetboilerplate\src\Abp\Configuration\SettingDefinitionManager.cs:line 48
   at Abp.Configuration.SettingManager.InsertOrUpdateOrDeleteSettingValueAsync(String name, String value, Nullable`1 tenantId, Nullable`1 userId) in D:\Github\aspnetboilerplate\src\Abp\Configuration\SettingManager.cs:line 320
   at Abp.Configuration.SettingManager.ChangeSettingForApplicationAsync(String name, String value) in D:\Github\aspnetboilerplate\src\Abp\Configuration\SettingManager.cs:line 218
   at Abp.Threading.InternalAsyncHelper.AwaitTaskWithPostActionAndFinally(Task actualReturnValue, Func`1 postAction, Action`1 finalAction) in D:\Github\aspnetboilerplate\src\Abp\Threading\InternalAsyncHelper.cs:line 35
   at Nito.AsyncEx.Synchronous.TaskExtensions.WaitAndUnwrapException(Task task)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
--- End of stack trace from previous location where exception was thrown ---
   at Nito.AsyncEx.Synchronous.TaskExtensions.WaitAndUnwrapException(Task task)
   at Nito.AsyncEx.AsyncContext.Run(Func`1 action)

2 Answer(s)
  • User Avatar
    0
    PMS created

    any Update ?

  • User Avatar
    0
    maliming created
    Support Team

    Have you defined this setting? Reference: https://aspnetboilerplate.com/Pages/Documents/Setting-Management#defining-settings