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

Error starting default template in Google Chrome #600


User avatar
0
fupanda created

When starting de default aspnetzero template in Google Chrome I get an error message Tenant id 2 does not exist. The Tenant id indeed does not exist. But when starting the template with Mcrosoft Edge or Internet Explorer no error will occur, because the Tenant id is 1. Why does the AbpSession give the wrong id? Error occus in the LayoutController

[ChildActionOnly]
        public PartialViewResult Header(string currentPageName = "")
        {
            var headerModel = new HeaderViewModel();
            
            if (AbpSession.UserId.HasValue)
            {
                headerModel.LoginInformations = AsyncHelper.RunSync(() => _sessionAppService.GetCurrentLoginInformations());
            }

            headerModel.Languages = LocalizationManager.GetAllLanguages();
            headerModel.CurrentLanguage = LocalizationManager.CurrentLanguage;
            
            headerModel.Menu = AsyncHelper.RunSync(() => _userNavigationManager.GetMenuAsync(FrontEndNavigationProvider.MenuName, AbpSession.UserId));
            headerModel.CurrentPageName = currentPageName;

            headerModel.IsMultiTenancyEnabled = _multiTenancyConfig.IsEnabled;

            return PartialView("~/Views/Layout/_Header.cshtml", headerModel);
        }

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

    You probably run another ABP based application in same port before. You can clear cookies and try again.

  • User Avatar
    0
    fupanda created

    Thanks that did the trick