Using TCP/UDP Port Checker Web Service
July 15, 2014
As part of the newest LyncValidator update is the addition of a web service for the purposes of checking availability of ports. The following post details the use of the Web Service.
License
The TCP/UDP Port Check Web Service is provided as is. We don’t make any promises to services availability although the service is hosted on Windows Azure so it should be pretty stable.
The Web Service will be offered as both a no cost and cost options. To use the public Web Service, there is no cost, all that is required is the following:
1. Register by e-mailing me at richard@masteringlync.com. All I need to know is: A) How do you plan on using it. B) Estimated requests daily/monthly.
2. Display acknowledgement of Port Validation by Richard Brynteson, MasteringLync.com/LyncValidator.com on your application, web page, generation of reports, etc.
If you don’t want to display anything you should e-mail me about licensing costs. I reserve the right to change these terms whenever I want.
How it Works
There are two different available checks. The first is a TCP check done by doing a simple TCP Port Query to ensure the service is available and responding. The second check is a UDP check. This is done by doing an allocation to the Lync Server AV Edge Service.
Usage
The service is available as a standard web service. You can view the WSDL by visiting here:
http://gcmsdk.azurewebsites.net/validator.asmx?wsdl
and the specific tool is here:
http://gcmsdk.azurewebsites.net/validator.asmx?op=portChecker
To use within a Web or Windows Application, you can do the following:
1. Add a Web Service Reference to your project.
2. Add a reference to the page/project (i.e. using WebValidator;)
3. Pass the four required attributes to the web service. You need to pass the IP or FQDN, Port, Protocol (UDP or TCP) and your license key. Here is an example:
WebValidator.Validator web = new Validator();
string Result= web.portChecker(IPorFQDN, Port, UDP, “xxxxx-xxxxx-xxxxx”);
This will return either a string value of Open or CLOSED. For example:
And that is all it takes. The key you will receive as part of registration. If you have any questions just ask via Twitter or e-mail.