DOCX

Hands-On Lab - Azure Service Bus Integration in CRM 2011

By David Cruz,2014-10-10 09:50
7 views 0
Hands-On Lab - Azure Service Bus Integration

Hands-On Lab

    Azure Service Bus Integration

Lab version: 1.0.0

    Last updated: 10/10/2011

CONTENTS

    OVERVIEW ............................................................................................................................................. 4

    EXERCISE 1: CREATE A NEW APP FABRIC NAMESPACE ................................................................. 6

    Task 1 Create an AppFabric Namespace ........................................................................................ 6 EXERCISE 2: CREATE A NEW ISSUER FOR CRM ............................................................................. 10

    Task 1 Create a self-signed X509 certificate ................................................................................. 10

    Task 2 Move certificate to the certificate store ........................................................................... 12

    Task 3 Register Issuer with CRM 2011 ......................................................................................... 26

    Task 4 Allow Network Service to Access the Certificate ............................................................... 29 EXERCISE 3: CREATE THE DIAGNOSTIC VIEWER SERVICE ........................................................... 31

    Task 1 Create a new service. ....................................................................................................... 31

    Task 2 Create Storage Account .................................................................................................... 35

    Task 3 Deploy the MVC application. ............................................................................................ 38

    Task 4 Add Diagnostics iFrame to Equipment form. ..................................................................... 48 EXERCISE 4: STARTING THE ONE WAY LISTENER .......................................................................... 57

    Task 1 Modifying the settings. ..................................................................................................... 57

    Task 2 Run the listener console application ................................................................................. 61 EXERCISE 5: CREATE A STEP TO PUBLISH TO THE SERVICE BUS. .............................................. 64

    Task 1 Register the step for the Diagnostic entity. ....................................................................... 64 EXERCISE 6: VERIFICATION .............................................................................................................. 77

    SUMMARY ............................................................................................................................................ 79

Overview

    Building interconnected applications in the Windows Azure environment becomes easy with the Windows Azure Platform AppFabric Service Bus. The Service Bus is designed to significantly lower the communication barriers for internet-scale applications regardless of whether they are Web-based, or on premise applications. The Service Bus allows communications between applications in a network topology agnostic fashion.

    The Service Bus provides a hosted, secure, and broadly accessible infrastructure for communication. The Service Bus provides connectivity options for service endpoints that would otherwise be difficult or impossible to reach. Endpoints can be located behind network address translation (NAT) boundaries, bound to dynamically assigned IP addresses or both.

    Dynamics CRM 2011 includes out of the box support for communications over the Service Bus. In this Lab you will learn how to configure CRM 2011 to use the .NET Service Bus using the out of the box Service Bus Plugin. The Service Bus Plugin will have a step registered to Post the xml message received onto the Service Bus registered. Another application, in this case a one way listener, will then pick up this message and add a record to the Azure Table Storage.

    You will be working to help Fabrikam Fitness, manufacturer of the SuperDuper Cycle 7000 to create a mechanism to communicate device faults from each customer’s on-premises CRM server to the

    Fabrikam Fitness diagnostics system that is located in Windows Azure.

    While the code for the application has been written already you will be helping Fabrikam and ABC Gym by configuring the outbound connectivity to the Service Bus. This includes the creation of various authentication certificates and the configuration of various access control rules in the AppFabric. Objectives

    After completing this lab, you will be able to:

    ; Configure an Issuer for the Azure .NET Service Bus for CRM 2011 to use.

    ; Register a Service Bus Plugin Step to post CRM messages onto the .NET service bus.

System Requirements

    You must have the following items to complete this lab:

    ; Microsoft Visual Studio 2010

    ; Microsoft Dynamics CRM 2011

    ; Windows Azure App Fabric SDK

    ; Windows HTTP Services Certificate Configuration Tool

    ; Visual Studio Tools for Windows Azure

Prerequisites

    To complete this lab you will need to be able to configure the rules for the service bus from your computer, some firewall clients may prevent this.

    Exercises

    This Hands-On Lab comprises the following exercises:

    1. Create a new app fabric namespace.

    2. Create a new Issuer for CRM.

    3. Register a step for the Service Bus Plugin.

    4. Create the diagnostic viewer service.

    5. Starting the one way listener.

Estimated time to complete this lab: 60 minutes.

    Starting Materials

    This Hands-On Lab includes the following starting materials in the Sources directory.

    ; MVC Solution. This solution contains the code that is used inside the cloud for displaying the

    diagnostics. This is not in the lab, but provided for you to look at.

    ; One way Listener. This is the code used to upload the data to the cloud when it detects a

    message from CRM. This is not in the lab, but provided for you to look at.

    Exercise 1: Create a new App Fabric namespace

    Microsoft CRM 2011 uses the service bus to connect to a remote plugin. This requires an app fabric namespace within your Azure account. The following exercise will demonstrate how to create this account.

    Task 1 Create an AppFabric Namespace

    Windows Azure uses a Windows Live login, to complete this lab you are required to either use a provided token or have your own Azure Account.

    http://www.microsoft.com/windowsazure/ and click on Sign In. 1. Navigate to

    Figure 1

    Azure Sign In

    2. Sign in with a Windows Live account setup to work with Azure

    Note: If you do not have an Azure account, hit the back button on Internet Explorer

    and click Get Your Account and select a plan which suits you.

Figure 2

    Windows live Sign in

3. Select a Service Bus, Access Control and Caching.

    4. Select Service Bus.

    5. Select Add Service Namespace

Figure 3

    Add Service Namespace

6. Fill out the fields as below and click OK.

    Field Value

    Service Namespace FitnessCenterYYYYMMDD

    Region Your closest region

    Connection Pack Size 5 Connections

    Note: Ensure you choose a unique namespace eg: FitnessCenter, followed by today’s

    date. The ServiceBus Connection Packs specify how many simultaneous connections

    you can have on the Service Bus.

Figure 4

Service Namespace

7. This concludes Exercise 1, but leave the Azure web site open as we’ll use it again later

    Exercise 2: Create a new Issuer for CRM To connect to the Windows Azure AppFabric you must present a token from require an issuer (a Security Token Service). CRM 2011 has the ability to issue a token for use when connecting to the service bus. In order to have CRM issue a token you will require a certificate to be registered with CRM. Task 1 Create a self-signed X509 certificate

    Windows Azure requires a certificate for validating a user with the Service Bus. The following steps will demonstrate a simple way to create a self-signed certificate. In an application in a production environment, you will probably obtain a certificate from a third party certification authority or have a certificate issued by your enterprise CA.

    1. Click Start | Run

    2. Open IIS 7 by entering InetMgr and pressing enter

    Figure 5

    Open IIS

    3. In the left hand Connections pane, select the web server and double click on Server Certificates

Report this document

For any questions or suggestions please email
cust-service@docsford.com