ComponentSpace Trace Route Class Library

Trace Route Class Library

Introduction provides an overview of the Trace Route Class Library.

Installation details the prerequisite system requirements and installation procedures for the Trace Route Class Library.

Reference documents the namespaces and classes that constitute the Trace Route Class Library.

Examples describes the included example code.

FAQ lists frequently asked questions.

Support describes how to get support.

Send comments on this topic.


Introduction

Perform Internet route tracing to determine network delays and topology. The Trace Route .NET class library is fully event driven. Receive events when route timing has completed, a hop has completed, and the route tracing has completed. Written in 100% managed C# code, the class library offers .NET developers complete route tracing functionality for their applications.

The Trace Route .NET class library may be used in any Windows or Web application by adding a reference to the assembly to access the classes in the ComponentSpace.TraceRoute namespace.

The TraceRouteClient class instigates route tracing. You may specify the maximum number of hops and also whether to resolve Internet addresses to names. The route tracing either may be performed synchronously (blocking) using the TraceRoute method or asynchronously (non-blocking) using the BeginTraceRoute and EndTraceRoute methods. For asynchronous calls you may receive completion notification either through an event or a callback method. A timeout may be specified.

For each hop a number of timings are done. These are reported using the TraceRouteTimingCompleted event that includes the timing and TTL information. Once the timings for a hop are completed a TraceRouteHopCompleted event is raised that includes the server address and optionally its name, the hop number and the timings. Finally once the target server is reached a TraceRouteCompleted event is raised. Once completed the entire route tracing information is returned in a list of TraceRouteHop objects.

All classes that raise events support a SynchronizingObject property. All classes report errors through the TraceRouteException.

Features

  • Specify maximum hop count, timeouts and whether to resolve Internet addresses
  • Receive hops counts, router addresses and names, timings and TTLs
  • Fully event driven
  • Calling applications may make either synchronous or asynchronous calls
  • Asynchronous calls may either use events or callbacks
  • Specify a timeout
  • 100% managed code written in C#
  • Object oriented design specifically for the .NET framework
  • All error handling through .NET exceptions
  • Comprehensive Visual Studio .NET style documentation
  • VB.NET and C# example source code
  • Includes prompt free email support
  • Royalty free runtime
  • Source code available

This class library may also be purchased as part of the ComponentSpace .NET Internet Suite.

Getting Started

  • Install the product in your development environment.
  • Compile and run one of the examples.
  • Refer to the reference section for further details.
  • Add a reference to the class library in your application.
  • Once completed, distribute the class library with your application.


Installation

To install this product double click the .MSI file and follow the installation steps.

Prerequisites

The Microsoft .NET framework runtime must already be installed on your computer. The Microsoft .NET framework redistributable may be downloaded from msdn.microsoft.com.

You will also need a development environment such as Visual Studio .NET.

Distribution

The class library's runtime is royalty free which means it may be freely distributed with your application. The only file that should be distributed is the class library's DLL.


Reference

The reference section is contained within a separate help file.


Examples

Example code, developed using Microsoft Visual Studio .NET, is included with the product. You will find these projects in sub-directories of the installation directory.

TestTraceRoute
Demonstrates the use of the class library within a C# application. This example uses asynchronous invocation with event notification.
VBTestTraceRoute
Demonstrates the use of the class library within a VB.NET application. This example uses asynchronous invocation with event notification.
ASPTestTraceRoute
Demonstrates the use of the class library within an ASP.NET application. To install and run this application please refer to the FAQs.


FAQ

Frequently Asked Questions
  1. I can't build the examples. Why can't the ComponentSpace namespace be found?

    2. The assembly containing the namespace or the project referencing it has been moved. The simplest way to fix this is to re-add the reference to the project by browsing to where the DLL is located (typically the installation directory).

  2. What is the order of events being fired and when are they fired?

    3. The TraceRouteClient raises three different types of events: TraceRouteTimingCompleted; TraceRouteHopCompleted; and TraceRouteCompleted.

    A message is sent and a reply expected from each hop or router on route to the destination server. After the reply is received or a timeout occurs, a TraceRouteTimingCompleted is raised. For each hop, a message is sent 3 times so you should receive the TraceRouteTimingCompleted event 3 times per hop. The TraceRouteHopCompleted is then raised before moving onto the next hop. When the destination server is reached or the maximum number of hops is reached, the TraceRouteCompleted event is raised.

  3. How do I use the class library from within an ASP.NET application?

    4. Microsoft Knowledge Base Article 195445 states that raw socket access is denied to non-administrator users. This means that, unless you're running under an administrator account, you will not be able to perform trace route operations as they require the use of raw sockets.

    One example of this situation is ASP.NET applications that typically won't run under an administrator account.

    One approach to resolve this problem is to use an enterprise services (COM+) component. This component can be configured to run in a COM+ server application under an administrator account. Therefore, regardless of which account the caller is running under, the trace route operation will run under an administrator account.

    To install and configure enterprise services (COM+) component:

    Run InstallComPlusApp.bat from the installation folder.

    Using the Component Services Administrative Tool change the Trace Route application's identity property so that it runs under an account that's a member of the administrator's group.

    Access the serviced component from your ASP.NET application. An example ASP.NET application is supplied.


Support

For further information, visit us at http://www.componentspace.com or send email to info@componentspace.com.

If have a bug to report or a product enhancement request send email to support@componentspace.com.