Home > Azure > Using Azure AppFabric Labs without servicebus.config

Using Azure AppFabric Labs without servicebus.config

Azure has been offering a preview of possible future features for a long time now. SQL Azure has SQLAzureLabs (http://www.sqlazurelabs.com), and AppFabric has AppFabricLabs (http://portal.appfabriclabs.com).

You download the latest SDK CTP for AppFabric Labs, you create an AppFabric Labs account at their portal and you can work with it inmediately… well… almost!

There’s an issue regarding the service URL, you don’t need to assign the AppFabric Services URL for it to work with production Azure AppFabric, but to work with Labs you are forced to specify it. Some information about it is available here: http://blogs.msdn.com/b/piyushjo/archive/2011/09/27/azure-service-bus-working-with-the-appfabriclabs-account.aspx

It requires modifying (or creating a new one) ServiceBus.config file and drop it into your .NET Framework config directory. The problem with this approach is that it forces you to use labs in ALL your Azure AppFabric applications. And you may want to use both Labs and Production Azure AppFabric at the same time. As it says in that post, if you try to change the URL manually, you end up in this error:

AppFabric ServiceBus Error: “can’t support more than 1 level subdomain”

I read that another possibility is setting environment variables for this, so there’s an even easier way and you don’t have to go through all the config directories, which can create confusion. And when you are done with labs, you will probably run into an issue when trying to run in Azure Production environment, when you forget to delete the ServiceBus.config configuration.

So, the easy way is to put this at the beginning of your application, service, website (in global.asax), etc.:

   Environment.SetEnvironmentVariable("RELAYENV", "Custom");
   Environment.SetEnvironmentVariable("RELAYHOST", "servicebus.appfabriclabs.com");
   Environment.SetEnvironmentVariable("STSHOST", "accesscontrol.appfabriclabs.com");
VN:F [1.9.11_1134]
Rating: 5.0/5 (1 vote cast)
Using Azure AppFabric Labs without servicebus.config, 5.0 out of 5 based on 1 rating
  1. No comments yet.
  1. No trackbacks yet.