c# - Cannot connect to POS printer over TCP 9100 -


i'm using:

  • visual studio 2012 express, c#, .net framework 2.0
  • pos printer : tysso prp-300, ip:192.168.1.100

i connect printer using:

c:\> telnet 192.168.1.100 9100 _ 

also using:

c:\> portqry -n 192.168.1.100 -e 9100 -p tcp tcp port 9100 (unknown service): listening 

but when using code:

tcpclient c = new tcpclient("192.168.1.100", 9100); 

i got exception:

an unhandled exception of type 'system.net.sockets.socketexception' occurred in system.dll additional information: connection attempt failed because connected party did not respond after period of time, or established connection failed because connected host has failed respond

it works when compile same code .net framework 4.0

i think there problem 2.0 version!


Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -