0
I’m trying to connect my project to my local bank.
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.
you can help me?
Put the user and your password ... that’s it.
– novic
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" />
– Igor Simões Santos