I have been developing a C # / SQL Server application on a Windows 8.1 device for some time using .NET 4.5.1 and SQL Server 2012 Express. All this worked flawlessly. Visual Studio 2015 was recently released and I decided to upgrade it. I also decided to upgrade my SQL Server 2012, so I fully supported it, uninstalled and installed SQL Server 2014 Express. After setting everything up and restoring the database backups, everything still worked locally, since the database connection data was still present in the settings of the saved applications.
When I tested the application on another device, I found that it could no longer connect to the instance of SQL Server and could not detect it either using
System.Data.DataTable instances = SqlDataSourceEnumerator.Instance.GetDataSources();
The application also could not detect an instance of SQL Server on my development machine, which, in my opinion, is rather strange, since it works locally. However, some other devices could detect SQL Server, so I donβt think it is a firewall related program. The SQL engine service and browser services were active.
I decided to switch to Windows 10, reset (clean installation, do not install any SQL Server programs) and run my application again, since there are other computers on my network with SQL Server, hoping this will detect these, This is not the case. The GetDataSources() method returns an empty DataTable for a second, while other devices take a few seconds to detect instances and return the correct list.
Even dumber is that the ODBC Data Source Administrator detects these network instances, making me think it is a .NET-related program.
Summary: two devices do not detect instances of SQL Server (even local ones), but other devices on the network.
source share