.net core 使用cookie進行認證,在Chrome、360等瀏覽器中登錄正常。在IE瀏覽器中無法登錄,抓包發現,沒有把cookie發送給服務器。asp.net mvc中cookie在IE10上有類似問題,.net core 如何處理這個?
1 回答

RISEBY
TA貢獻1856條經驗 獲得超5個贊
登錄代碼中有沒有指定cookie的超時時間
await context.SignInAsync( CookieAuthenticationDefaults.AuthenticationScheme, claimsPrincipal, new AuthenticationProperties { IsPersistent = isPersistent, ExpiresUtc = DateTimeOffset.Now.Add(_cookieAuthOptions.ExpireTimeSpan) });
- 1 回答
- 0 關注
- 898 瀏覽
添加回答
舉報
0/150
提交
取消