Back to community
Help & Support

"Invalid object name AspNetRoles" on first run

Fresh install on SQL Server, the app starts but throws "Invalid object name 'AspNetRoles'". Tables don't seem to exist. How do I provision the schema?

Upvote · 5 2 replies

Replies · 2

DF
Daniel Fernandes · 13d

AutoMigrate defaults to false — you provision the DB yourself. Run database/okommerce-schema.sql against the SAME database your connection string points to. The error almost always means the app connected to a different/empty DB.

10
AZ
Ahmed Zaki · 12d

Double-check the Database name in ConnectionStrings:Default matches where you ran the script. I'd wasted an hour pointing at the wrong DB.

4

Join the conversation

Anyone can read the community. Create a free account — verified & approved — to reply.