I've created a WPF app that utilizes SQL Server 2008 R2 Express as its backend. Using EF, I build my database by issuing a Objectcontext.CreateDatabase()
method. This method (on some workstations) results in a SQL Server Error 26 - Error Locating Server/Instance Specified.
My installation routine verifies the SQL Server Express dependency and installs accordingly. My SQL Server Express default instance (.\SQLEXPRESS
) is my target instance and is local to the machine running my app.
I'm able to login using SQL Server Management Studio using Windows Authentication and a server name of:
(local)\SQLEXPRESS, .\SQLEXPRESS, and CLASS8\SQLEXPRESS
All of these instance names work with SSMS, and I can issue commands inside SSMS with no issues. However, my app fails with error 26.
This setup works on my development workstation (Win 7 Pro), but fails in a VirtualBox running Win 7 Pro. I've gone through all the SQL Server settings and think I've got them configured identically.
The Windows Firewall has been disabled on my VirtualBox VM that is suffering this issue, so it shouldn't be a UDP packet being blocked...
What could be the cause of my problem?
UPDATE
Cleaning and rebuilding my project resolved this issue.