Hi all,
I am writing an automatic trading system on a website using Microsoft Visual Studio, C#, ASP.NET, MT3APIDotNet.DLL and mtapi.DLL. With an InterbankFX demo account, it works fine when using my local host (on PC). Sometimes, I saw a problem "Invalid Socket Handle" when trying to run this application. It happens sometimes when I did not cleanup sockets (using WSACleanup function) and not disposing API objects, at the end or during debugging this application.
The solution for this moment is that I needed to restart my PC, to get all sockets cleaned up, okay.
But, it is not the best solution for when I moved this application to a commercial server. So, there are still some sockets left hanging, when testing this application there, I still get an exception "Invalid Socket Handle". I cannot ask the provider to restart the whole server to get sockets cleaned up?? So I need to find out how I can get sockets cleaned up.
Can anyone help me to get this resolved? Any experience with sockets?
Thanks for advance,
Jeff