2017-10-18 253 views
0

任何人都可以詳細說明我如何禁用會話端點或我可以在哪裏設置正確的會話ID? 此錯誤發生在我使用的IdenttyServer4Microsoft.AspNetCore.Identity? 我這與我的客戶無關。我有一個安裝版本IdenityServer4 (1.5.X)和客戶端正常工作。 謝謝檢查會話端點已啓用,但會話標識丟失

回答

0

該錯誤表示您在IdSrv中進行了身份驗證,但是您的idsrv.session Cookie已丟失。當您覆蓋IdSrv主機的身份驗證Cookie時可能會發生這種情況,但保持會話Cookie不變。在你ConfigureServices尋找:

services.AddIdentityServer() 
.AddInMemoryClients(Clients.Get()) 
.AddInMemoryIdentityResources(Resources.GetIdentityResources()) 
.AddInMemoryApiResources(Resources.GetApiResources()) 
... 

services.AddAuthentication("MyCookie") 
.AddCookie("MyCookie", options => 
{ 
    options.ExpireTimeSpan = ...; 
}); 

,只是刪除services.AddAuthentication().AddCookie()如果你不absalutely確定你需要他們。