Check IIS network connectivity with PortCheck v2.0

Due to demand for the original PortCheck tool, I decided to release the updated version that I myself have been using that has a few more features to help diagnose connectivity issues.

[Download PortCheck v2.0]

The idea behind PortCheck was simple – help diagnose the common “page cannot be displayed” or “server not found” errors that could result from a number of network connectivity, or service availability issues.

In my post on the subject, Where did my IIS7 server go? Troubleshooting "server not found" errors, I listed some of the common causes for these errors, which include:

1)      You misspelled the hostname

2)      The hostname doesn’t exist

3)      You are unable to resolve the server hostname to an IP address (DNS server connectivity)

4)      You don’t have network connectivity to the server

5)      Firewall is blocking your connection

6)      IIS is not running

7)      The Web site doesn’t exist

8)      The Web site is stopped

9)      The Web site does not have the binding on which you are trying to connect

The PING command is commonly used to help with 1-4, but when it comes to 4-8, it falls short because it doesn’t actually verify that the server is listening at the port at which you are trying to connect.

PortCheck bridges this gap by actually attempting to make a connection to the specified port.

In the current release of PortCheck, I added more diagnostics to help pinpoint the exact problem along the network route. The tool now does the following:

1)      Resolve the address provided to all available IP addresses, and associated hostnames.

a.       If failed, you have problems 1-3 on your hands

2)      Attempt to connect to the specified port

a.       If failed, PING the specified host

                                                               i.      If failed, you most likely have problems 4-5: limited network connectivity, or firewall is blocking access (including ICMP). But, it could also be that firewall is blocking PING (ICMP), and you have problems 5-9 as well.

                                                             ii.      If successful, you most likely have problems 5-9: firewall is blocking access to the port, IIS isn’t running, Web site is stopped or missing, or not listening at the specified address.

For example:

> PortCheck.exe zzz.mvolo.com 80

DNS LOOKUP FAILED (162 ms)

Most likely causes:

  Host hostname / address does not exist (check spelling)

  DNS is down or cannot connect to DNS server (try from another machine)

> PortCheck.exe www.mvolo.com 81

Resolved www.mvolo.com (220 ms)

Hostnames:

        www.mvolo.com

IP addresses:

        209.162.178.14

CONNECTION TO www.mvolo.com:81 FAILED (21001 ms): A connection attempt failed be

cause the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 209.162.178.14:81

PING REPLY (0 ms): TimedOut

The host may be unreachable. Most likely causes:

  No network connectivity to host

  No service active on that port

  Blocked by remote firewall

  Blocked by local or network firewall

Now, if PortCheck fails to make the connection, you still need to investigate what is happening at the server, which may require checking whether IIS is running, whether firewall is open, and whether the web site you are accessing exists, is started, and is listening at the right port. This requires administrative access to the server, and the steps you can find in Where did my IIS7 server go? Troubleshooting "server not found" errors.

In the next release of PortCheck, I will add some diagnostics that (assuming you are running as Administrator for the remote machine) can perform those diagnostics for you so the picture can be complete.

NOTE: PortCheck 2.0 is released under the MPL (Microsoft Permissive Use License).

[Download PortCheck v2.0]
[Download Source Code v2.0]

Enjoy,

Mike

Published 23 January 08 11:11 by Mike Volodarsky

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

# 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

# Peter Schmidt said on January 24, 2008 3:31 AM:
Mike Volodarsky has updated his PortCheck tool to version 2.0. The tool is simple, but quick to troubleshoot connections against web sites.
# Richard said on January 24, 2008 7:14 AM:
A slight bug - your code allows for either two or three arguments (address, port, timeout), but the tool exits if a third argument is supplied: if (args.Length != 2) { Console.Error.WriteLine("Usage: PortCheck address port [timeout]"); return; }
# Byron said on January 24, 2008 7:43 AM:
Great troubleshooting tool!
# Mike Volodarsky said on January 24, 2008 11:22 AM:

Richard,

Great catch! I got a little sloppy with cleaning up source code.  The timeout attribute is actually not supported, its left over from an "in-progress" version of the tool (v. 3) :)

I'll update the source code today. Thanks for the heads up!

Thanks,

Mike

# JJ said on February 5, 2008 4:12 AM:
Hi Mike, One thing I noticed that Portcheck does not do is IP addresses. It comes back with a "DNS LOOKUP FAILED". It would be nice if it could do it as I sometimes like to test when setting up a site before I make DNS changes. Thanks, JJ
# Mike Volodarsky said on February 8, 2008 5:01 PM:

I updated the tool with the fix for the unsupported timeout parameter (removed) and fixed it to be able to use ip addresses.

Richard, JJ, thanks for reporting the bugs!

Thanks,

Mike

# IIS 7.0 Server-Side said on May 1, 2008 2:38 AM:

The IIS 7.0 Resource Kit Book is finally out! Ok, it’s been out for almost 2 months, but somehow

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