After 2 Days of search i still didnt find an answer.
Situation:
Server:
SQL Server 2008 Express installed on RemoteServer
TCP/IP: Enabled on port 1433
Named Pipes: Enabled
Database: ConDB.mdf (attached to server)
Workstation:
Microsoft Management Studio: Connection to database works
Servertype: Databasemodul
Servername: MTTC5020\SQLEXPRESS,1433
Authentifcation: SQL
Server-Authentification
Username:
testuser
Password: 1234
Visual Studio 2010 Express:
Error on Database Explorer: SQL
Network Interfaces, error: 26 – Error
Locating Server/Instance
Specified
Same Error Through Connection via Appconfig and connectionstring:
<connectionStrings>
<add name="ContainerDB.My.MySettings.ConDBConnectionString" connectionString="Data Source=MTTC5020\SQLEXPRESS,1433;Initial Catalog=ConDB.mdf;User ID=testuser;Password=1234;Integrated Security=false"
providerName="System.Data.SqlClient.SqlConnection" />
</connectionStrings>
I also tried many other connectionstrings (Via IP / AttachedDBFileName / etc.)
I also tried everything here: MSDN
portcheck through SQLCMD -U testuser -P 1234 -S MTTC5020\SQLEXPRESS,1433 works aswell
Any suggestions?
I now found the issue.
The connectionstring for the dbml is not only stored in the .config file.
checkout the workaround for this at:
LINQ to SQL Connection Strings