Runs perfectly with SQLlite...but cant migrate to SQL Server
See original GitHub issueAsad,
Your project is amazing! I can run it locally from VSCode, and register a new user and then authenticate as that user, with Angular (2). This is the ONLY project I have found that does Core and A2 with authentication that I can get working, so thank you for sharing it on GitHub!
My problem: I want to use it with a SQL Server database just like the SQLite AspNetCoreSpa.db you have in the example, but the following instructions you gave do not work for me:
* To run under sql server:
* delete bin & Migrations folders
* Flip the switch in appsettings.json called `useSqLite` to `false`, this should point to use local sql server setup as default instance.
* Run `dotnet ef migrations add "MigrationName"`
…which runs OK, but when I Debug->Start Debugging from VSCode, in the Debug Console, I get a "Exception thrown: ‘System.Data.SQLClient.SqlException’ in Microsoft.EntityFrameworkCore.SqlServer.dll …and it does not run.
Is there any way I could generate the SQL Server version of the database independently, accessible from SQL Server Management Studio, that I could then connect to from your example?
Or, is there a way your project would generate a LocalDB version that I could then convert?
–Thanks, Richard
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (4 by maintainers)
@knowshape
It is difficult to say looking at the error you shown above. What is your sql server instance name? It it is set to default instance you should be able to connect using . or localhost from SSMS. And this project is using this default instance to connect to.
I was able to reproduce knowshape’s error in sql server express. The problem was probably because you didn’t create a database in advance. Using localdb, it runs without a problem.