Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Disconnected Service Agent QuickStart

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies.
This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

This QuickStart demonstrates the key usage scenarios of the Disconnected Service Agent Application Block.

Building and Running the QuickStart

The QuickStart ships as source code, which means you must compile it before running it. This QuickStart does not require any additional setup.

To build and run the QuickStart

  1. Open the solution file Quickstarts.DisconnectedAgent.sln.
  2. On the Build menu, click Rebuild Solution.
  3. Press F5 to run the QuickStart.

Overview

The QuickStart consists of two forms:

  • TheRequest Manager Control Panel form, which allows you to monitor and manage the request queues, switch between automatic and manual dispatching, and control the connection status. It contains the following lists:
    • Queued Requests: shows the requests in the pending requests queue.
    • Served Requests: shows the requests served successfully.
    • Failed Requests: shows the requests in the dead letter queue.
  • The Create Add Request form, which you can use to create requests for a local Web service (IntegerCalculator) that sums two integers.

Ff650253.scsf-qs-dsa-01(en-us,PandP.10).png

Figure 1
Disconnected Service Agent QuickStart

The following procedure explains how to create requests to invoke the IntegerCalculator Web service.

To create a request

  1. In the Create Add Request form, enter the two operands for the sum.
  2. Optionally, select a tag for the request. In this QuickStart, a tag will let you group requests and dispatch them all together.
  3. Click Add. The request will be added to the requests queue, and therefore shown in the Queued Requests list.

You can dispatch the requests either manually or using the automatic dispatcher. The following procedure describes how to dispatch requests using the automatic dispatcher.

To dispatch requests using the automatic dispatcher

  1. In the Requests Dispatching section, select the option Automatic Dispatching. When this option is selected, every request in the requests queue will be dispatched whenever a connection is available. After a request is dispatched, it will be listed in the Served Requests list if it was successful or in the Failed Requests list otherwise.

The following procedure describes how to dispatch requests manually.

To dispatch requests manually

  1. In the Requests Dispatching section, select the option Manual Dispatching.
  2. Optionally, select a tag to dispatch only requests that match the tag selected.
  3. Click Dispatch. The Disconnected Service Agent Application Block will dispatch the requests if a connection is available. After a request is dispatched, it will be listed in the Served Requests list if it was successful or in the Failed Requests list otherwise.

You can also dispatch requests manually by right-clicking them on the Queued Requests list and selecting Dispatch Selected Requests.

Ff650253.scsf-qs-dsa-02(en-us,PandP.10).png

Figure 2
You can manually dispatch individual requests using the contextual menu.

The QuickStart allows you to change the connection status so that you can explore how the block reacts to connectivity changes. The following procedure explains how to change the connection status.

To change the connection status

  1. In the Connection Status section, select Connected to enable a connection or Disconnected to disable it.
    Ff650253.note(en-us,PandP.10).gifNotes:

    The QuickStarts uses a DesktopConnection to let you update the connection status without having to enable/disable your physical network adapter.

    When the connection is disabled, the Disconnected Service Agent will not dispatch any request, even if you manually dispatch them.

  2. When the Connected option is selected, check/uncheck the Enable Web Service option to enable/disable the Web service. This option lets you analyze how the block acts when a connection is present but the remote endpoint is unavailable.

    If you try to dispatch a request and the Web service is not available, it will be moved to the dead letter queue and therefore it will appear in the Failed Requests list.

    Ff650253.note(en-us,PandP.10).gifNote:
    When you uncheck the Enable Web Service option, the QuickStart under the covers changes the Web service endpoint’s address to an invalid address to simulate the Web service going unreachable. When you check the option again, the endpoint’s address gets restored to its original value.

Whenever a request fails to be dispatched, the Disconnected Service Agent moves it to the dead letter queue and therefore it appears in the Failed Requests list. This QuickStart allows you to move failed requests back to the pending requests queue (so that they can be dispatched again) or to delete them.

To add a failed request back to the pending requests queue

  1. Right-click one or more requests on the Failed Requests list.
  2. Select Enqueue Selected Requests.

To remove requests from the dead letter queue

  1. Right-click one or more requests on the Failed Requests list.
  2. Select Remove Selected Requests from Queue.

Ff650253.scsf-qs-dsa-03(en-us,PandP.10).png

Figure 3
You can control the dead letter queue using the Failed Requests list’s contextual menu.

Related Software Factory Assets

The following assets are related to this QuickStart:

  • Endpoint Catalog Application Block
  • Connection Monitor Application Block
  • Disconnected Service Agent Application Block

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.