Error - Unable to Login
See original GitHub issueI’m getting the following exception when I login. The OpenIddictAuthorizations only has the colums Id, ApplicationId, Scope, Status, and Subject. Could there have been some version changes in OpenIddict?
Activated Event Time Duration Thread
Program Output: Microsoft.EntityFrameworkCore.Database.Command:Error: Failed executing DbCommand (90ms) [Parameters=[@p0='?' (Size = 450), @p1='?' (Size = 450), @p2='?' (Size = 4000), @p3='?' (Size = 4000), @p4='?' (Size = 4000), @p5='?' (Size = 4000)], CommandType='Text', CommandTimeout='30']
SET NOCOUNT ON; INSERT INTO [OpenIddictAuthorizations] ([Id], [ApplicationId], [Scopes], [Status], [Subject], [Type]) VALUES (@p0, @p1, @p2, @p3, @p4, @p5); SELECT [Timestamp] FROM [OpenIddictAuthorizations] WHERE @@ROWCOUNT = 1 AND [Id] = @p0;
System.Data.SqlClient.SqlException (0x80131904): Invalid column name ‘Scopes’.
Invalid column name ‘Type’.
Invalid column name ‘Timestamp’.
at System.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__108_0(Task1 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()
ClientConnectionId:4563d889-c9bd-4b61-a2e2-dcec43c20bd6
Error Number:207,State:1,Class:16 63.55s
Issue Analytics
- State:
- Created 6 years ago
- Comments:19 (1 by maintainers)
Top GitHub Comments
To fix the OpenIddict database errors I changed the following in Migrations 20170913022214_Initial.cs. It fixed the issue, I can now login. Not sure if there are any other attributes (nullable or not) that I might have wrong.
I’m also getting the error Invalid column name ‘Scopes’, ‘Type’, ‘Timestamp’ on table OpenIddictAuthorizations. I uninstalled and installed Install AspNet.Security.OAth.Valivation 2.0.0-rc1-0286 (final), Changed DAL.cspfoj:
Still get error. I drop the database after each try so it rebuilds the tables.
Does this need to be changed to include the new columns?