POS connection check problem!

  • Thread starter Thread starter Hamed_1983
  • Start date Start date
H

Hamed_1983

Guest
Hi eveyone

i've use this code to check pos connection status :

bool bTestResult = Houshmand.PaymentActions.BehpardakhtPOSHelper.IsPOSConnected("192.168.1.57", 1024);

In the past, this code works correctly, but lately, i'm getting Send/Receive error on POS device!

Here is IsPOSConnected method :

public static bool IsPOSConnected(string strIP, int intPort)
{
bool bResult = true;

System.Net.ServicePointManager.Expect100Continue = false;
using (System.Net.Sockets.TcpClient client = new System.Net.Sockets.TcpClient(strIP, intPort))
{
bResult = client.Connected;
client.Close();
}

return bResult;
}

Note : this code also works correctly in my test app, but in main app, this code fails!

Can anybody help me where is the problem and how to solve it ?

Thanks



Database Helper v 2.0.0

Continue reading...
 

Similar threads

P
Replies
0
Views
176
Policy standard local admin account with Active Di
P
D
Replies
0
Views
112
dubiousp
D
Back
Top