Computers, Programming, Technology, Music, Literature

Add bindings to your azure role in Azure Compute Emulator

leave a comment »

 

(or) access azure website hosted on local Windows Azure Compute Emulator with the hostname of host’s IP address.

Scenario: If you are testing a website on your local development environment hosted on Windows Azure Emulator, if by default binds to your loopback address (localhost/127.0.0.1). What this means is, if you are on a domain or network and if you want to access this service/website from another computer on a network, you basically can’t.

 

Ideal Workaround:  Automated way is described with rinetd, and with or without serviceex – described in detail here – http://blog.sacaluta.com/2012/03/windows-azure-dev-fabric-access-it.html

 

Zappy Workaround: Here I will show you a very primitive way of working around the problem. But this is manual and you have to do it every time you start and stop the Azure emulator or the Azure role.

If the role you are trying to access from another computer on a domain is a website or uses IIS (most likely), then go ahead and edit the bindings, just as you would do for a normal website hosted in IIS. Right click on the website and select Edit Bindings. Add your IP address, or add your IP addresses and host names (with a port number that is available) that you want to bind to the website. That’s it, you are done.

 

For instance in the screenshot below, my service deployment was deployment22(44) as shown in the Windows Azure Compute Emulator, so my website in IIS looked like deployment22(44).xxxxxx. This website created in IIS is purged every time you start and stop an Azure service. That’s why I prefer the “Ideal Workaround”. But, this blog shows you yet another simple way to do it without tools.

All in one screenshot showing my csdef file, Windows Azure Compute Emulator, IIS Site Bindings, Internet explorer successfully navigating to the same website with all available bindings, and a linux on virtual box accessing the website with my ip address. Click on the screenshot to enlarge or use this link for a high res image.

image

Advertisements

Written by gmaran23

December 31, 2013 at 8:35 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: