|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
PlatformNotSupportedException on Windows 2003 server x64I've devloped an .NET DLL (written in C#) and referenced by a VB6 application. The dll uses the System.Net.Sockets.Socket class to connect a remote PC. For an unknowed reason, under Windows 2003 server x64 version, this DLL raises an System.PlatformNotSupportedException exception. System.PlatformNotSupportedException: This operation is only supported on Windows 2000 SP3 or later operating systems. at System.Net.Sockets.Socket.Connect(IPAddress[] addresses, Int32 port) at System.Net.Sockets.Socket.Connect(String host, Int32 port) at MyConnector.Connect() at MonClient.Connect() I do not have this error under Windows XP or Windows 2000 server. Furthermore, the same DLL may be used in the same time by a test program (also written in VB6). So, I've two VB6 programs referencing the same DLL at the same time but one raises PlatformNotSupportedException while the other works perfectly... And I uses exactly the sames instructions in both code sources. Do you have some explanation or investigation trick to suggest ? Thanks for you help Maybe this link can give some pointers:
http://www.codebrothers.net/mdenkmaier/archive/platformnotsupportedexception-when-trying-to-open-a-socket-in-c/BlogEntry.aspx Show quote "Geofrey van Hecke" <gvanhe***@aastra.com> ha scritto nel messaggio news:uGWGg3edHHA.4172@TK2MSFTNGP05.phx.gbl... > Hi everybody, > > I've devloped an .NET DLL (written in C#) and referenced by a VB6 > application. The dll uses the System.Net.Sockets.Socket class to connect a > remote PC. > > For an unknowed reason, under Windows 2003 server x64 version, this DLL > raises an System.PlatformNotSupportedException exception. > > System.PlatformNotSupportedException: This operation is only supported on > Windows 2000 SP3 or later operating systems. > at System.Net.Sockets.Socket.Connect(IPAddress[] addresses, Int32 port) > at System.Net.Sockets.Socket.Connect(String host, Int32 port) > at MyConnector.Connect() > at MonClient.Connect() > > I do not have this error under Windows XP or Windows 2000 server. > > Furthermore, the same DLL may be used in the same time by a test program > (also written in VB6). So, I've two VB6 programs referencing the same DLL > at the same time but one raises PlatformNotSupportedException while the > other works perfectly... And I uses exactly the sames instructions in both > code sources. > > Do you have some explanation or investigation trick to suggest ? > > Thanks for you help > Thank you for your response, I also found this link during my investigation
but I'did not check at that time because, I though it was too stupid to be so simple as described on that page. So I've continue my investigations on other tracks without success :-< After your reply, I decided to check after all that the program was not started with some compatibility criteria... And, it sounds stupide but yes it was started with windows 2000 compatibility !!! So many time lost to find another solution because I wrongly presumed it was not so simple.... Very stupid ! Thanks you very much for you response. Geofrey Show quote "Laura T." <L*@NOWHERE.COM> wrote in message news:ufhLeugdHHA.4688@TK2MSFTNGP04.phx.gbl... > Maybe this link can give some pointers: > > http://www.codebrothers.net/mdenkmaier/archive/platformnotsupportedexception-when-trying-to-open-a-socket-in-c/BlogEntry.aspx > > "Geofrey van Hecke" <gvanhe***@aastra.com> ha scritto nel messaggio > news:uGWGg3edHHA.4172@TK2MSFTNGP05.phx.gbl... >> Hi everybody, >> >> I've devloped an .NET DLL (written in C#) and referenced by a VB6 >> application. The dll uses the System.Net.Sockets.Socket class to connect >> a remote PC. >> >> For an unknowed reason, under Windows 2003 server x64 version, this DLL >> raises an System.PlatformNotSupportedException exception. >> >> System.PlatformNotSupportedException: This operation is only supported on >> Windows 2000 SP3 or later operating systems. >> at System.Net.Sockets.Socket.Connect(IPAddress[] addresses, Int32 port) >> at System.Net.Sockets.Socket.Connect(String host, Int32 port) >> at MyConnector.Connect() >> at MonClient.Connect() >> >> I do not have this error under Windows XP or Windows 2000 server. >> >> Furthermore, the same DLL may be used in the same time by a test program >> (also written in VB6). So, I've two VB6 programs referencing the same DLL >> at the same time but one raises PlatformNotSupportedException while the >> other works perfectly... And I uses exactly the sames instructions in >> both code sources. >> >> Do you have some explanation or investigation trick to suggest ? >> >> Thanks for you help >> > > |
|||||||||||||||||||||||