XAML Spy service

XAML Spy 3 | XAML Spy 2

XAML app connectivity and discovery is provided by the XAML Spy Service. The XAML Spy Service is a Windows service that automatically starts when the OS has booted. The XAML Spy Service hosts a socket server where each XAML app client must connect to in order to be visible in the XAML Spy explorer.

The socket client logic is implemented in a client library. A version exists for each supported platform (Silverlight, Windows Phone, Windows Store and WPF). The libraries are located in the Libraries folder of the XAML Spy installation directory (default: C:\Program Files (x86)\First Floor Software\XAML Spy\Libraries).

XAML Spy provides automatic connectivity by attaching to running processes or injecting the client library into a XAML app before starting it. For information on how to automatically connect to XAML Spy see the quick start. Additionally, Visual Studio integration features can be used to seamlessly integrate XAML Spy in any XAML project.

Configuring the XAML Spy Service

The XAML Spy Service is configured in the XAML Spy settings (settings > xaml spy service). The status of the windows service can be reviewed and the service can be restarted. The socket server address and port number can be changed. By default the XAML Spy Service listens to any IP address and uses port 4530.

The following screenshot show the service settings page of the standalone XAML Spy app.

The configuration options for XAML Spy in Visual Studio are available in the Visual Studio options dialog as shown below.

The preferred public address is configurable when the machine running the XAML Spy Service has multiple public-facing IP addresses. The preferred public address is used when automatically connecting a XAML app.

Restarting and changing the configuration of the XAML Spy service requires elevated permissions. The OS will display a message box requesting these permissions when hitting the apply changes button.

Platform connectivity requirements

Windows Phone apps require a non-localhost IP address. If you do not need Windows Phone connectivity you can safely use localhost as server address.

The XAML Spy Service hosts a policy server which is required for sandboxed Silverlight inbrowser apps. The policy server requires the use of port 943. If you choose to disable the policy server, sandboxed Silverlight inbrowser apps cannot connect to XAML Spy.

Any platform connectivity issue that may occur is listed at the bottom of the xaml spy service settings page, as is demonstrated in the following image.