A quick solution for SQL Server to establish a connection with the Server but errors occur during login.

Source: Internet
Author: User

A quick solution for SQL Server to establish a connection with the Server but errors occur during login.

When I recently connected to a remote database on VS2013, I suddenly couldn't connect. when I ran the MSTest, QTAgent32 crash. Change to IIS crash when running under IIS. There was no problem with the previous connection. After that, I found information on the Internet and solved the problem according to the solution mentioned by Niu Ren.

1. Exception message

A connection has been established with the server, but an error occurs during logon. (Provider: SSL Provider, error: 0-the received message is abnormal, or the format is incorrect .) ---> System. ComponentModel. Win32Exception: The received message is abnormal or the format is incorrect.

2. Solution

Run "command manager" as an administrator and enter netsh winsock reset and press enter to reset the LSP connection.

3. LSP Problems(From http://tech.sina.com.cn/s/2009-11-13/14203590640.shtml)

About Winsock LSP "browser hijacking", the number of recruits has been high. Due to its special nature, direct deletion without restoring the normal status of LSP may lead to a failure to access the Internet. Therefore, you need to be careful when fixing the problem.

First, let's talk about Winsock LSP "browser hijacking". Winsock LSP stands for Windows Socket Layered Service Provider (hierarchical Service Provider), which is the door for Socker communication in the underlying Windows network. Some rogue software can add itself to intercept, access, and modify network data packets, add advertisements at will, and get your browsing habits. Here the trojan is added, and the consequences can be imagined. Because the LSP works at the underlying layer, No matter what browser you use, you can't escape it. When the dll file in LSP is deleted, it will become unable to access the Internet.

  Location of the LSP service in the Registry

HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ WinSock \ Parameters \ NameSpace_Catalog5 \ Catalog_Entries. The default SYSTEM has LSP, which is responsible for the TCP/IP components (mswsock. dll) and NTDS components (winrnr. dll), their items are 000000000001 and 000000000002, which indicate priority. If a malicious program wants to hijack, you only need to change its items to 000000000001, after the system items are pushed back in sequence, malicious programs can be prioritized.

  Solution:

Method 1. Use LSP 360 to fix the vulnerability. If you are prompted that "LSP is not abnormal and you do not need to fix it", but you still cannot get on the network, run the ping command and the IP address appears (?), You cannot ping the internet. Then you can use the "Restore Winsock LSP to initial state" function of 360.

Method 2: it is a common method that everyone is familiar with. Use the LSPFix tool to fix it when the network is disconnected.

Method 3. There are two newly added Netsh commands in Windows XP Service Pack 2.

"Netsh winsock reset catalog this command resets the Winsock directory to the default configuration. This command is useful if an incorrect LSP is installed that may cause network connection loss. Although you can use this command to restore the network connection, you should use it with caution, because previously installed LSP will need to be re-installed.

"Netsh winsock show catalog this command will display the Winsock LSP list installed on the computer.

Therefore, we can use the netsh winsock reset command to reset Winsock without any auxiliary tools.

The above section provides a quick solution for SQL Server to successfully establish a connection with the Server but errors occur during login, if you have any questions, please leave a message. The editor will reply to you in a timely manner. Thank you very much for your support for the website of!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.