Author
Topic: How to determine and to recover from Winsock2 corruption (Read 124 times)

Manual steps to determine whether the Winsock2 key is corrupted for Windows XP usersTo determine if the symptoms are caused by a problem with the Winsock2 key,use one of the following methods.

Method 1: Use the Netdiag tool

To use the Netdiag tool, you must install the Microsoft Windows XP Support Tools. To do so, follow these steps.

NotesIf you already have Support Tools installed, go to the second procedure in this section.If you do not have Support Tools installed and you do not have the Windows XP Setup CD, go to Method 2.Insert your Windows XP Setup CD, and then locate the SupportTools folder.Double-click the Setup.exe file.Follow the steps on the screen until you reach the Select An Installation Type screen.On the Select An Installation Type screen, click Complete, and then click Next.When the installation is complete, follow these steps:Click Start, click Run, type Command, and then click OK.Type netdiag /test:winsock, and then press ENTER.The Netdiag tool will return the test results for several network components, including the Winsock. For more details about the test, use /v at the end of the netdiag command: netdiag /test:winsock /v Method 2: Use the Msinfo32 programNote Use this method only if you do not have a Windows XP Setup CD and you do not have Support Tools installed. Click Start, click Run, type Msinfo32, and then click OK.Expand Components, expand Network, and then click Protocol.You will have ten sections under Protocol. The section headings will include the following names if the Winsock2 key is undamaged: MSAFD Tcpip [TCP/IP] MSAFD Tcpip [UDP/IP] RSVP UDP Service Provider RSVP TCP Service Provider MSAFD NetBIOS [DeviceNetBT_Tcpip... MSAFD NetBIOS [DeviceNetBT_Tcpip... MSAFD NetBIOS [DeviceNetBT_Tcpip... MSAFD NetBIOS [DeviceNetBT_Tcpip... MSAFD NetBIOS [DeviceNetBT_Tcpip... MSAFD NetBIOS [DeviceNetBT_Tcpip... If the names are anything different from those in this list, the Winsock2 key is corrupted, or you have a third-party add-on, such as proxy software, installed. If you have a third-party add-on installed, the name of the add-on will replace the letters "MSAFD" in the list.

If there are more than ten sections in the list, you have third-party additions installed.

If there are fewer than ten sections, there is information missing.

Note These entries represent an installation with only the TCP/IP protocol installed. You can have a working Winsock and see additional entries if another protocol is installed. For example, if you install NWLink IPX/SPX, you will see 7 additional sections, for a total of 17. Below is an example heading of one of the new sections: MSAFD nwlnkipx [IPX]Also, each of the new sections that are created by installing NWLink IPX/SPX start with "MSAFD." Therefore, there are still only two sections that do not start with those letters.

If the Netdiag test fails, or if you determined that there is Winsock corruption by looking at Msinfo32, you must repair the Winsock2 key by using the steps in the next section.Manual steps to recover from Winsock2 corruptionWindows XP with Service Pack 2 instructionsTo repair Winsock if you have Windows XP Service Pack 2 (SP2) installed, type netsh winsock reset at the command prompt, and then press ENTER.

Note Restart the computer after you run this command. Additionally, for computers that are running Windows XP SP2, there is a new netsh command that can rebuild the Winsock key. For more information, visit the following Web site: http://technet.microsoft.com/en-us/libr ... 57156.aspx (http://technet.microsoft.com/en-us/libr ... 57156.aspx) Warning Programs that access or monitor the Internet such as antivirus, firewall, or proxy clients may be negatively affected when you run the netsh winsock reset command. If you have a program that no longer functions correctly after you use this resolution, reinstall the program to restore functionality.

Note If these steps do not resolve the problem, follow the steps in the next section.Windows XP without Service Pack 2 instructionsTo repair Winsock if you do not have Windows XP SP2 installed, delete the corrupted registry keys, and then reinstall the TCP/IP protocol.Step 1: Delete the corrupted registry keysImportant This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base: 322756 (http://support.microsoft.com/kb/322756/ ) How to back up and restore the registry in Windows

For more information about how to back up the registry, click the following article number to view the article in the Microsoft Knowledge Base: 322756 (http://support.microsoft.com/kb/322756/ ) How to back up and restore the registry in Windows XP and Windows Vista Click Start, and then click Run.In the Open box, type regedit, and then click OK.In Registry Editor, locate the following keys, right-click each key, and then click Delete: HKEY_LOCAL_MACHINESystemCurrentControlSetServicesWinsockHKEY_LOCAL_MACHINESystemCurrentControlSetServicesWinsock2 When you are prompted to confirm the deletion, click Yes.Note Restart the computer after you delete the Winsock keys. Doing so causes the Windows XP operating system to create new shell entries for those two keys. If you do not restart the computer after you delete the Winsock keys, the next step does not work correctly.Step 2: Install TCP/IP Right-click the network connection, and then click Properties.Click Install.Click Protocol, and then click Add.Click Have Disk. Type C:Windowsinf, and then click OK.On the list of available protocols, click Internet Protocol (TCP/IP), and then click OK.

If Internet Protocol (TCP/IP) does not appear, follow these steps:Click Start, and then click Search.In the Search Companion pane, click More advanced options.Click to select the following three check boxes:Search system foldersSearch hidden files and foldersSearch subfoldersIn the All or part of the file name box, type nettcpip.inf, and then click Search.In the results pane, right-click Nettcpip.inf, and then click Install.Restart the computer.Manual steps to determine whether the Winsock2 key is corrupted for Windows Vista usersClick Start, click Run, type Msinfo32, and then click OK.Expand Components, expand Network, and then click Protocol.Ten sections appear under Protocol. The section headings will include the following names if the Winsock2 key is undamaged: MSAFD Tcpip [TCP/IP] MSAFD Tcpip [UDP/IP] MSAFD Tcpip [TCP/IPv6] MSAFD Tcpip [UDP/IPv6] RSVP UDP Service Provider RSVP TCP Service Provider RSVP UDPv6 Service Provider RSVP TCPv6 Service Provider MSAFD NetBIOS [DeviceNetBT_Tcpip... MSAFD NetBIOS [DeviceNetBT_Tcpip... MSAFD NetBIOS [DeviceNetBT_Tcpip... MSAFD NetBIOS [DeviceNetBT_Tcpip... MSAFD NetBIOS [DeviceNetBT_Tcpip... MSAFD NetBIOS [DeviceNetBT_Tcpip... If the names are anything different from those in this list, the Winsock2 key is corrupted, or you have a third-party add-on such as proxy software installed. If you have a third-party add-on installed, the name of the add-on will replace the letters "MSAFD" in the list.

If there are more than ten sections in the list, you have third-party additions installed.

If there are fewer than ten sections, there is information missing.

Note These entries represent an installation with only the TCP/IP protocol installed. You can have a working Winsock and see additional entries if another protocol is installed. For example, if you install NWLink IPX/SPX, you will see 7 additional sections, for a total of 17. Below is an example heading of one of the new sections: MSAFD nwlnkipx [IPX]Also, each of the new sections that are created by installing NWLink IPX/SPX start with "MSAFD." Therefore, there are still only two sections that do not start with those letters.

If the Netdiag test fails, or if you determined that there is Winsock corruption by looking at Msinfo32, you must repair the Winsock2 key by using the steps in the next section.Manual steps to recover from Winsock2 corruption for Windows Vista usersWinsock corruption can cause connectivity problems. To resolve this issue by using Network Diagnostics in Windows Vista, follow these steps:Click , Collapse this imageExpand this imageand then click Network.Click Network and Sharing Center.In the Network and Sharing Center box, click Diagnose and Repair.Note You may also access the Network and Sharing Center in Control Panel.

If the Network and Diagnostic tool was unable to find a problem, you can manually repair or reset Winsock.Manual steps to repair or to reset Winsock for Windows Vista usersClick Collapse this imageExpand this image, type cmd in the Start Search box, right-click cmd.exe, click Run as administrator, and then press Continue.Type netsh winsock reset at the command prompt, and then press ENTER.

Note If the command is typed incorrectly, you will receive an error message. Type the command again. When the command is completed successfully, a confirmation appears, followed by a new command prompt. Then, go to step 3.Type exit, and then press ENTER.Back to the topSimilar problems and solutionsFor more information, click the following article number to view the article in...For more information, click the following article number to view the article in the Microsoft Knowledge Base: 936211 (http://support.microsoft.com/kb/936211/ ) How to troubleshoot network connectivity problems in Internet Explorer For more information about how to troubleshoot network and Internet connection problems in Windows Vista, visit the following Microsoft Web site:http://windowshelp.microsoft.com/Window ... 81033.mspx (http://windowshelp.microsoft.com/Window ... 81033.mspx) Back to the top

Posting Disclaimer: Any individual may post a message in this forum and may do so anonymously. Therefore, the sole author is exclusively and entirely responsible for all opinions in that message. They do not represent the official opinions of Techronnati, its administrators or moderators or the Techronnati Management. Techronnati is merely acting as an impartial conduit for constitutionally protected free speech and is not responsible and will not be held liable for the content of such messages. All images and service logos are trademarks of their respective owners.