Activities of "jlavallet"

That certainly fixed that. Thank you. I suppose the important thing was to change the requiresNew parameters to false.

requiresNew (bool): Set true to ignore the surrounding unit of work and start a new UOW with the provided options. Default value is false. If it is false and there is a surrounding UOW, Begin method doesn't actually begin a new UOW, but silently participates to the existing UOW.

https://docs.abp.io/en/abp/4.3/Unit-Of-Work#begin-a-new-unit-of-work

Just a little bit more information…

  • ABP Framework version: v 5.3.5
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:

NOTE: SQL query omitted because Cloudflare thinks I am doing SQL injection and keeps blocking my post!

2023-01-30 13:33:20.755 -06:00 [ERR] Failed executing DbCommand (30,014ms) [Parameters=[@__ef_filter__p_0='?' (DbType = Boolean), @__id_0='?' (DbType = Guid)], CommandType='"Text"', CommandTimeout='30']
*[Omitted SQL was querying the SaasTenants table]*
2023-01-30 13:33:20.781 -06:00 [ERR] An exception occurred while iterating over the results of a query for context type 'Volo.Saas.EntityFrameworkCore.SaasDbContext'.
Microsoft.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
 ---> System.ComponentModel.Win32Exception (258): The wait operation timed out.
   at Microsoft.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__188_0(Task`1 result)
   at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable`1.AsyncEnumerator.InitializeReaderAsync(AsyncEnumerator enumerator, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()
ClientConnectionId:76fa3bd3-3eac-4581-93ee-466bddd36e60
Error Number:-2,State:0,Class:11
Microsoft.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
 ---> System.ComponentModel.Win32Exception (258): The wait operation timed out.
   at Microsoft.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__188_0(Task`1 result)
   at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable`1.AsyncEnumerator.InitializeReaderAsync(AsyncEnumerator enumerator, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()
   at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)
   at Volo.Abp.Domain.Repositories.EntityFrameworkCore.EfCoreRepository`3.FindAsync(TKey id, Boolean includeDetails, CancellationToken cancellationToken)
   at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
   at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
   at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
   at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
ClientConnectionId:76fa3bd3-3eac-4581-93ee-466bddd36e60
Error Number:-2,State:0,Class:11
2023-01-30 13:33:20.784 -06:00 [ERR] Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
Microsoft.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
 ---> System.ComponentModel.Win32Exception (258): The wait operation timed out.
   at Microsoft.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__188_0(Task`1 result)
   at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable`1.AsyncEnumerator.InitializeReaderAsync(AsyncEnumerator enumerator, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()
   at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)
   at Volo.Abp.Domain.Repositories.EntityFrameworkCore.EfCoreRepository`3.FindAsync(TKey id, Boolean includeDetails, CancellationToken cancellationToken)
   at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
   at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
   at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
   at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
   at Volo.Saas.Tenants.TenantStore.GetCacheItemAsync(Nullable`1 id, String name)
   at Volo.Saas.Tenants.TenantStore.FindAsync(Guid id)
   at BlueSpot.Data.BlueSpotTenantDatabaseMigrationHandler.MigrateAndSeedForTenantAsync(Guid tenantId, String adminEmail, String adminPassword) in D:\Century\Internal\BlueSpot\BlueSpot\src\BlueSpot.Domain\Data\BlueSpotTenantDatabaseMigrationHandler.cs:line 107
ClientConnectionId:76fa3bd3-3eac-4581-93ee-466bddd36e60
Error Number:-2,State:0,Class:11
2023-01-30 13:33:20.788 -06:00 [ERR] ---------- Exception Data ----------
HelpLink.ProdName = Microsoft SQL Server
HelpLink.ProdVer = 15.00.2095
HelpLink.EvtSrc = MSSQLServer
HelpLink.EvtID = -2
HelpLink.BaseHelpUrl = https://go.microsoft.com/fwlink
HelpLink.LinkId = 20476
  • Steps to reproduce the issue:"

I am getting the above exception when I attempt to create a tenant. From the UI perspective, the tenant is created successfully - no error messages and the new tenant appears in the list - but the tenant admin account is not created. Strangely, this works just fine on my development machine.

Given that the problem seems to be a command timeout, I have tried setting the command timeout to something like 5 minutes using the connection string:

{
 "ConnectionStrings": {
   "Default": "Server=SQL-SERVER-VM;Initial Catalog=BlueSpot;Uid=BlueSpotUser;Pwd=######;Command Timeout=300"
 },
 ...
}

That does increase the command timeout - the log error message shows a command timeout of '300' instead of '30' - but the result is the same, albeit very delayed.

2023-01-30 14:56:08.000 -06:00 [ERR] Failed executing DbCommand (300,037ms) [Parameters=[@__ef_filter__p_0='?' (DbType = Boolean), @__id_0='?' (DbType = Guid)], CommandType='"Text"', CommandTimeout='300']

During this long delay I tried to query the [SaasTenants] table. The query did not complete until the original request timed out.

That was strange. I thought maybe I needed to configure MARS. So I gave that a try:

{
  "ConnectionStrings": {
    "Default": "Server=SQL-SERVER-NDR;Initial Catalog=BlueSpot.Dev;Uid=BlueSpotUser;Pwd=#BS#bs#;Command Timeout=300;MultipleActiveResultSets=True"
  },
  ...
}

Same result. No difference. What could be happening? Why does it work when I run locally?

FYI - I do have some tenant data seeding code.

Here is my SaasDataSeedContributor:

namespace BlueSpot.Saas;

public class SaasDataSeedContributor : IDataSeedContributor, ITransientDependency
{
  private readonly ICurrentTenant _currentTenant;
  private readonly IEditionDataSeeder _editionDataSeeder;
  private readonly IOrganizationUnitDataSeeder _ouDataSeeder;
  private readonly ITenantDataSeeder _tenantDataSeeder;

  public SaasDataSeedContributor(
    IEditionDataSeeder editionDataSeeder,
    IOrganizationUnitDataSeeder ouDataSeeder,
    ITenantDataSeeder tenantDataSeeder,
    ICurrentTenant currentTenant)
  {
    _editionDataSeeder = editionDataSeeder;
    _ouDataSeeder = ouDataSeeder;
    _tenantDataSeeder = tenantDataSeeder;
    _currentTenant = currentTenant;
  }

  [UnitOfWork]
  public virtual async Task SeedAsync(DataSeedContext context)
  {
    using (_currentTenant.Change(context?.TenantId))
    {
      await _editionDataSeeder.CreateStandardEditionsAsync();
      await _ouDataSeeder.CreateOrganizationUnitsAsync();
      await _tenantDataSeeder.CreateTenantAsync();
    }
  }
}

And here is my ITenantDataSeeder implementation:

namespace BlueSpot.Saas;

public class TenantDataSeeder : ITenantDataSeeder, ITransientDependency
{
  private readonly ICurrentTenant _currentTenant;
  private readonly ILocalityDataSeeder _localityDataSeeder;
  private readonly ILogger&lt;TenantDataSeeder&gt; _logger;
  private readonly IPhotoDataSeeder _photoDataSeeder;
  private readonly IRejectionReasonDataSeeder _reasonDataSeeder;

  private readonly IRoleDataSeeder _roleDataSeeder;
  private readonly IStateDataSeeder _stateDataSeeder;
  private readonly IViolationStatusDataSeeder _statusDataSeeder;
  private readonly IUserDataSeeder _userDataSeeder;
  private readonly IViolationDataSeeder _violationDataSeeder;

  public TenantDataSeeder(
    IStateDataSeeder stateDataSeeder,
    IRejectionReasonDataSeeder reasonDataSeeder,
    IViolationStatusDataSeeder statusDataSeeder,
    IRoleDataSeeder roleDataSeeder,
    IUserDataSeeder userDataSeeder,
    IPhotoDataSeeder photoDataSeeder,
    IViolationDataSeeder violationDataSeeder,
    ILocalityDataSeeder localityDataSeeder,
    ICurrentTenant currentTenant,
    ILogger&lt;TenantDataSeeder&gt; logger)
  {
    _stateDataSeeder = stateDataSeeder;
    _reasonDataSeeder = reasonDataSeeder;
    _statusDataSeeder = statusDataSeeder;
    _roleDataSeeder = roleDataSeeder;
    _userDataSeeder = userDataSeeder;
    _photoDataSeeder = photoDataSeeder;
    _violationDataSeeder = violationDataSeeder;
    _localityDataSeeder = localityDataSeeder;
    _currentTenant = currentTenant;
    _logger = logger;
  }

  public async Task CreateTenantAsync()
  {
    try
    {
      await _stateDataSeeder.CreateStatesAsync();
      await _reasonDataSeeder.CreateRejectionReasonsAsync();
      await _statusDataSeeder.CreateViolationStatusesAsync();
      await _roleDataSeeder.CreateRolesAsync();
      await _userDataSeeder.CreateUsersAsync();
      await _photoDataSeeder.CreatePhotosAsync();
      await _violationDataSeeder.CreateViolationsAsync();
      await _localityDataSeeder.CreateLocalitiesAsync();
    }
    catch (ApplicationException e)
    {
      _logger.LogException(e, LogLevel.Warning);
    }
  }
}

As you can see, there's a lot going on when a tenant is created. But I do not understand why it is timing out. Please advise. Do you see something wrong?

  • ABP Framework version: v 5.3.5
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
Volo.Abp.Http.Client.AbpRemoteCallException: Internal Server Error
   at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase`1.ThrowExceptionForResponseAsync(HttpResponseMessage response)
   at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase`1.RequestAsync(ClientProxyRequestContext requestContext)
   at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase`1.RequestAsync[T](ClientProxyRequestContext requestContext)
   at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase`1.RequestAsync[T](String methodName, ClientProxyRequestTypeValue arguments)
   at Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ClientProxies.AbpApplicationConfigurationClientProxy.GetAsync()
   at Volo.Abp.AspNetCore.Mvc.Client.MvcCachedApplicationConfigurationClient.<GetAsync>b__14_0()
   at Volo.Abp.Caching.DistributedCache`2.GetOrAddAsync(TCacheKey key, Func`1 factory, Func`1 optionsFactory, Nullable`1 hideErrors, Boolean considerUow, CancellationToken token)
   at Volo.Abp.AspNetCore.Mvc.Client.MvcCachedApplicationConfigurationClient.GetAsync()
   at Volo.Abp.AspNetCore.Mvc.Client.RemoteLanguageProvider.GetLanguagesAsync()
   at Microsoft.AspNetCore.RequestLocalization.DefaultAbpRequestLocalizationOptionsProvider.GetLocalizationOptionsAsync()
   at Microsoft.AspNetCore.RequestLocalization.AbpRequestLocalizationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
  • Steps to reproduce the issue:"

This is occurring when I run the Web project on my development machine – it does not occur in production. I have been using multiple startup projects. I thought it might be a timing thing. However, I ran the IdentityServer project and the HttpApi.Host first and I still got this problem when I ran the Web project. Please advise. There are no exceptions in the HttpApi.Host log.

I think it was picking up my production connection string instead of my local development connection string. When I excluded the appsettings.Production.json file from the project everything worked fine.

Thanks for your help!

I am away from my workstation at the moment. I am trying to do this remotely. Where do I set the breakpoint to check the connection string? I do have an appsettings.Production.json but it should not be picking that up.

I reran the DbMigrator and the folders were re-created. Do I need to do something else?

  • ABP Framework version: v 5.3.5
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:

 D:\Century\Internal\BlueSpot\BlueSpotWorking\src\BlueSpot.DbMigrator\bin\Release\net6.0\publish master ≡  ?6 ~10 -30 ➜ .\BlueSpot.DbMigrator.exe [15:26:47 INF] Started database migrations... [15:26:47 INF] Migrating schema for host database... [15:26:51 ERR] Failed executing DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] CREATE TABLE [AbpAuditLogs] ( [Id] uniqueidentifier NOT NULL, [ApplicationName] nvarchar(96) NULL, [UserId] uniqueidentifier NULL, [UserName] nvarchar(256) NULL, [TenantId] uniqueidentifier NULL, [TenantName] nvarchar(64) NULL, [ImpersonatorUserId] uniqueidentifier NULL, [ImpersonatorUserName] nvarchar(256) NULL, [ImpersonatorTenantId] uniqueidentifier NULL, [ImpersonatorTenantName] nvarchar(64) NULL, [ExecutionTime] datetime2 NOT NULL, [ExecutionDuration] int NOT NULL, [ClientIpAddress] nvarchar(64) NULL, [ClientName] nvarchar(128) NULL, [ClientId] nvarchar(64) NULL, [CorrelationId] nvarchar(64) NULL, [BrowserInfo] nvarchar(512) NULL, [HttpMethod] nvarchar(16) NULL, [Url] nvarchar(256) NULL, [Exceptions] nvarchar(max) NULL, [Comments] nvarchar(256) NULL, [HttpStatusCode] int NULL, [ExtraProperties] nvarchar(max) NULL, [ConcurrencyStamp] nvarchar(40) NULL, CONSTRAINT [PK_AbpAuditLogs] PRIMARY KEY ([Id]) ); Unhandled exception. Microsoft.Data.SqlClient.SqlException (0x80131904): There is already an object named 'AbpAuditLogs' in the database. at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 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.InternalEndExecuteNonQuery(IAsyncResult asyncResult, Boolean isInternal, String endMethod) at Microsoft.Data.SqlClient.SqlCommand.EndExecuteNonQueryInternal(IAsyncResult asyncResult) at Microsoft.Data.SqlClient.SqlCommand.EndExecuteNonQueryAsync(IAsyncResult asyncResult) at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization) --- End of stack trace from previous location --- at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.MigrateAsync(String targetMigration, CancellationToken cancellationToken) at BlueSpot.EntityFrameworkCore.EntityFrameworkCoreBlueSpotDbSchemaMigrator.MigrateAsync() in D:\Century\Internal\BlueSpot\BlueSpotWorking\src\BlueSpot.EntityFrameworkCore\EntityFrameworkCore\EntityFrameworkCoreBlueSpotDbSchemaMigrator.cs:line 40 at BlueSpot.Data.BlueSpotDbMigrationService.MigrateDatabaseSchemaAsync(Tenant tenant) in D:\Century\Internal\BlueSpot\BlueSpotWorking\src\BlueSpot.Domain\Data\BlueSpotDbMigrationService.cs:line 103 at BlueSpot.Data.BlueSpotDbMigrationService.MigrateAsync() in D:\Century\Internal\BlueSpot\BlueSpotWorking\src\BlueSpot.Domain\Data\BlueSpotDbMigrationService.cs:line 60 at BlueSpot.DbMigrator.DbMigratorHostedService.StartAsync(CancellationToken cancellationToken) in D:\Century\Internal\BlueSpot\BlueSpotWorking\src\BlueSpot.DbMigrator\DbMigratorHostedService.cs:line 41 at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at BlueSpot.DbMigrator.Program.Main(String[] args) in D:\Century\Internal\BlueSpot\BlueSpotWorking\src\BlueSpot.DbMigrator\Program.cs:line 35 at BlueSpot.DbMigrator.Program.<Main>(String[] args) ClientConnectionId:df8ce6da-e222-4fc1-a5d7-9c800aad5d1f Error Number:2714,State:6,Class:16  15:26:55  ﮫ 45.824s   D:\Century\Internal\BlueSpot\BlueSpotWorking\src\BlueSpot.DbMigrator\bin\Release\net6.0\publish master ≡  ?6 ~10 -30 ➜

  • Steps to reproduce the issue:"

I decided start afresh with a new database and as I am still in the early phases of development I decided to reset my migrations.

  1. I first deleted my Local DB database.
  2. Then I deleted the Migrations folder and the TenantMigrations folder in my EntityFrameworkCore project.
  3. After deleting these folders, I ran the DbMigrator using Visual Studio by right clicking on the BlueSpot.DbMigrator project and selecting Debug > Start New Instance. The migration started and ran for a bit and then generated the error above.
  4. I decided to try it from the command line, so I published to a folder and then navigated into that folder to run the BlueSpot.DbMigrator.exe. I got the same error message.

My intention is to use a shared host/tenant database and my suspicions are that the tenant database initial migration is also being run. Both initial migrations have code to create the ABP tables. The first table and each migration is AbpAuditLogs. It sure looks like it's trying to do the table creation a second time without regard to the existing table.

Why is this happening, and what can I do about it?

Thank you! All is working now!

I tried both - Same result. I have even uninstalled and reinstalled the CLI and the Suite.No luck.

Showing 11 to 20 of 43 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11