-1

I am having an static IP (amazon ec2 instance) and a defined port which is connected to a device. This device send data on this particular port usually every minute over the GSM network.

For eg.172.20.1.170 is the IP and 4001 is port.

I am using C# socket to read the data but it is giving error "No connection could be made because the target machine actively refused it 172.20.1.170:4001"

Please suggest the sample code to read the data from the IP and port

TUser
  • 1
  • Possible duplicate: http://stackoverflow.com/questions/2972600/no-connection-could-be-made-because-the-target-machine-actively-refused-it – Matt Evans Oct 26 '15 at 06:38

1 Answers1

0

Try to hit the ip and port embedded in ur device from the web browser (chrome , firefox).. make sure our PC and device are in same network... if you get the data on browser you are good to go for coding.. you can also try hyper terminal ..

Mohammad Rashid
  • 138
  • 3
  • 16