[color=rgb(0,0,0);font-family:Arial, Helvetica, sans-serif;font-size:12px;]Deputy of the code to treat socket exception error.[/color]
[color=rgb(0,0,0);font-family:Arial, Helvetica, sans-serif;font-size:12px;]Sub Main()[/color]
[color=rgb(0,0,0);font-family:Arial, Helvetica, sans-serif;font-size:12px;]Try[/color]
[color=rgb(0,0,0);font-family:Arial, Helvetica, sans-serif;font-size:12px;]Socket.Connect()[/color]
[color=rgb(0,0,0);font-family:Arial, Helvetica, sans-serif;font-size:12px;]flagException = False[/color]
[color=rgb(0,0,0);font-family:Arial, Helvetica, sans-serif;font-size:12px;]Debug.Print("Connected Socket")[/color]
[color=rgb(0,0,0);font-family:Arial, Helvetica, sans-serif;font-size:12px;]'following code[/color]
[color=rgb(0,0,0);font-family:Arial, Helvetica, sans-serif;font-size:12px;]' ERROR CONECTION TCP-IP ==> System.Net.Sockets.SocketException[/color]
[color=rgb(0,0,0);font-family:Arial, Helvetica, sans-serif;font-size:12px;]Catch errorSocket As SocketException[/color]
[color=rgb(0,0,0);font-family:Arial, Helvetica, sans-serif;font-size:12px;]'Socket.Close()[/color]
[color=rgb(0,0,0);font-family:Arial, Helvetica, sans-serif;font-size:12px;]'Debug.Print("ethernet connection")[/color]
[color=rgb(0,0,0);font-family:Arial, Helvetica, sans-serif;font-size:12px;]flagException = True[/color]
[color=rgb(0,0,0);font-family:Arial, Helvetica, sans-serif;font-size:12px;]Finally[/color]
[color=rgb(0,0,0);font-family:Arial, Helvetica, sans-serif;font-size:12px;]End Try[/color]
[color=rgb(0,0,0);font-family:Arial, Helvetica, sans-serif;font-size:12px;]Thread.Sleep(Timeout.Infinite)[/color]
[color=rgb(0,0,0);font-family:Arial, Helvetica, sans-serif;font-size:12px;]End Sub[/color]
When the network cable is disconnected then is when occurs the error and is closed the emulator. This occurs is with OS W7 but in Windows XP the code works well and is established the Socket exception error. I think the problem is in the installation of the Micro Framework on W7 because libraries are not containing the. NET.If por example, I want testing that the network cable is connected in each time, it not is posible. I have tested in multiple computers on W7 and it not works.