<cite>aaron: </cite> What coin?
Your server may lack support for Abp.TenantId header: https://github.com/aspnetboilerplate/aspnetboilerplate/issues/3374
Sorry, translation error. I wrote it at 4 in the night. :D Thank you for the help. My problem is resolved. ;)
I can send tenant information from Abp.TenantId without sending a coin in my local tests. But when I publish it to the server, I can not find a tenant. I am using a single deployment - single database. Override the IAbpSession object (AspNetZeroAbpSession - TenantIdAccessor) but I did not get a result. <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/blob/8cc457e12a59374133ef90c2aebd6de71738ad07/src/MyCompanyName.AbpZeroTemplate.Web.Core/MultiTenancy/TenantIdAccessor.cs">https://github.com/aspnetzero/aspnet-ze ... ccessor.cs</a>
What could be the problem?
Regards.
Hi @ismcagdas
Thanks for your suggestion, but the error continues. I think the UserRole table should have the IsDeleted field. But as far as I can see from the documents, i can not access UserManagement.
Do you have another suggestion?
Regards.
Thank you for your interest. The corresponding code block is in the Entity. But the solution was not. I just get this error in the UserRole table. I think that the problem will be solved when the IsDeleted field is added. Because there is no problem adding and deleting. We only get this error in the role update.
The error message is as follows. I understand that the UserRole table should be FullAudited.
INFO 2018-04-16 21:45:44,053 [3 ] uthentication.JwtBearer.JwtBearerHandler - AuthenticationScheme: Bearer was successfully authenticated.
INFO 2018-04-16 21:45:44,069 [3 ] pNetCore.Cors.Infrastructure.CorsService - Policy execution successful.
INFO 2018-04-16 21:45:44,116 [3 ] ore.Mvc.Internal.ControllerActionInvoker - Executing action method Ruby.Authorization.Users.UserAppService.CreateOrUpdateUser (Ruby.Application) with arguments (Ruby.Authorization.Users.Dto.CreateOrUpdateUserInput) - ModelState is Valid
ERROR 2018-04-16 21:45:44,190 [10 ] Mvc.ExceptionHandling.AbpExceptionFilter - The association between entity types 'User' and 'UserRole' has been severed but the foreign key for this relationship cannot be set to null. If the dependent entity should be deleted, then setup the relationship to use cascade deletes.
System.InvalidOperationException: The association between entity types 'User' and 'UserRole' has been severed but the foreign key for this relationship cannot be set to null. If the dependent entity should be deleted, then setup the relationship to use cascade deletes.
at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.InternalEntityEntry.HandleConceptualNulls()
at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.GetEntriesToSave()
at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.<SaveChangesAsync>d__59.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.EntityFrameworkCore.DbContext.<SaveChangesAsync>d__48.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Abp.EntityFrameworkCore.AbpDbContext.<SaveChangesAsync>d__49.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Abp.Zero.EntityFrameworkCore.AbpZeroCommonDbContext3.<SaveChangesAsync>d__98.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Abp.EntityFrameworkCore.Uow.EfCoreUnitOfWork.<SaveChangesInDbContextAsync>d__20.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Abp.EntityFrameworkCore.Uow.EfCoreUnitOfWork.<SaveChangesAsync>d__12.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Abp.Authorization.Users.AbpUserStore
2.<UpdateAsync>d__36.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Identity.UserManager1.<UpdateUserAsync>d__171.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Identity.UserManager
1.<RemoveFromRoleAsync>d__106.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Abp.Authorization.Users.AbpUserManager`2.
Hello ismcagdas, I'm getting this error. I get the same error when I want to remove the role in the user update. Do you have any suggestions Solution? The system is currently running live, i can not perform table changes.
Regards.
I put the user login information to tenants token generating tokens inside. Most likely ABP is doing it myself, but I do not understand how to use it. We can read the token and access the tenant information in requests coming from the API. :| I would be glad if you could help.