Hi @Gupta, Sumit K,
Sorry to hear that it didn't work for you. Could you please try the steps mentioned below?
The error Microsoft.Data.SqlClient.SqlException (0x80131904) typically indicates a problem with establishing a connection to a SQL Server database. This can be due to various reasons, such as:
Network-related issues: The server might not be found or accessible. Ensure that the SQL Server instance name is correct and that remote connections are enabled.
Login process errors: Sometimes, the connection is established, but an error occurs during the login process. This could be related to SSL certificate issues or authentication problems.
Configuration settings: Incorrect settings in the connection string, such as timeout settings, encryption, or trusted connections, can also cause this error.
Server Configuration management->SQL Server network config->protocols for 'servername' and check named pipes is enabled.
change the Server Properties-->Security-->Server authentication from
Windows Authentication mode to
SQL Server and Windows Authentication mode.
Check these steps:
- Go to Sql Server Configuration management->SQL Server network config->protocols for 'servername' and check TCP/IP is enabled.
- Open SSMS in run, and check you are able to login to server using specfied username/password and/or using windows authentication.
- repeat step 1 for SQL native client config also.
Could you please try firewall configuration was not correctly. So maybe it could help you!
Configure the firewall to allow network traffic that is related to SQL Server and to the SQL Server Browser service.
Four exceptions must be configured in Windows Firewall to allow access to SQL Server:
A port exception for TCP Port 1433. In the New Inbound Rule Wizard dialog, use the following information to create a port exception: Select Port Select TCP and specify port 1433 Allow the connection Choose all three profiles (Domain, Private & Public) Name the rule “SQL – TCP 1433″ A port exception for UDP Port 1434. Click New Rule again and use the following information to create another port exception: Select Port Select UDP and specify port 1434 Allow the connection Choose all three profiles (Domain, Private & Public) Name the rule “SQL – UDP 1434 A program exception for sqlservr.exe. Click New Rule again and use the following information to create a program exception: Select Program Click Browse to select ‘sqlservr.exe’ at this location: [C:\Program Files\Microsoft SQL Server\MSSQL11.\MSSQL\Binn\sqlservr.exe] where is the name of your SQL instance. Allow the connection Choose all three profiles (Domain, Private & Public) Name the rule SQL – sqlservr.exe A program exception for sqlbrowser.exe Click New Rule again and use the following information to create another program exception: Select Program Click Browse to select sqlbrowser.exe at this location: [C:\Program Files\Microsoft SQL Server\90\Shared\sqlbrowser.exe]. Allow the connection Choose all three profiles (Domain, Private & Public) Name the rule SQL - sqlbrowser.exe
Source: http://blog.citrix24.com/configure-sql-express-to-accept-remote-connections/
Hope this helps. Please do let us know if you have any further queries.