After upgrade to ABP 1.4.2, the Impersonate Sing In is failed, on the login page if selected or input the indicated tenant name, it can't been remembered and after login it doesn't go to the tenant admin panel. In the Host admin panel if do the impersonate action, it will throw up below exceptions:
An unhandled exception occurred while processing the request.
ApplicationException: Current tenant is different than given tenant. AbpSession.TenantId: , given tenantId: 4
Viewtance.SRP.Authorization.Impersonation.ImpersonationManager.CheckCurrentTenant(Nullable<int> tenantId) in ImpersonationManager.cs, line 100
Stack Query Cookies Headers
ApplicationException: Current tenant is different than given tenant. AbpSession.TenantId: , given tenantId: 4
Viewtance.SRP.Authorization.Impersonation.ImpersonationManager.CheckCurrentTenant(Nullable<int> tenantId) in ImpersonationManager.cs
+
}
Viewtance.SRP.Authorization.Impersonation.ImpersonationManager+<GetImpersonatedUserAndIdentity>d__7.MoveNext() in ImpersonationManager.cs
+
CheckCurrentTenant(cacheItem.TargetTenantId);
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
System.Runtime.CompilerServices.TaskAwaiter.GetResult()
Viewtance.SRP.Web.Controllers.AccountController+<ImpersonateSignIn>d__44.MoveNext() in AccountController.cs
+
var result = await _impersonationManager.GetImpersonatedUserAndIdentity(tokenId, AuthConfigurer.AuthenticationScheme);
5 Answer(s)
-
0
Anybody encountered this issue too?
-
0
Hi,
I couldn't reporduce this problem. We will be very happ if you can you write steps to reproduce it ?
Thanks.
-
0
No special steps to reproduce,just like normally long on as the host,then choose a tenant to impersonate the user singin,in ImpersonateSignIn action of Account controller will throw the exception,it seems AbpSession.TenantId is null cuased this issue .
-
0
I found the reason, it caused by I applied a workaround fix for [https://github.com/aspnetboilerplate/aspnetboilerplate/issues/1836]).
After upgraded to v1.4.2 and also applied this workaround in Web.Core project in aspnet zero, it caused the ImpersonateSignIn failed, it confused me a lot of time.
If only upgrade to v1.4.2, doesn't invoke the Resolvers.Clear(), it works fine.
-
0
Hi,
I'm glad that it is solved. Sometimes it is hard to follow issues.