How to keep a Winforms application installed in various PCs always connected to a database in SQL server express


I have created a Winforms application and I installed it on 6 different PCs within the same network. However, everything works fine for the most part, but sometimes all of a sudden, they stop communicating with the SQL server. The exception the application throws is ErrorSystem.Data.SqlClient.SqlException (0x80131904): A Network-related or instance-specific error occurred while establishing connection to SQL Server. The server was not found or was not accessible.

I've already made changes to the firewall settings to allow the sqlserver.exe and the sqlserverexpress.exe and the sqlserverbrowser.exe and the .exe for the application. I've also configured it to allow the port number to listen through the firewall. But all those changes I've done on the local PC that's hosting the SQL server and not on each individual PC that's got the winforms app installed. The SQL server it's not being hosted on an actual server. But I make sure the PC stays always on. I don't know what else to do. I would really appreciate any help.

asked on Stack Overflow Oct 2, 2019 by Yorelis

0 Answers

Nobody has answered this question yet.

User contributions licensed under CC BY-SA 3.0