Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Permission denied error on host when session logout from impersonated user #11564


User avatar
0
kansoftware created

Hi,

I impersonated a user from host and when that user's session get logout and again when I login from host then I get permission denied error. I think that might be previous user permission cache is not cleared, but i am not sure is this the case. I tried to clear user permission cache on login and logout using this line of code: await _permissionCache.RemoveAsync(user.Id.ToString()); but it doesn't work.

Can you please help me out how to resolve this issue.


15 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @kansoftware

    Could you write exact steps to reproduce this problem ? By the way, do you use Angular UI ?

  • User Avatar
    0
    kansoftware created

    Hi @kansoftware

    Could you write exact steps to reproduce this problem ? By the way, do you use Angular UI ?

    Our project is in asp.net core with jquery. It's a multitenancy app.

    1. I login from host/admin
    2. Then I login to a tenant user through impersonation.
    3. Then we waited till the session log out of that user.
    4. Once the session get's log out of the impersonated user, I again login from host/admin and I get permission denied error
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    If you wait till the session expires while you are logged in as a tenant user, then the website keeps TenantId in cookies I guess. Do you go to login page after step 3 ? If so, do you see the Tenant selected on login page ?

    Thanks,

  • User Avatar
    0
    kansoftware created

    Hi,

    If you wait till the session expires while you are logged in as a tenant user, then the website keeps TenantId in cookies I guess. Do you go to login page after step 3 ? If so, do you see the Tenant selected on login page ?

    Thanks,

    Hi,

    Yes it goes to the login page after session logout occurs. Our application is tenant domain specific so it redirects to that tenant domain. For eg : https://tenancyname.domain.com

    After that we call the admin url and then login with admin. For eg : https://admin.domain.com

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Is it possible to share a test account with us via [email protected] so we can reproduce on your app to better understand the problem ?

    Thanks,

  • User Avatar
    0
    kansoftware created

    Hi,

    Is it possible to share a test account with us via [email protected] so we can reproduce on your app to better understand the problem ?

    Thanks,

    Hi,

    I have mailed the required details with subject 'Support ticket no 11564 - Permission denied error on host when session logout from impersonated user'.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @kansoftware

    Thanks, we got the email and checking the problem.

  • User Avatar
    0
    kansoftware created

    Hi @kansoftware

    Thanks, we got the email and checking the problem.

    Hi Waiting for your response.

  • User Avatar
    0
    m.aliozkaya created
    Support Team

    Hi @kansoftware,

    Sorry for the delay, we'll get back to you as soon as possible.

  • User Avatar
    0
    kansoftware created

    Hi @kansoftware,

    Sorry for the delay, we'll get back to you as soon as possible.

    Hi

    Were you able to replicate it? Waiting for your response

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @kansoftware

    We have replied to your email but probably you didn't receive the reply. We will send a reply again. We couldn't reproduce the problem.

  • User Avatar
    0
    kansoftware created

    Hi @kansoftware

    We have replied to your email but probably you didn't receive the reply. We will send a reply again. We couldn't reproduce the problem.

    Hi,

    I have added a screen recording for replicating. Please find the URL to access the recording : https://a.fyntst.com/Common/Recording.mp4

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Thanks, we have reproduced the problem but we need to see the source code in order to detect the source of the problem. We have replied via email, we can continue via email for this problem.

  • User Avatar
    0
    kansoftware created

    Hi,

    Thanks, we have reproduced the problem but we need to see the source code in order to detect the source of the problem. We have replied via email, we can continue via email for this problem.

    I have reverted back on the mail.

    Waiting for your response.

    Thanks

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @kansoftware

    We got the project and will try to reproduce the problem locally and inform you as soon as possible.