0
Good night,
I am trying to register in my application, but is returning me the following error:
Instance-specific or network error when connecting to SQL Server. The server was not found or not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (Preview: SQL Network Interfaces, error: 50 - Local Database Runtime error occurred. Cannot create an automatic instance. See the Windows Application event log for details of the error.
in the code snippet:
var result = await UserManager.CreateAsync(user, model.Password);
My string of connection:
connectionString="Data Source=.\sqlexpress;Initial Catalog=Inventario;Persist Security Info=True;User ID=sa;Password=minhasenha
I can connect normally in my bank, by connecting test by application tb passes the test, someone knows what can be ?
Ever since I thank.
I usually use "Data Source=(localdb) Mssqllocaldb" to connect to the local database
– Aesir
nothing, gives the same error
– Desalex
Are you using Entity framework? managed to do the migrations?
– Aesir
yes I am using Entity, I am not using Migrations.
– Desalex
And how you created the tables in the bank?
– Aesir
by the studio Managment connects normally?
– mcamara
yes, it does not create the bank automatically after vc connect the first candle by the application? or always have to use the Migrations ?
– Desalex
It is not mandatory to use manual Migrations, check out the post I just answered showing how to create the database without Migrations command: https://answall.com/questions/221186/crea-banco-dados-sem-migration-no-entity-framework-core/221200#221200
– mcamara