本文介绍了.NET Core + Openiddict InvalidCastException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在.net core 1.1项目上使用openiddict.到目前为止,我已经能够通过/connect/token端点登录.

I'm using openiddict on a .net core 1.1 project. So far i was able to login through /connect/token endpoint.

突然,没有对控制器进行任何更改,我得到了以下异常

Suddenly, without any changes to the controller i get the following exception

还有其他人遇到同样的问题吗?

Is there anyone else having the same issue?

推荐答案

ASOS 2.0.0-rc1-final中引入了API更改,这些更改与您使用的确切OpenIddict版本不兼容.要解决此问题,请从.nuget \ packages文件夹中删除以AspNet.Security.OpenIdConnect开头的软件包,并在完成后还原项目.

API changes have been introduced in ASOS 2.0.0-rc1-final that are incompatible with the exact OpenIddict version you're using. To fix that, remove the packages that start with AspNet.Security.OpenIdConnect from your .nuget\packages folder and restore your project when it's done.

这篇关于.NET Core + Openiddict InvalidCastException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-23 22:58