Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Azure

Example: A return to our string-reversing service (part 1) - Putting ACS in place & Reviewing the string-reversal service

3/19/2011 11:47:34 AM
- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
1. Putting ACS in place

Your first step in upgrading the service is to support a simple scenario where customers will have a shared secret (similar to a username and password) to access the service. Whoever they give that secret to will be able to use the service. They’ll be able to change the secret when they need to, just like changing your password every 30 days.

Your first step is to create an AppFabric namespace. This namespace is a lot like a container in BLOB storage—it holds the settings for how you’re using the ACS service. You could have several namespaces if you wanted to, perhaps to isolate different services with different configurations.

To create the namespace, you’ll use the Azure portal, shown in figure 1. Besides creating the namespace, the portal doesn’t do much with regards to ACS. There are other tools for that.

Figure 1. To start using AppFabric, you must first create a namespace. This acts like a container for the entire configuration of ACS and the Service Bus. The name of the namespace has to be globally unique.


To create a namespace, log in to the Azure portal and choose AppFabric on the left side. You’ll then see a list of your existing namespaces and a button for creating a new one.

To create a new namespace, you simply need to provide a globally unique name for your namespace. In figure 1, you can see that we have selected StringReversalInc for our namespace. Once you click the Create button, AppFabric will provision its systems with your namespace.

As you can see in figure 2, ACS has configured both a Service Bus and an ACS service for your namespace. The service endpoints for both services will be displayed as shown in the figure. Notice that the namespace is the hostname of the service endpoints.

Figure 2. Once you create a namespace, AppFabric will provision that namespace with ACS, Service Bus, management endpoints, and security keys.


A management key will be created for you as well. This 32-byte symmetric key is what you’ll use when accessing the AppFabric management service to perform operations on your namespace. We won’t explore the management service in this chapter, but you should check it out. These keys should not be shared outside your organization, or published in a book where anyone can get ahold of them.

2. Reviewing the string-reversal service

For this chapter’s purposes, we’ll use a local REST version of the string-reversal service . You can find the complete code for this revised service in the sample code for this chapter. We’ve removed the entire worker role and Azure-related code to do this. ACS is about securing REST-based services, and our old service used a TCP-based binding. We’ve changed it to use REST by using the WebServiceHost and the WebHttpBinding classes.

The following listing shows how we’re building our simple little service. This code will start up the service and wait for calls to the service.

Listing 1. A simple REST service

If you run this sample string-reversal service, you can make all of the requests to the service you want. The sample code includes a simple client that will call the service.

The next few steps are going to center around adding code to the service so that it can read and use SWT tokens. Once that’s done, you can upgrade the client so it can fetch a token from ACS and use it during a request to the service.

Other -----------------
- Connecting in the cloud with AppFabric : Controlling access with ACS
- Joining dynamic and infrequently changing data together
- Enterprise Service Bus with BizTalk Server and Windows Azure : Mapping the Microsoft Platform to the Enterprise Service Bus Pattern
- Enterprise Service Bus with BizTalk Server and Windows Azure : Governance Considerations
- Enterprise Service Bus with BizTalk Server and Windows Azure : Cloud-Enabling the ESB with Windows Azure
- Working with the Table service REST API : Querying data (part 3) - Filtering data with LINQ & Selecting data using the LINQ syntax
- Working with the Table service REST API : Querying data (part 2) - Querying with LINQ & Filtering data with the REST API
- Working with the Table service REST API : Querying data (part 1) - Retrieving all entities in a table using the REST API
- Working with the Table service REST API - Batching data
- Modifying entities with the REST API is CRUD (part 3) - Updating entities
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server