I am using the CrossRoad release on 32-bit Windows XP Professional SP2 machines. If I call any method of the Lextm.SharpSnmpLib.Messenger class a TypeInitializationException is thrown for that class. The InnerException property contains a SocketException with the error message "An address incompatible with the requested protocol was used" and error code 10047.
The problem seems to lie in line 27 of Messenger.cs where a static field of type Socket is initialized with an IPv6 UDP Socket instance. I don't have IPv6 installed on my workstations, so I believe that's why it's failing to create an IPv6 Socket. If I install the "Microsoft TCP/IP version 6" protocol for my network connection, then this exception is no longer thrown and everything works fine, however, I would prefer to not have to install IPv6 on all the machines where my application will be used. For now I can use the Manager class which seems to provide equivalent functionality, but most of that class' public methods have been deprecated.
Perhaps lazy initialization would be more appropriate for the udp and udpV6 fields of the Messenger class (that is, don't attempt to create an IPv6 Socket until the first time one is needed)? That way, applications that won't be working with IPv6 anyways won't have to have it installed.
No files are attached