I'm working from a code base I downloaded from a repository, and it is likely that I'm missing a system or local setting.
In Web.Config, I have this connection string:
<add name="Context"
connectionString="Data Source=InstanceName;
Initial Catalog=MyProduct;
Integrated Security=True;
Connect Timeout=15;
Encrypt=False;
TrustServerCertificate=False"
providerName="System.Data.SqlClient" />
(indentation mine)
Normally I would have expected the Data Source
to be \\ComputerName\InstanceName
or at least .\InstanceName
if the SQL Server is on the same host. But here, nothing. The initially uploaded project had a local database, on the developer's machine. I can get the connection to work if I add .\
, but I don't understand how only specifying the instance name can work. So, how can it?