I am building a tool for validating if all the touchpoints (DB connection strings, mail servers, web services, WCF services, etc.) used by a set of applications are accessible after a disaster recovery migration to an off-site location.
The tool must check whether a given net.tcp endpoint address is valid and accessible, without generating a client proxy, and without regard to the binding or behavior used by the actual WCF client. The tool does not need to invoke any service method, and will only be run by system administrators using highly privileged domain credentials.
It is easy to do this for HTTP-based services:
hwrRequest = (HttpWebRequest)WebRequest.Create(i_WebServiceUrl);
hwrRequest.Timeout = i_nTimeoutSeconds * 1000;
hwrResponse = (HttpWebResponse)hwrRequest.GetResponse();
if (hwrResponse.StatusCode == HttpStatusCode.OK)
:
:
Is there an equivalent technique for WCF net.tcp services?