【发布时间】:2020-03-14 20:57:14
【问题描述】:
我想用IdentityServer4 创建令牌,但是当我添加这一行时:
services
.AddIdentityServer()
.AddDeveloperSigningCredential() <------ EXCEPTION
.AddInMemoryApiResources(Config.GetApiResources())
.AddInMemoryClients(Config.GetClients());
在我的项目中我有这个例外
System.MissingMethodException:'找不到方法:'System.String IdentityModel.CryptoRandom.CreateUniqueId(Int32)'。'
我在我的项目中添加了 .AddDeveloperSigningCredential() 行,因为之前当我运行我的 api 来查看我的令牌时,我遇到了这个错误:
“密钥集丢失”
当我想运行我的 api 时。
我关注this 来创建我的项目。
【问题讨论】:
-
你更新了 IdentityServer 的包吗?
标签: c# token asp.net-core-webapi identityserver4