I have a Windows application (Visual Studio 2013) with an .mdf database. If I am in the VS development environment, I can open the .mdf file without problems but when I run the application with F5, I get the attached error message. On the pc is also SQL Server 2016 Management Studio installed. As far as I can see from Google, the problem is that SQL Server does not permit remote access. Is this right? If yes, how do I do to allow remote access?
Thanks in advance!
Best regards
Kim Neesgaard
Denamrk
To answer your question, if you want to enable remote access for SQL Server, run the SQL Server Configuration Manager and configure & enable the desired protocol under SQL Server Network Configuration. The TCP/IP default port is 1433. Also check that the desired protocol is enabled under SQL Native Client [version #] Configuration. The firewall on both ends of a connection will need to allow the specified port.
You might try building your application and running the .exe without debugging. It might offer a clue as to the issue.
Good luck!