¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: C# TCP Client to connect to MC4 via Hostname


 

¿ªÔÆÌåÓý

I would also not rely on a ping for verification of a present device.

There are environments that block pings, but only allow very specific service ports.

?

Cheers,
Thorsten

?

Von: [email protected] <[email protected]> Im Auftrag von Cameron Bowman
Gesendet: Sonntag, 9. Oktober 2022 15:41
An: [email protected]
Betreff: Re: [crestron] C# TCP Client to connect to MC4 via Hostname

?

Did you add a DNS entry in your client's hosts file?

?

This shows how on several different OSes.

?

Also consider that if you are going to be creating a connection which is forced to secure (as in forces you to use TLS), there are some protocols which will automatically fail if there are issues with a certificate. The DNS entry not being verifiable can be one of those issues. Getting a certificate with a verified domain name such that your DNS name will be accepted is quite a chore. Then again, when I tried doing a very similar thing, I might have missed an obvious and easier path.

?

On Sat, Oct 8, 2022 at 6:24 PM Shawn F <shawnmfennell@...> wrote:

Hello, I am writing a TCP client class in VS2019 using System.Net.Sockets TCPClient.?
I created a test server on the MC4 at TCP port 9001.
The MC4 IP is 10.0.0.57 and the MC4 hostname is?MC4-00107FE73CAB
My Client class first checks if the IP address is pingable and then connects via IP Address
Everything is working great except now I am trying to ping test and connect with the HostName of the MC4 and nothing works.

string hostName = "MC4-00107FE73CAB"
_client = new TcpClient();
_client.Connect(hostName, port);

Any help would be appreciated

Thanks

Join [email protected] to automatically receive all group messages.