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

Multi Tenancy Disable #163


User avatar
0
clientfocusdev created

Using the quick start guide I created a fresh database using the EF migrations. I then disabled multi tenancy,

Configuration.MultiTenancy.IsEnabled = false;

After running the app it errors out with a null reference trying to find a UserName on a null User object here,

if (!IsMultiTenancyEnabled)
{
        return LoginInformations.User.UserName;
}

in the HeaderViewModel.cs file.

Any ideas on what's going on?


3 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    Hi,

    I tested it works for me. Can you try to logout first (/Account/Logout) and then try to login again.

    Also, please debug LayoutController.Header to check what GetCurrentLoginInformations method returns. When you check SessionAppService.GetCurrentLoginInformations, you will see that it's impossible to return an output with User is null. It throws exception in this case before the view.

  • User Avatar
    0
    clientfocusdev created

    The /Account/Logout worked. That was an interesting problem. Thank you for that solution.

    Now that Multi Tenancy is disabled for LDAP, we basically fill out the AppLdapAuthenticaionSource method to get ldap working correct?

  • User Avatar
    0
    hikalkan created
    Support Team

    Hi,

    It will not be happen again. It was because of multi-tenancy disabling. No matter.

    You don't have to code. Check this topic for LDAP #168