Comments (4)
Database is not in sync
2016-09-06 14:46 GMT+02:00 Mestical [email protected]:
I get the below error using the latest release :
{"message":"An error has occurred.","exceptionMessage":"The model backing the 'ClientConfigurationDbContext'
context has changed since the database was created. Consider using Code First Migrations to update the
database (http://go.microsoft.com/fwlink/?LinkId=238269).","exceptionType":"System.InvalidOperationException"
,"stackTrace":" at System.Data.Entity.CreateDatabaseIfNotExists1.InitializeDatabase(TContext context )\r\n at System.Data.Entity.Internal.InternalContext.<>c__DisplayClassf
1.<CreateInitializationActionb__e()\r\n at System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action
)\r\n at System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization()\r\n at System
.Data.Entity.Internal.LazyInternalContext.b__4(InternalContext c)\r\n at System
.Data.Entity.Internal.RetryAction1.PerformAction(TInput input)\r\n at System.Data.Entity.Internal .LazyInternalContext.InitializeDatabaseAction(Action
1 action)\r\n at System.Data.Entity.Internal.LazyInternalContext
.InitializeDatabase()\r\n at System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType
(Type entityType)\r\n at System.Data.Entity.Internal.Linq.InternalSet1.Initialize()\r\n at System .Data.Entity.Internal.Linq.InternalSet
1.get_InternalContext()\r\n at System.Data.Entity.Internal.Linq
.InternalSet1.get_Local()\r\n at System.Data.Entity.DbSet
1.get_Local()\r\n at IdentityServer3.EntityFramework
.DbModelBuilderExtensions.RegisterClientChildTablesForDelete[TClient](DbContext ctx) in c:\git\identity
\server3\EntityFramework\Source\Core.EntityFramework\Extensions\DbModelBuilderExtensions.cs:line
31\r\n at IdentityServer3.EntityFramework.ClientConfigurationDbContext.ConfigureChildCollections(
) in c:\git\identity\server3\EntityFramework\Source\Core.EntityFramework\DbContexts\ClientConfigurationDbContext
.cs:line 40\r\n at IdentityServer3.Admin.EntityFramework.IdentityAdminCoreManager4.QueryClientsAsync (String filter, Int32 start, Int32 count) in c:\\git\\identity\\server3admin\\EntityFramework\\source \\IdentityServer3.Admin.EntityFramework\\IdentityAdminCoreManager.cs:line 616\r\n at IdentityAdmin .Api.Controllers.ClientController.<GetClientsAsync>d__4.MoveNext() in c:\\git\\identity\\server3admin \\Admin\\source\\Core\\Api\\Controllers\\ClientController.cs:line 83\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (Task task)\r\n at System.Threading.Tasks.System.Web.Http866082.TaskHelpersExtensions.<CastToObject d__3
1.MoveNext() in c:\git\identity\server3admin\Admin\source\Core\Extensions\PropertyMetadataExtensions
.cs:line 0\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System
.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices
.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers
.ApiControllerActionInvoker.d__0.MoveNext() in c:\git\identity\server3admin
\Admin\source\Core\Extensions\PropertyMetadataExtensions.cs:line 0\r\n--- End of stack trace from
previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter
.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification
(Task task)\r\n at System.Web.Http.Filters.ActionFilterAttribute.d__5.MoveNext
() in c:\git\identity\server3admin\Admin\source\Core\Extensions\PropertyMetadataExtensions.cs
:line 0\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System
.Web.Http.Filters.ActionFilterAttribute.d__5.MoveNext() in c:\git\identity
\server3admin\Admin\source\Core\Extensions\PropertyMetadataExtensions.cs:line 0\r\n--- End of stack
trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices
.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification
(Task task)\r\n at System.Web.Http.Filters.ActionFilterAttribute.d__0
.MoveNext() in c:\git\identity\server3admin\Admin\source\Core\Extensions\PropertyMetadataExtensions
.cs:line 0\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System
.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices
.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers
.ActionFilterResult.d__2.MoveNext() in c:\git\identity\server3admin\Admin\source
\Core\Extensions\PropertyMetadataExtensions.cs:line 0\r\n--- End of stack trace from previous location
where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess
(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification
(Task task)\r\n at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore
d__2.MoveNext() in c:\git\identity\server3admin\Admin\source\Core\Extensions\PropertyMetadataExtensions
.cs:line 0\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System
.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices
.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers
.AuthenticationFilterResult.d__0.MoveNext() in c:\git\identity\server3admin\Admin
\source\Core\Extensions\PropertyMetadataExtensions.cs:line 0\r\n--- End of stack trace from previous
location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess
(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification
(Task task)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.d__1.MoveNext() in
c:\git\identity\server3admin\Admin\source\Core\Extensions\PropertyMetadataExtensions.cs:line
0"}i am running it against IdentityServer3 5.2.3
Thanks—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#26,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACy2xlEqPFpJ5Q_-GR7LmzsJFO7wDw2zks5qnWCtgaJpZM4J1zBN
.
from identityserver3.admin.entityframework.
@iBoonz at what end?
I can not see any migration script for IdentityServer3 5.2.3 which makes me to think the schema are still intact except if @brockallen is yet to update the sample repo with it.
Little guidance will do though!
Thanks
from identityserver3.admin.entityframework.
you could use entity framework to find out what has changed and generate scripts.
Add-Migration TestMigration
Update-Database -script
from identityserver3.admin.entityframework.
Okay to get rid of this issue, since a have my main project working fine and to get the admin project working I created a new IdentityCoreAdminManager
class and changed all new ClientConfigurationDbContext
to :
public class NewContext : ClientConfigurationDbContext
{
public NewContext(string con, string schema)
: base(con, schema)
{
}
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
Database.SetInitializer<NewContext>(null);
base.OnModelCreating(modelBuilder);
}
}
And it works now and I dont know if it is the best way but I have moved on from the issue!!
from identityserver3.admin.entityframework.
Related Issues (20)
- Duplicate type with name 'System.Web.Http.Properties.System.Web.Http.CommonWebApiResources' in assembly 'IdentityServer3.Admin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. HOT 2
- New client save Client name as Client ID and vice versa HOT 1
- RefreshTokenStore does not save updated JsonCode HOT 2
- UI shows up, but nothing seems to work. HOT 1
- Problem with admin log in from remote machine HOT 2
- Customizing Clients HOT 1
- Create DB objects in a specific schema HOT 3
- IdentityServer3.Admin.EntityFramework vs IdentityServer3.Admin HOT 1
- Securing Admin App HOT 1
- Bug in QueryScopesAsync()? HOT 3
- ConnectionString from Web.Config HOT 1
- Could not load type 'AutoMapper.IMapperConfiguration' from assembly AutoMapper, Version=5.1.1.0 HOT 1
- Resolve custom dependencies HOT 5
- Oracle support
- Host Project Visual Studio 2017 Project file cannot be loaded HOT 1
- Custom Default Values for new Clients and Scopes
- Ability to manage all scope claim properties HOT 2
- Delete client is not working HOT 2
- The type 'IIdentityAdminService' is defined in an assembly that is not referenced. You must add a reference to assembly 'IdentityAdmin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from identityserver3.admin.entityframework.