问题
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
InvalidCastException: Unable to cast object of type 'AspNet.Security.OpenIdConnect.Primitives.OpenIdConnectRequest' to type 'OpenIddict.OpenIddictOptions'.
Is there anyone else having the same issue?
回答1:
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.
来源:https://stackoverflow.com/questions/46714513/net-core-openiddict-invalidcastexception