Windows Azure Compute Emulator and Ports

I had been working on a demo recently where I wanted to show an ASP.NET MVC site that was hosted in Windows Azure and was accessible over HTTPS.  Easy enough, right?

While prepping the demo I kept noticing that when running my site in the Windows Azure compute emulator, the port would be set to something other than 443 (often 444 or 445).

That was kind of strange to me because I set the site to use 443.  With the emulator, if you specify a port (like 443) and that port is not available, the emulator will increment the port number until it finds one it can use.  With that knowledge, I set out to find what was using 443.

Turns out, the default web site in my IIS install on my dev machine was running and was set to use 443 for HTTPS.

I figured if I shut down the default web site, I would then free up port 443 and be able to use it via the Windows Azure compute emulator.  I did that . . . and no joy.  I figured maybe then I would need to restart the emulator.  I did that by right-clicking on the emulator and selecting “Shutdown Compute Emulator”.

The emulator still would not run my site on 443 and instead launched it on 444.  What the heck?

After much fussing around, and a little help from the esteemed Wade Wegner, I learned the emulator actually gets the list of available ports when the emulator starts up.  And I’m not talking about a simple shutdown/start from the emulator’s menu.  I mean when the entire thing first starts up.  For me, this meant I needed to right-click on the emulator icon and select “Exit”.  That essentially kills off the entire emulator process.

Now when I start my app, Visual Studio will relaunch the emulator.  My site is now running on 443.  Happiness!

About these ads
Posted in Windows Azure
9 comments on “Windows Azure Compute Emulator and Ports
  1. Michael Gates says:

    I’m having the exact same issues. I followed the steps above but the emulator still launches on 444 instead 443. Any other possible suggestions?

    Thanks

    MG

  2. Michael Gates says:

    I fixed it. I did a command prompt search to see what else was using port 443. Noticed a PID 4684 was listening on port 443. Looked up the PID# in Task Manager and it turned out to be Skype. I shut down the Skype process and Azure now runs on 443 :)

  3. [...] Next, we keep trying to recreate the Azure instance of the application until it runs on the right ports (usually does so on first try after you free up port 443). Check the Azure Compute Emulator and the specific service to make sure the right ports (443 & 10080) are in use. If not, we shut down both Azure emulators & restart the instance until we get this right. Please see the troubleshooting section in the toolkit documentation or Michael Collier’s post (here). [...]

  4. Tune says:

    The command is ‘netstat’ i believe.

    • Yes, ‘netstat’ helped. In my situation, I knew port 443 and 80 were the standard ports used by IIS for the Default Web Site. I went into IIS to confirm, noticed I was running a default site on those ports, and shut it down.

  5. [...] to 83, 84, 85 etc.In order to solve this, you can shutdown the Compute Emulator. As described here: http://michaelcollier.wordpress.com/2011/03/20/windows-azure-compute-emulator-and-ports/ you may have to exit completely if the port was used the first time the Compute Emulator was [...]

  6. [...] order to solve this, you can shutdown the Compute Emulator. As described here: http://michaelcollier.wordpress.com/2011/03/20/windows-azure-compute-emulator-and-ports/ you may have to exit completely if the port was used the first time the Compute Emulator was [...]

  7. Dito says:

    One more strange issue with ports is that, Blob Storage Emulator uses Port 10000, also it is used by uTorrent. You cannot change it neither in Azure Emulator nor in uTorrent.

    Annoying.

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

Follow Michael S. Collier's Blog on WordPress.com
Follow

Get every new post delivered to your Inbox.

Join 1,709 other followers

%d bloggers like this: