Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
Hello I am getting this error with Update-Database command. What should I do after this error?
Note: I removed mu current database and run the command on "V11.3.0"
Applying migration '20220620111335_Upgraded_To_Abp_7_3_0'.
Failed executing DbCommand (6ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
ALTER TABLE [AbpUserNotifications] ADD [TargetNotifiers] nvarchar(max) NULL;
Microsoft.Data.SqlClient.SqlException (0x80131904): Column names in each table must be unique. Column name 'TargetNotifiers' in table 'AbpUserNotifications' is specified more than once.
at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action
1 wrapCloseInAction)
at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at Microsoft.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean isAsync, Int32 timeout, Boolean asyncWrite)
at Microsoft.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource1 completion, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry, String methodName) at Microsoft.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQuery(RelationalCommandParameterObject parameterObject) at Microsoft.EntityFrameworkCore.Migrations.MigrationCommand.ExecuteNonQuery(IRelationalConnection connection, IReadOnlyDictionary
2 parameterValues)
at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQuery(IEnumerable`1 migrationCommands, IRelationalConnection connection)
at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.Migrate(String targetMigration)
at Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations.UpdateDatabase(String targetMigration, String connectionString, String contextType)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.UpdateDatabaseImpl(String targetMigration, String connectionString, String contextType)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.UpdateDatabase.<>c__DisplayClass0_0.<.ctor>b__0()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
ClientConnectionId:58433607-e156-4f23-bc81-7f7f5416db4d
Error Number:2705,State:4,Class:16
Column names in each table must be unique. Column name 'TargetNotifiers' in table 'AbpUserNotifications' is specified more than once.
PM>
Hi, Thank you for the quick response. Regarding the method input changes. I can not call my custome dashboards with new version. The application is giving errors like below
It is looking a setting defination with this name "App.DashboardCustomization.Configuration.Angular.BaasDashboard" . There is not data like this in "[dbo].[AbpSettings]" table How can I create the data? Note: BaasDashboard is my custome dashboard
Best Regards
INFO 2022-10-25 14:13:28,438 [14 ] osoft.EntityFrameworkCore.Infrastructure - Entity Framework Core 6.0.4 initialized 'portalDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer:6.0.4' with options: None
ERROR 2022-10-25 14:13:28,450 [9 ] Mvc.ExceptionHandling.AbpExceptionFilter - There is no setting defined with name: App.DashboardCustomization.Configuration.Angular.BaasDashboard
Abp.AbpException: There is no setting defined with name: App.DashboardCustomization.Configuration.Angular.BaasDashboard
at Abp.Configuration.SettingDefinitionManager.GetSettingDefinition(String name)
at Abp.Configuration.SettingManager.GetSettingValueInternalAsync(String name, Nullable1 tenantId, Nullable
1 userId, Boolean fallbackToDefault)
at portal.DashboardCustomization.DashboardCustomizationAppService.GetDashboardWithAuthorizedWidgets(String application, String dashboardName) in D:\CreativeITC\zeno-v2\aspnet-core\src\portal.Application\DashboardCustomization\DashboardCustomizationAppService.cs:line 223
at portal.DashboardCustomization.DashboardCustomizationAppService.GetUserDashboard(GetDashboardInput input) in D:\CreativeITC\zeno-v2\aspnet-core\src\portal.Application\DashboardCustomization\DashboardCustomizationAppService.cs:line 32
at lambda_method2094(Closure , Object )
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.
Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
Hello I hope you are well. I am trying to upgrated my applicationm from V9.3 to latest one. I am on ASP.Net Zero "v11.2.1" I did merging by one by. I had a lot of issue but one or other way I fixed them With this version there are a lot off changes on "aspnet-core" WebAPI services are not working now. There is some part of the error. Also I can share all error file
Thanks
ortal.DashboardCustomization.Dto.DashboardOutput GetDashboardDefinition(portal.DashboardCustomization.Dto.GetDashboardInput) on controller portal.DashboardCustomization.DashboardCustomizationAppService (portal.Application).
INFO 2022-10-21 12:06:12,540 [15 ] c.Infrastructure.ControllerActionInvoker - Route matched with {area = "app", action = "GetUserDashboard", controller = "DashboardCustomization"}. Executing controller action with signature System.Threading.Tasks.Task1[portal.DashboardCustomization.Dashboard] GetUserDashboard(portal.DashboardCustomization.Dto.GetDashboardInput) on controller portal.DashboardCustomization.DashboardCustomizationAppService (portal.Application). INFO 2022-10-21 12:06:17,799 [15 ] osoft.EntityFrameworkCore.Infrastructure - Entity Framework Core 6.0.4 initialized 'portalDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer:6.0.4' with options: None ERROR 2022-10-21 12:06:17,814 [15 ] Mvc.ExceptionHandling.AbpExceptionFilter - There is no setting defined with name: App.DashboardCustomization.Configuration.Angular.DraasDashboard Abp.AbpException: There is no setting defined with name: App.DashboardCustomization.Configuration.Angular.DraasDashboard at Abp.Configuration.SettingDefinitionManager.GetSettingDefinition(String name) at Abp.Configuration.SettingManager.GetSettingValueInternalAsync(String name, Nullable
1 tenantId, Nullable1 userId, Boolean fallbackToDefault) at portal.DashboardCustomization.DashboardCustomizationAppService.GetDashboardWithAuthorizedWidgets(String application, String dashboardName) in D:\CreativeITC\zeno-v2\aspnet-core\src\portal.Application\DashboardCustomization\DashboardCustomizationAppService.cs:line 221 at portal.DashboardCustomization.DashboardCustomizationAppService.GetUserDashboard(GetDashboardInput input) in D:\CreativeITC\zeno-v2\aspnet-core\src\portal.Application\DashboardCustomization\DashboardCustomizationAppService.cs:line 32 at lambda_method2341(Closure , Object ) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask
1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state,
/******************************* After Long Search****************** ***************/ Hi, I think, found the main reason of the problem at previous version "GetSettingName" method was like below
namespace portal.DashboardCustomization { [AbpAuthorize] public class DashboardCustomizationAppService : portalAppServiceBase, IDashboardCustomizationAppService {..... public string GetSettingName(string application) { return AppSettings.DashboardCustomization.Configuration + "." + application; }
but in new version it is like this
/******************** V11.2.1**// public string GetSettingName(string application, string dashboardName) { return AppSettings.DashboardCustomization.Configuration + "." + application + "." + dashboardName; }
the problesm is there is not any record in "AbpSettings" table for new syntact . The old settings is like that "App.DashboardCustomization.Configuration.Angular"
How I will create new settings for existing tenats according new method ?
Regards