Windows Azure AppFabric Samples
The Windows Azure AppFabric samples demonstrate the use of the features of the Service Bus and the AppFabric Access Control service. To download the samples, visit Windows Azure platform AppFabric SDK download page.
By default, the AppFabric samples are no longer installed with the SDK. To obtain the samples, visit the AppFabric SDK download page and download the .zip files, which contain the samples. There are two .zip files; one contains the samples in C#, and the other contains the samples in Visual Basic.
All the samples are located under the \Samples folder in the AppFabric SDK installation folder. The default SDK installation folder is \Program Files\Windows Azure AppFabric SDK v1.0. There are two subfolders in the \Samples folder: the \AccessControl folder that contains all the AppFabric Access Control samples, and the \ServiceBus folder that contains all the Service Bus samples.
C# and Visual Basic versions are provided for each sample. The C# solution is under the \CS35 subfolder of the sample folder. The Visual Basic solution is under the \VB35 subfolder of the sample folder. For example, the C# version of the ASPNETStringReverser solution is in \Samples\AccessControl\GettingStarted\CS35\ASPNET String Reverser.sln and the Visual Basic solution is in \Samples\AccessControl\GettingStarted\VB35\ASPNET String Reverser.sln.
Service Bus Samples
The following samples illustrate how to write applications that use the Service Bus.
- Managing Access Control
Demonstrates how to create and manage service identities in the AppFabric Access Control for use with the Service Bus, and how to assign (and revoke) right from these service Identities so that they can send to or receive from a particular Service Bus entity or manage a particular branch of a Service Bus service namespace.
- Advanced Filters
Demonstrates how to use the Service Bus publish/subscribe advanced filters
- Dead Letter Queue
Demonstrates how to use the Service Bus and the messaging dead letter queue functionality.
- Deferred Messages
Demonstrates how to use the message deferral feature of the Service Bus.
- Duplicate Detection
Demonstrates how to use the Service Bus duplicate message detection with queues.
- Message Buffer Client
Demonstrates how to use the Service Bus message buffer feature.
- Silverlight Sample for Message Buffer
Demonstrates how to consume the AppFabric Access Control and the Service Bus message buffer API from a Silverlight application.
- Message Buffer PlainHttp
Demonstrates how to program a message buffer using its REST protocol.
- Messages Prefetch
Demonstrates how to use the Service Bus messages prefetch feature.
- Session Messages
Demonstrates how to use the Service Bus and the Messaging Session functionality.
Demonstrates how to use the Service Bus messaging features within a transaction scope in order to ensure that batches of messaging operations are committed atomically.
Demonstrates using the NetEventRelayBinding binding on the Service Bus. This binding enables multiple applications to listen to events sent to an endpoint. Events sent to that endpoint are received by all applications.
Demonstrates how to expose and access a service endpoint using the NetOnewayRelayBinding binding.
Demonstrates how to configure the NetTcpRelayBinding binding to support the Hybrid/Direct connection mode that first establishes a relayed connection, and if it is possible, switches automatically to a direct connection between a client and a service.
Demonstrates using the NetTcpRelayBinding binding with message security.
Demonstrates using the NetTcpRelayBinding binding.
Demonstrates using the WebHttpRelayBinding binding to return binary data by using the Web programming model.
Demonstrates how to use the WS2007HttpRelayBinding binding with message security to secure end-to-end messages while still requiring clients to authenticate with the Service Bus. This allows the Service Bus to control client access to the service endpoint while enabling encryption/signature protection on the message path.
Demonstrates using the WS2007HttpRelayBinding binding with reliable session enabled. It also shows how to specify Service Bus credentials in configuration instead of doing so programmatically.
Demonstrates using the WS2007HttpRelayBinding binding. It demonstrates a simple service that uses no security options and does not require clients to authenticate.
- Metadata Exchange
Demonstrates how to expose a metadata endpoint that uses the relay binding. MetadataExchange is supported in the following relay bindings: NetTcpRelayBinding, NetOnewayRelayBinding, BasicHttpRelayBinding and WS2007HttpRelayBinding.
- Shared Secret
Demonstrates how to use an issuer name and issuer secret to authenticate with the Service Bus. The sample resembles the Echo sample, with several changes. Specifically, this sample adds a behavior in the ServiceHost (service) and ChannelFactory (client) applications.
- Simple Web Token
Demonstrates how to use a simple Web token credential to authenticate with the Service Bus. The sample resembles the Echo sample, with several changes. Specifically, this sample adds a behavior in the ServiceHost (service) and ChannelFactory (client) applications.
Demonstrates how to expose an HTTP service that does not require client user authentication.
- Messaging With Queues
Demonstrates how to use the Service Bus to send and receive messages from a queue.
- Messaging With Topics
Demonstrates how to use Service Bus to send and receive messages from a topic with multiple subscriptions.
Shows a simple service and client that communicate through the Service Bus.
- Management Operations using REST
Demonstrate how to perform management operations on the Service Bus using REST.
- MSMQ to Service Bus Bridge
Demonstrates communication between MSMQ and the Service Bus using a bridge.
- Service Bus PowerShell Provider
Demonstrates how to use PowerShell to navigate your Service Bus service namespace as you would the file system, use built-in cmdlets to create and delete queues, topics, subscriptions, and rules, and use custom cmdlets to send and receive messages.
- Client Access Policy Publisher
Demonstrates how to publish the client access policy.
- Silverlight Chat
Demonstrates how to use Service Bus messaging features from Silverlight.
- Simple Silverlight Sample
Demonstrates how to use the Service Bus messaging features from Silverlight through a REST Service Bus endpoint. The sample demonstrates: AppFabric Access Control token acquisition using a service identity name and password, service namespace management operations including queue creation and queue deletion, and basic messaging operations including sending and receiving messages (using Receive and Delete semantics).
- WCF Channel Session
Demonstrates how to use the Service Bus using WCF channels.
- WCF Services
Demonstrates how to use the Service Bus using the WCF service model.
- WCF Service Session
Demonstrates the use of the WCF service model to use sessions in communication with a Service Bus queue.
- Windows Azure Load Partitioning
Demonstrates how to partition message loads using Service Bus topics and subscriptions.
The following samples demonstrate the use of Windows Azure AppFabric Caching.
Demonstrates the various AppFabric Caching API calls in a simple console application.
Illustrates how to use the ASP.NET session state providers with AppFabric Caching.
Demonstrates the use of AppFabric Caching in an ASP.NET application that is hosted in Windows Azure.