Check network service connectivity with PortChecker tool

If you are unable to connect to a particular TCP service, such as a web server, ftp server, or anything else, you may be experiencing a number of both network and service connectivity problems:

  1. The hostname you typed in cannot be resolved
  2. The ip address of the server is not reachable due to network connectivity problems
  3. The server's firewall has rejected your connection
  4. The service is not running, or is not listening at the specified port

The PING command can help you determine whether you are experiencing 1-2.  But it doesnt help you actually determine whether you are having issues with 3-4.

I put together a little tool that can tests TCP connectivity to the specific port on the target machine, something that the PING command cannot do.  You can use it to determine whether IIS is listening on a particular ip/port and whether you can get to it – or test connectivity to any arbitrary TCP services (since it will expose DNS, network connectivity, lack of active listening connections), such as SQL Server.  Note that the tool doesn’t do any application protocol specific communication (such as making an HTTP request) – it simply establishes a TCP connection and closes it.

>> Download the tool / source code here << 

This code is distributed under the Microsoft Permissive Use License, meaning you can do with it whatever your please but I bear no responsibility for how you use it.

Then, run:

> PortCheck.exe localhost 80


The tool will report whether it connected successfully, timed out when connecting, or was rejected by firewall / because noone was listening on the port.


Published 09 December 06 04:09 by Mike Volodarsky
Filed under: ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# IIS 7.0 Server-Side said on January 23, 2008 11:14 PM:

Due to demand for the original PortCheck tool , I decided to release the updated version that I myself

# MVolo's Blog said on January 23, 2008 11:18 PM:

Due to demand for the original PortCheck tool , I decided to release the updated version that I myself

# Shane said on September 24, 2008 1:09 AM:
Sweet! This tool immediately helped me find my problem! :D

Leave a Comment

(required) 
(optional)
(required) 
Enter the code you see below


About Mike Volodarsky

For the past 5 years, I was the core Program Manager for Microsoft ASP.NET 2.0 and IIS 7.0 products. I drove the design and development of the IIS 7.0 web server core, the IIS FastCGI support, the AppCmd command line tool, the ASP.NET Integrated pipeline, and other special projects around server security, performance, and scalability. Now, I am working on my own on cutting edge web server tech on top of the Microsoft IIS platform, and continue blogging about it here.

About me



For the past 5 years, I was the core server Program Manager for the IIS 7.0 and ASP.NET 2.0 products at Microsoft.
Now, I work on advanced web server tech using IIS 7.0, .NET, and Windows Server 2008 and write about it in this blog.

View Michael Volodarsky's profile on LinkedIn

Writings



TechNet Magazine
>Top 10 Performance Improvements in IIS 7.0

MSDN Magazine
>IIS 7.0: Build Web Server Solutions with End-To-End Extensibility
>IIS 7.0: Enhance Your Apps with the Integrated ASP.NET Pipeline
>IIS 7.0: Explore The Web Server For Windows Vista And Beyond
>Design and Deploy Secure Web Apps with ASP.NET 2.0 and IIS 6.0
>Fast, Scalable, and Secure Session State Management for Your Web Applications


Tools and Modules

LeechGuard
IconHandler 2.0
DirectoryListing
HttpRedirection
IIS Auth for Wordpress
iisschema.exe
PortCheck.exe v2.0

Popular Posts

- ASP.NET 2.0 Breaking Changes on IIS 7.0
- Develop IIS7 modules and handlers with .NET
- Troubleshoot IIS7 errors like a pro
- Troubleshooting 503 / "service unavailable" errors
- Troubleshooting "server not found" errors
- Create IIS7 sites, applications, and virtual directories
- Run Ruby on Rails with IIS FastCGI
- VS Debugging of ASP.NET applications on Windows Vista
- Stop hot-linking with IIS and ASP.NET

Tags

Search

Go

This Blog

Archives

Good IIS Blogs

Disclaimer

These postings are provided as is with no warranties, and confer no rights. The views expressed in this blog are entirely my own.

Syndication