简体   繁体   English

“无效的对象名称'OpenIddictAuthorizations'。”-OpenIddict / .Net核心标识错误

[英]“Invalid object name 'OpenIddictAuthorizations'.” - OpenIddict/.Net Core Identity Error

I am new to .Net Core 2.0 and Identity framework. 我是.Net Core 2.0和Identity框架的新手。 I am trying to use OpenIddict in the project. 我正在尝试在项目中使用OpenIddict。 References: OpenIddict (2.0.0-rc1-final) OpenIddict.EntityFrameworkCore(2.0.0-rc1-final) Microsoft.AspNetCore.Identity.EntityFrameworkCore (2.0.1) I keep on getting the following runtime error: Invalid object name 'OpenIddictAuthorizations'. 参考:OpenIddict(2.0.0-rc1-final)OpenIddict.EntityFrameworkCore(2.0.0-rc1-final)Microsoft.AspNetCore.Identity.EntityFrameworkCore(2.0.1)我不断遇到以下运行时错误: 无效的对象名称'OpenIddictAuthorizations ”。

Here is the stack trace: 这是堆栈跟踪:

at System.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__108_0(Task`1 result)
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)

--- End of stack trace from previous location where exception was thrown --- ---从之前引发异常的位置开始的堆栈结束跟踪---

at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.<ExecuteAsync>d__17.MoveNext()

--- End of stack trace from previous location where exception was thrown --- ---从之前引发异常的位置开始的堆栈结束跟踪---

at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.<ExecuteAsync>d__32.MoveNext()

It looks like a SQL exception but I am not sure why it is looking for an object called OpenIddictAuthorizations in the database. 它看起来像一个SQL异常,但是我不确定为什么要在数据库中寻找一个名为OpenIddictAuthorizations的对象。 Any help is highly appreciated. 非常感谢您的帮助。

Because you need this Table in your Db beside other tables 因为您需要在Db中其他表旁边的表

dbo.OpenIddictApplications
dbo.OpenIddictAuthorizations
dbo.OpenIddictScopes
dbo.OpenIddictTokens

So, OpenId can store the tokens and verify them. 因此,OpenId可以存储令牌并进行验证。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM