Using Windows Azure AppFabric Service Bus with EPiServer CMS, part 2

This blog post is about registering and calling on-premise services using Windows Azure AppFabric Service Bus from EPiServer CMS. In this series we activate the Service Bus feature of AppFabric, create a WCF REST service, register it on the Service Bus and finally call it from EPiServer CMS.


This is the second part of the series Using Windows Azure AppFabric Service Bus with EPiServer CMS. Please read part one if you haven’t done so already. In this part we create a WCF REST service and register it on the AppFabric Service Bus.


Creating the WCF REST service

Create a WCF Service Library. In this demo I’ll be using DBLOG.BizTalk.ExplorerServices to simulate integration with on-premise BizTalk Server services together with EPiServer CMS.


By default the Target framework is set to .NET Framework Client Profile. Change this by right clicking the project, selecting Application and setting the Target framework to .NET Framework 4.


Add a reference to System.ServiceModel.Web.


Rename IService1 and Service1. In this demo I’ll be using IBtsApplication and BtsApplication. See sample code below. I’ve left out using-statements for brevity.

This takes care of the necessary classes. Next we’ll take a look at the configuration of the on-premise service. This is where the magic happens.

Configuring the WCF REST service

First we’re going to register a few WCF extensions needed to enable relay binding. Run the executable as shown below.


Open app.config and delete the contents of the file. Replace with sample configuration below.

For this exercise we’ll turn off authentication against the service by setting relayClientAuthenticationType to None. In the case of needing to authenticate against the service we could retrieve a token using the Access Control Service – but fir this exercise we’re going to keep it simple.

Copy the Default Key which we got from the Management Portal in part one and set the issuerSecret-attribute of the sharedSecret-element to this value.

Registering the service on the AppFabric Service Bus

When you fire up the service it will automatically register itself on the AppFabric Service Bus. Note the serviceRegistrySettings-element with the attribute discoveryMode which is set to Public. This will make the service become listed at

Testing the service

Since we implement the service with a REST API we can call it directly using the browser by calling the address

8. Application is OK with ID

That’s it! We can now call our on-premise service from the cloud – awesome!

With that we’re done with part two. Let’s move on to part three where we call the service from EPiServer CMS.

Recent Posts
  • Wilson Smith

    This is very much great and hope fully nice blog. Every body can easily found her need able information. I am visit first time but I fond many use full article. I will back again when get time.

Contact Us

We're not around right now. But you can send us an email and we'll get back to you, asap.

Not readable? Change text. captcha txt

Start typing and press Enter to search