Base solution for your next web application
Open Closed

Not able to get AbpSession.TenantId value #10912


User avatar
0
sumitshah created
  • What is your product version-11.0.0
  • What is your product type (Angular or MVC)-angular
  • What is product framework type (.net framework or .net core)-.net core

Hi After successfully version migration whenever I am trying to login it is showing me invalid usename or password so i debugged the code and found that AbpSession.TenantId is we are getting null that's why it is not allowing us to login. I checked in old it's value is 1 so how can i set this value?


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

    Hi @sumitshah

    Does this happen on our development environment or on production ?

  • User Avatar
    0
    sumitshah created

    in development enviorment. We have migrated to new version so new abp tables are created where we need to set that tenantid

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @sumitshah

    Could you share which table (or tables) you are talking about ? A new database migration shouldn't cause such a problem.

  • User Avatar
    0
    sumitshah created

    Hey after running successfully both the project by default tenantid should 1 and tenantname should be 'Default' but it is setting tenant id null so no for every user it showing me invalid username password

  • User Avatar
    0
    musa.demir created

    Hi @sumitshah

    Can you please try to login with another tenant. Is it works?


    Also please check cookie in the client

  • User Avatar
    0
    sumitshah created

    Hi @musa.demir As i can see there is only one tenant data so could you please describe more how can i use other tenant?

  • User Avatar
    1
    marble68 created

    FWIW - if you log in as host, the TenantId is null.

    I'd just create a new tenant then login with that admin. If clean database, should be tenantid 2

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @sumitshah

    Did you figure out this problem ?

    Thanks,