AppTunnel Diagnostic API for .NET

The AppTunnel Diagnostic API for .NET provides troubleshooting information for an app’s use of AppTunnel with HTTP/S tunneling. Typically, you add a user interface, such as a menu item, to invoke a diagnostic run for tunneling to a specified URL. Your app then displays or logs the results of the diagnostic run. The API performs the following diagnostics:

 

Table 42.   Diagnostics performed by AppTunnel diagnostic API for .NET

Diagnostic

Description

Run life cycle

Tests the beginning, ending, and restarting of connections. Redirects restart the connection with a new URL, new cookies, and/or new connection settings.

Policy integrity

Checks that the following elements in the AppTunnel policy that relate to the request are valid:

Client identity

Server certificate

At least one tunneling rule in the policy

A rule that matches the request

Certificate challenges

Evaluates the certificate from the sentry, and uses the client identity to authenticate with the server. If both of these challenges succeed, the API establishes a connection with the sentry. If you start another run while the connection is still established, the new run will not perform any certificate related diagnostics.

Connection results

Presents the data received by the app from the backend server.

Set up your app to use the AppTunnel Diagnostic API for .NET

See AppTunnel Diagnostic API for .NET for instructions on setting up your app to use this API.

Run the API

This API is a copy of the native AppTunnel diagnostic API, with the exception that C# nomenclature is used. For details on running this API, please refer to the AppConnect C# binding which provides documentation for each method, property and enumeration in HTML and in Monodoc format.

API Response

The API returns the following series of messages to the console:

Table 43.   AppTunnel diagnostic API response messages

Message

Message Content

Description

1

Success:

Diagnostic run started. Requesting (URL)

Failure:

N/A

Indicates successful start of the API run.

2

Success:

Request matches a tunneling rule so it will be tunneled.

Failure:

Request does not match a tunneling rule so it will not be tunneled

AppTunnel policy has no tunneling rules.

Succeeds if an initial or redirected request matched a tunneling rule, or fails otherwise.

3

Success:

Server certificate in the AppTunnel policy is valid.

Failure:

No server certificate was found in the AppTunnel policy.

Server certificate in the AppTunnel policy is invalid. It may have expired.

Succeeds if the policy contains a valid server certificate, or fails otherwise.

4

Success:

Server certificate passed all evaluation

Failure:

Server certificate was not trusted. The trust result was (trust result)

Succeeds if the sentry's server-side certificate is valid, or fails otherwise.

5

Success:

Failure:

Server issued an auth challenge type that the diagnostic does not support.

Aborting the diagnostic and the auth challenge. Auth challenge type is (auth type)

Returns message if the diagnostic is aborted because the server issued an auth challenge that the diagnostic does not support. Returns no message on success.

6

Success:

Client identity in the AppTunnel policy appears to be valid.

Failure:

No client identity in the AppTunnel policy.

Client certificate in the AppTunnel policy is invalid. It may have expired.

Succeeds if the policy contains a valid client identity, or fails otherwise.

7

Success:

Authenticated with client identity

Failure:

There was a previous failure of the client auth challenge.

Succeeds if the client-side certificate was sent, or fails otherwise.

8

Success:

The server redirected to a new URL. Redirected by server to new URL (url)

Failure:

N/A

Always succeeds.

9

Success:

Received HTTP status code
(1xx, 2xx, or 3xx )

Failure:

Received HTTP status code
(4xx or 5xx)

The server returns an HTTP status code. Status codes in the 1xx, 2xx, and 3xx range indicate success. Status codes in the 4xx and 5xx range indicate failure.

10

Success:

Received (bytes) bytes of data

Failure:

No message appears

If data is received, the API returns a message.

11

Success:

Session completed normally

Failure:

Session completed with error: (error)

Fails if the session completed with an error, or succeeds otherwise.

Sample response