PlatformNotSupportedException on Windows 2003 server x64

  • Thread starter Geofrey van Hecke
  • Start date
G

Geofrey van Hecke

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
 
G

Geofrey van Hecke

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

Laura T. said:
Maybe this link can give some pointers:

http://www.codebrothers.net/mdenkma...n-trying-to-open-a-socket-in-c/BlogEntry.aspx

Geofrey van Hecke said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top