error while doing enable-Migrations in visual studio on a mvc project

Asked

Viewed 133 times

0

I’m trying to connect my project to my local bank.

Linha com a connectstring e o banco de dados[1]

and my connect string is below.

<add name="DefaultConnection" connectionString="Data Source=LAPTOP-QEGG9P00;Initial Catalog=Portal_Recarga_Virtual;Integrated Security=False;Encrypt=False;TrustServerCertificate=True;ApplicationIntent=ReadWrite;MultiSubnetFailover=False" providerName="System.Data.SqlClient" />

however when doing enable-Migrations VS returns to the error below:

"An error occurred accessing the database. This usually Means that the Connection to the database failed. Check that the Connection string is correct and that the appropriate Dbcontext constructor is being used to specify it or find it in the application’s config file. See http://go.microsoft.com/fwlink/? Linkid=386386 for information on Dbcontext and Connections. See the Inner Exception for Details of the Failure."

the detail and that the sql server service is active.

serviço sql

you can help me?

  • Put the user and your password ... that’s it.

  • Don’t create the profile below and nothing. <add name="DefaultConnection" connectionString="Data Source=LAPTOP-QEGG9P00;Initial Catalog=Portal_Recarga_Virtual;Integrated Security=False;User ID=igorss;Password=teste;;Encrypt=False;TrustServerCertificate=True;ApplicationIntent=ReadWrite;MultiSubnetFailover=False" providerName="System.Data.Sqlclient" />

No answers

Browser other questions tagged

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