2017-10-18 251 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确定你需要他们。