Fix: System.Data.SqlClient.SqlException (0x80131904)

Discover expert solutions that worked for others

Reading time icon 3 min. read

Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team Read more

Key notes

  • The 0x80131904 prevents users from signing in and has been a major concern for administrators.
  • It generally appears when incorrect credentials are provided, or the firewall is blocking the connection.
  • To fix things, check for network issues, verify firewall rules, or change the DNS entries, amongst other solutions.
fix 0x80131904 SQL error

Administrators creating applications using a SQL connection don’t usually face many issues if the backend is tight. But often, due to misconfigurations or network issues, users come across the 0x80131904 error.

The message reads, A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 – The specified network name is no longer available.). It’s not something regular users can fix, and administrators, too, have a tough time dealing with it. Let’s find out more!

What is component error code 0x80131904?

The error usually has to do with a network-related issue, but if the problem persists, it could be settings to blame. More so, for some administrators, only a handful of users encountered the 0x80131904 error, while others could easily access things.

Here are a few reasons you are encountering the error:

  • Incorrect credentials: When a user enters incorrect credentials, the error message may appear. So you will have to verify that.
  • Firewall blocking the connection: In some cases, a firewall was blocking the connection, and it could be both, the one on the server’s side as well as the user’s end. For the latter, you can easily disable the firewall.
  • Network issues: Some administrators found that it was a network issue triggering the error, and things automatically resolved in a short while.
  • Misconfigured SQL settings: For a few, the server properties were misconfigured, or the security settings were not optimal, which led to the error.

How do I fix error 0x80131904?

Before we move to the slightly complex solutions, check these aspects first:

  • Verify that the user is not entering incorrect credentials to access the application.
  • Check for network issues and talk to the service provider for an update on it.
  • Make sure the firewall is not blocking the connection. You can disable it temporarily to verify the same.

If none work, head to the fixes listed next.

1. Change the DNS entries

  1. Press Windows + E to open File Explorer, paste the following path in the address bar, and hit Enter:C:/Windows/System32/Drivers/ETCpath
  2. Now, change the DNS entries in the hosts.ini file.

An administrator shared that changing the DNS entries fixed things when only a single user was unable to access the server while others could. Whether or not that’s the case with you, do try this first.

2. Reconfigure server authentication setting

  1. Open the Server Properties and select Security from the navigation to fix 0x80131904
  2. Now, under Server authentication, choose SQL server with Windows Authentication mode, and click OK to save the changes. security settings to fix 0x80131904

In some cases, the server’s security settings were be to blame for the 0x80131904: login failed error, and reconfiguring Server authentication to SQL Server and Windows Authentication mode got things running.

3. Downgrade the SQL client package

For many, the problem appeared after updating to a newer SQLClient package, which points to a bug in it. And in this case, you should downgrade to the previous one.

For instance, a user reported the issue after upgrading to 2.0.0 from 1.1.3 and reverting the change fixed things in no time.

4. Remove problematic suites

If nothing else worked, you could remove the following two cipher suites from the client list:TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 TLS_DHE_RSA_WITH_AES_128_GCM_SHA256

This has worked for many users, but remember to check if a patch has been released for the problem before making changes to fix 0x80131904.

Before you leave, check some quick tips to increase the Internet speed in Windows.

For any queries or to share what worked for you, drop a comment below.

More about the topics: sign-in issues, sql server