Hi SharmaShivani-9342,
You can try to use TcpClient to check the TCP ports.
And please refer to this thread for more details.
Best Regards,
Daniel Zhang
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.