From 4742cdd3770c2084cf69505e4c2257f5090fcfa7 Mon Sep 17 00:00:00 2001 From: "zzzwangjun@gmail.com" <510423039@qq.com> Date: Wed, 29 Oct 2025 10:33:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../host/Lion.AbpPro.HttpApi.Host/Pages/Login.cshtml.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/Pages/Login.cshtml.cs b/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/Pages/Login.cshtml.cs index 38db169c..6280a177 100644 --- a/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/Pages/Login.cshtml.cs +++ b/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/Pages/Login.cshtml.cs @@ -44,10 +44,12 @@ namespace Lion.AbpPro.Pages { ViewData["ErrorMessage"] = null; TempData["EnableTenant"] = _abpProMultiTenancyOptions.Enabled; + Response.Cookies.Delete(_abpAspNetCoreMultiTenancyOptions.TenantKey); } public async Task OnPost() { + Response.Cookies.Delete(_abpAspNetCoreMultiTenancyOptions.TenantKey); TempData["EnableTenant"] = _abpProMultiTenancyOptions.Enabled; string tenantName = Request.Form["tenantName"]; string userName = Request.Form["userName"]; @@ -85,7 +87,6 @@ namespace Lion.AbpPro.Pages // 清除现有的认证 cookies Response.Cookies.Delete(AbpProAspNetCoreConsts.DefaultCookieName); - Response.Cookies.Delete(_abpAspNetCoreMultiTenancyOptions.TenantKey); Response.Cookies.Append(AbpProAspNetCoreConsts.DefaultCookieName, result.Token, options); if (tenantId.HasValue) {