0

This is Arun from Chennai. I have developed my first application in WPF (C#) with VS 2008 & SQL Server 2008. It works fine on my system. After deployment, it won't work on other systems.

It shows the following error message.

system.data.sqlclient.sqlexception - a network related or instance specific error occurred while establishing a connection to sql server. the server was not found or was not accessible. verify instance name is correct and sql server is configured to allow remote connections.(provider: sql network interfaces, error: 26 - error locating server/instance specified).

I have gone through google and done the following steps but no use.

  • Server Name : ECARE432\SQLEXPRESS
  • Instance Name : SQLEXPRESS

app.config has:

<connectionStrings>
   <add name="TimeTracker.Properties.Settings.myecareConnectionString"
        connectionString="Data Source=ECARE432\SQLEXPRESS;Initial Catalog=myecare;Persist Security Info=True;User ID=sa;Password=ecare123@" 
        providerName="System.Data.SqlClient"/>
</connectionStrings>
  1. Visual Studio --> Tools --> Options --> Database Tools --> Data Connections --> Changed "SQL Server Instance Name" from sqlexpress to blank.

  2. Configuration Tools -> SQL Server Configuration Manager -> SQL Native Client Configuration Aliases -> Alias Name -> ECARE432\SQLEXPRESS,1433, Port Number -> 1433, Protocol -> TCP/IP, Server Name -> ECARE432\SQLEXPRESS

  3. SQL Server Browser is running in my system.

  4. Server Name is correct. No typo mismatch.

  5. Client machine is able to ping my machine.

  6. TCP 1433 and UDP 1434 Exception added to Firewall. Also Turned off the Firewall in both my system and the client system.

Please guide me how to fix this issue.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Arun
  • 728
  • 4
  • 16
  • 30
  • Thank you Marc, its working now. But now I have received the following error - provider named pipes provider error 40 - could not open a connection to sql server 2008. Please help me out what I missed out. – Arun May 04 '13 at 10:12
  • Can you log in with something like Management Studio? If so: **what** server name are you specifying? – marc_s May 04 '13 at 10:18
  • Yes, I m using SQL Server Management Studio and the server name is ECARE432\SQLEXPRESS – Arun May 04 '13 at 10:20
  • I have given my problem in detail as a separate question. Please refer the below link - http://stackoverflow.com/questions/16373181/provider-named-pipes-provider-error-40-could-not-open-a-connection-to-sql-serv. Request your guidance. – Arun May 04 '13 at 10:21

0 Answers0