Giter Club home page Giter Club logo

Comments (6)

JonPSmith avatar JonPSmith commented on September 4, 2024

Hi @ndlinh-celtic,

Yep, there was a bug there - sorry about that. I have fixed it and pushed to master

from permissionaccesscontrol2.

JonPSmith avatar JonPSmith commented on September 4, 2024

Hi @ndlinh-celtic again.

Seems like the problem I fixed isn't the same as what you had! Mine was because of a cache value. What setting do you have in the "DemoSetup" part of your appsettings?

from permissionaccesscontrol2.

JonPSmith avatar JonPSmith commented on September 4, 2024

Haven't heard anything so I am closing this.

from permissionaccesscontrol2.

zpassarelli avatar zpassarelli commented on September 4, 2024

Hi @JonPSmith,
I'm trying to run this app with a permanent database configuration with SQL Server as shown below and getting the same error. It seems to me like the EnsureCreated() method in SetupDatabaseAndSeedAsync isn't successfully creating the necessary tables and not producing any exceptions.

I noticed that using Migrate() in its place will successfully create the identity tables since you have included a migration file for the identity schema, but I don't see a similar file for the roles and company schema. Do you have such a file or know how to proceed from here?

For what it's worth, the entire app works fine when using the in-memory configuration.

My DemoSetup section in appsettings.json:

"DemoSetup": {
    "DatabaseSetup": "Permanent", //This can be "InMemory" or "Permanent" (a real database) database.
    "CreateAndSeed": true, //If this is true then it will create the dbs and ensure the data is seeded
    "AuthVersion": "Everything" //The options are Off, LoginPermissions, LoginPermissionsDataKey, PermissionsOnly, PermissionsDataKey, Impersonation, RefreshClaims, Everything
  }

Thanks.

from permissionaccesscontrol2.

JonPSmith avatar JonPSmith commented on September 4, 2024

Hi @zpassarelli

I had a look at this and I can't find a problem. Don't forget that if you created a database at sometime previously then it won't try and create it again. So trying deleting any database called PermissionAccessControl2-DemoDatabase and try again.

PS. I use EnsureCreated as SQLite doesn't work well with migrations.

from permissionaccesscontrol2.

zpassarelli avatar zpassarelli commented on September 4, 2024

Hey @JonPSmith, thanks for the quick reply. That was the solution, since I had modified the connection strings to use an existing database - I didn't realize this method would create the database too. Everything is functioning now, thanks!

from permissionaccesscontrol2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.