Connecting to C# TCP Server

Good day,

I have a simple C# TCP server based on the following Microsoft example:

But I cannot get my Arduino to connect to it using any of the examples (i.e. ChatServer, etc). My Arduino can successfully get an DHCP IP address, can request a web page, etc. All that works perfectly, I just can’t seem to connect to my TCP server program. I have set a static IP address, can ping the Arduino, etc.

Any thoughts are appreciated!

Show the output from Wireshark.

firewall restrictions? which port you connect? btw: ChatServer is a server example, not client.

Juraj, that's a very fair point. Seems like most of the TCP examples are either servers or MODBUS based. Seems to be a lot more examples of UDP on Arduino.

Anyone have any links to examples of a simple TCP [u]client[/u] that just connects to a TCP server and send and receives a string?

airpanther:
Juraj, that’s a very fair point. Seems like most of the TCP examples are either servers or MODBUS based. Seems to be a lot more examples of UDP on Arduino.

Anyone have any links to examples of a simple TCP client that just connects to a TCP server and send and receives a string?

WebClient example. HTTP is text