sql related error

Asked

Viewed 192 times

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

  • nothing, gives the same error

  • Are you using Entity framework? managed to do the migrations?

  • yes I am using Entity, I am not using Migrations.

  • And how you created the tables in the bank?

  • by the studio Managment connects normally?

  • yes, it does not create the bank automatically after vc connect the first candle by the application? or always have to use the Migrations ?

  • 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

Show 3 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.