2
Hello, I have an ASP.NET MVC application that is using the ORM Entityframework to communicate with an SQL Server database!
I currently switched computers and had to install everything again, Visual Studio, and SQL Server Management. However, when starting the application you would have to create the tables using Migrations for SQL Server with the 'update-database' command.. However when performing this command, the following error appears:
A network-Related or instance-specific error occurred while establishing a Connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote Connections. (Preview: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Speaking of which the base is not found. However my connectionString points exactly to the current database, as I took this connectionString from the visual Studio connection itself by 'SQL Server Object Explorer'
Connectionstring
<connectionStrings>
<add name="BWSDatabase" connectionString="Data Source=DESKTOP-PTI280V;Integrated Security=True;Persist Security Info=False;Pooling=False;MultipleActiveResultSets=False;Encrypt=False;TrustServerCertificate=True" providerName="System.Data.SqlClient" />
</connectionStrings>
Does anyone have any idea what I should do? Thank you in advance...
Good, only with the parameter 'Database' worked, but it is good to leave with the server, because when using on an external server there will be necessary.
– Guilherme Nunes