Configuring the Azure AppFabric ServiceBus Client SDK to target a specific host
To configure the AppFabric ServiceBus Client SDK to target a specific host
environment:
In some scenarios you may want to target a specific ServiceBus instance from your client application. This can be achieved by either setting some environment variables or using a servicebus.config file.
For environment variable the following values have to be set:
RELAYENV=Custom
RELAYHOST=servicebus.appfabriclabs.com
STSHOST=accesscontrol.appfabriclabs.com
The same information can be provided thru a servicebus.config file and following are some detailed steps for this:
1. Create the ServiceBus.config file with the following content and replace ALL the HostName entries below (e.g. servicebus.appfabriclabs.com etc.) with the appropriate host information (e.g. servicebus.windows.net etc.)
<?xml version=”1.0″ encoding=”utf-8″?>
<!– the root web configuration file –>
<configuration>
<Microsoft.ServiceBus>
<relayHostName>servicebus.appfabriclabs.com</relayHostName>
<stsHostName>accesscontrol.appfabriclabs.com</stsHostName>
</Microsoft.ServiceBus>
</configuration>
2. Copy the above ServiceBus.config file to the .NET Framework configuration directory or in the same directory as the executable.
The .NET Framework configuration directory depends on the operating system version being 32 bit or 64 bit and the framework version that you have installed, below are the
typical locations:
Microsoft .NET Framework version 2.0 on 32 bit OS |
%Windir%\Microsoft.NET\Framework\v2.0.50727\CONFIG |
Microsoft .NET Framework version 2.0 on 64 bit OS |
%Windir%\Microsoft.NET\Framework64\v2.0.50727\CONFIG |
Microsoft .NET Framework version 4.0 on 32 bit OS |
%Windir%\Microsoft.NET\Framework\v4.0.30319\Config |
Microsoft .NET Framework version 4.0 on 64 bit OS |
%Windir%\Microsoft.NET\Framework64\v4.0.30319\Config |
Trackbacks & Pingbacks