Multiple Network Adapters May Cause Socket Operation Failure
This applies to .NET Framework 1.1. If your computer has multiple network adapters resulting in more than 50 network bound protocols, you will receive error while trying to perform network operations, directly or indirectly, using System.Net.Socket class, such as consuming XML web services.
My personal experience was quite frustrating. I was trying to add Web Reference in Visual Studio 2003 by entering the web service Url, but it took a very long time and the control didn't return to Visual Studio 2003. After waited for some time, I decided to manually stop the operation.
And I tried to use wsdl.exe to generate proxy class and I got this exception.
Unhandled Exception: System.TypeInitializationException: The type initializer for "System.Net.Sockets.Socket" threw an exception. ---> System.Net.Sockets.SocketException: An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full at System.Net.Sockets.Socket.InitializeSockets() at System.Net.Sockets.Socket..cctor()
After some googling, I managed to find the solution to my problem. Multiple network adapters with more than 50 protocol bindings (I didn't actually count them though) were causing the unpatched .NET Framework 1.1 to throw the above exception. I immediately uninstalled some unused adpaters (of course temporarily). I tried again and finally managed to get it work.
For more information, check out the site below.
http://support.microsoft.com/kb/815209
http://support.microsoft.com/kb/826757
Happy patching...