Microsoft KB Archive/817571

= You receive an &quot;An operation was attempted on something that is not a socket&quot; error message when you try to connect to a network =

Article ID: 817571

Article Last Modified on 5/7/2007

-

APPLIES TO


 * Microsoft Windows XP Home Edition
 * Microsoft Windows XP Professional
 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Professional Edition
 * Microsoft Windows 2000 Server

-



Important This article contains information about how to modify the registry. Make sure to back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows registry



SYMPTOMS
When you try to connect your computer to a network, you may receive the following error message:

An operation was attempted on something that is not a socket.

This symptom occurs on a computer that obtains an IP address from a Dynamic Host Configuration Protocol (DHCP) server. If you assign a static IP address to your computer, you do not receive this message.



CAUSE
This issue may occur if you have a third-party product installed that uses Windows sockets and also uses the ipconfig, release, and renew commands. The Windows sockets registry subkeys may be corrupted.



RESOLUTION
Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.To resolve this problem, use either of the following methods.

Method 1
We recommend that you use Method 1 if either of the following conditions are true:
 * You only have one computer.
 * You do not have access to a computer that is similar to the first computer where you experienced the symptoms that are described in the &quot;Symptoms&quot; section. A computer that is similar to the first computer is another computer that has the same operating system version and a similar hardware configuration.

Use Registry Editor to export and delete the Winsock and Winsock2 registry subkeys, and then remove and reinstall TCP/IP on Microsoft Windows 2000 or Microsoft Windows XP. To do this, follow these steps.

Export and delete the corrupted registry subkeys
 Insert a floppy disk in the floppy disk drive of the computer whose registry entries you are exporting. Click Start, click Run, type regedit, and then click OK. Locate and then click the following registry subkey:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Winsock

 Do one of the following steps, depending on the operating system:  For Windows XP, on the File menu, click Export. For Windows 2000, on the Registry menu, click Export.</li></ul> </li> In the Save in box, click 3½ Floppy (A:), type a name for the file in the File name box, and then click Save.</li> Right-click Winsock, and then click Delete. When you are prompted to confirm the deletion, click Yes.</li> Repeat steps 3 through 6 for the following subkey:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Winsock2

Note Each .reg file that you save must have a different name.</li> Right-click Winsock2, click Delete, and then click Yes.</li> Quit Registry Editor.</li></ol>

Remove TCP/IP on a Windows 2000-based computer

 * 1) Log on to Windows as administrator.
 * 2) In Control Panel, double-click Network Connections, right-click Local Area Connection, and then click Properties.
 * 3) Under This component uses the following items, click Internet Protocol (TCP/IP), and then click Uninstall.
 * 4) Follow the instructions on the screen to remove TCP/IP.
 * 5) Restart your computer, but click No if you are prompted to let Windows enable a protocol.

Install TCP/IP on a Windows 2000-based computer

 * 1) Log on to Windows as administrator.
 * 2) In Control Panel, double-click Network Connections, right-click Local Area Connection, and then click Properties.
 * 3) Click Install.
 * 4) In the Select Network Component Type dialog box, click Protocol, and then click Add.
 * 5) Under Network Protocol, click Internet Protocol (TCP/IP), and then click OK.
 * 6) When the protocol is installed, click Close.
 * 7) Restart your computer.

Reinstall TCP/IP on a Windows XP-based computer
In Windows XP, the TCP/IP stack is a core component of the operating system. Therefore, you cannot remove TCP/IP in Windows XP. <ol> Install TCP/IP on top of itself. To do this, follow these steps: <ol style="list-style-type: lower-alpha;"> In Control Panel, double-click Network Connections, right-click Local Area Connection, and then click Properties.</li> Click Install.</li> Click Protocol, and then click Add.</li> Click Have Disk.</li> In the Copy manufacturer's files from box, type :\windows\inf, and then click OK.</li> In the list of available protocols, click Internet Protocol (TCP/IP), and then click OK.</li></ol> </li> Restart your computer.</li></ol>

Method 2
If you are correcting this problem on several computers and you have access to a working computer with the same operating system version and a similar hardware configuration, we recommend Method 2.

To resolve this issue, delete the corrupted registry entries, and then replace them with the registry key information that you exported from a computer that has a working installation of TCP/IP. To do this, follow these steps.

Delete the corrupted registry entries
On the computer that has the corrupted registry entries, follow these steps: <ol> Click Start, click Run, type regedit, and then click OK.</li> In Registry Editor, locate and then click the following registry subkey:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services

.</li> Right-click Winsock, and then click Delete. When you are prompted to confirm the deletion, click Yes.</li> <li>Right-click Winsock2, and then click Delete. When you are prompted to confirm the deletion, click Yes.</li></ol>

Export the registry entries to a floppy disk
On the computer that has a working installation of TCP/IP, follow these steps.

Note The computer that you are importing the registry entries from must use the same version of Windows and be either similar to or a duplicate of the computer that is experiencing the symptoms that are described in the &quot;Symptoms&quot; section. <ol> <li>Insert a floppy disk in the floppy disk drive of the computer that has the registry entries that you are exporting.</li> <li>Click Start, click Run, type regedit, and then click OK.</li> <li>In Registry Editor, locate and then click the following registry subkey and then click Winsock:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services

</li> <li>Click File, and then click Export.</li> <li>In the Save in box, click 3½ Floppy(A:), type a name for the file in the File name box, and then click Save.</li> <li>Click Winsock2, click File, and then click Export.</li> <li>In the Save in box, click 3½ Floppy(A:), type a name for the file in the File name box, and then click Save.

Note Each .reg file that you save must have a different name.</li> <li>Quit Registry Editor.</li></ol>

Import the registry entries from the floppy disk
On the computer that had the corrupted registry entries, follow these steps:
 * 1) Insert the floppy disk that contains the .reg files in the floppy disk drive of the computer that is experiencing the symptoms that are described in the &quot;Symptoms&quot; section.
 * 2) Start Windows Explorer, click My Computer, and then double-click 3½ Floppy(A:).
 * 3) Double-click each .reg file that you created and saved to the floppy disk in the &quot;Export the registry keys to a floppy disk&quot; section.
 * 4) Click Yes when you are prompted to add information to the registry.
 * 5) Click OK when you receive the message that the information is successfully entered in the registry.
 * 6) Quit Registry Editor.
 * 7) Restart the affected computer.

<div class="moreinformation_section">

MORE INFORMATION
These methods restore basic functionality to the Winsock and the Winsock2 subkeys. You may have to reinstall some third-party proxy software or firewalls.

Additional query words: Winsock, TCP/IP, socket error

Keywords: kberrmsg kbprb KB817571

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.