Base solution for your next web application
Open Closed

ImpersonateSignIn Failed with ABP 1.5.1 and Zero.NetCore 3.3 #2959


User avatar
0
dirtman created

I cant impersonate my tenant with my host admin in my production site. however, the impersonate in localhost is works fine. the error on the logs.txt is

System.ApplicationException: Current tenant is different than given tenant. AbpSession.TenantId: , given tenantId: 3

WebsiteRootAddress on appsettings.json:

"App": {
    "WebSiteRootAddress": "http://{TENANCY_NAME}.mylivesite.com/"
  },

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

    Hi,

    Can you try to change

    http://{TENANCY_NAME}.mylivesite.com/
    

    to

    http://{TENANCY_NAME}.mylivesite.com
    

    By the way, I think you are using ASP.NET Core with Jquery, right ?

    Thanks.

  • User Avatar
    0
    dirtman created

    if I remove the slash on the end of URL, the Impersonate's link would be broken. it's would be something like this:

    mytenant.mylivesite.comaccount/ImpersonateSignIn?tokenId=17405275-51ff-4151-99b3-87146e613ce2
    

    notice the account link is merged with com.

    also, the login doesnt work either if I went to mytenant.mylivesite.com/Account/Login and try to login with my tenant's user.

    Yes, I'm using .net Core with Jquery

  • User Avatar
    0
    dirtman created

    However,it's work if I remove the {TENANCY_NAME} in WebSiteRootAddress

    "App": {
        "WebSiteRootAddress": "http://admin.mylivesite.com/"
      },
    

    anyway, I'm using a wildcard in my live site.

    http://*.mylivesite.com
    
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Which version of ABP do you use ?

  • User Avatar
    0
    dirtman created

    I'm using ABP 1.5.1 the Impersonate works for previous version.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    We can arrange a online help meeting for monday if you are ok with it. We are available between 08:00 to 17:00 UTC+3. Please share your availability to <a href="mailto:[email protected]">[email protected]</a>.

    Thanks.