Visual Studio is setting up my Azure web role to 127.255.0.0:82 instead of 127.0.0.1:80 Visual Studio is setting up my Azure web role to 127.255.0.0:82 instead of 127.0.0.1:80 azure azure

Visual Studio is setting up my Azure web role to 127.255.0.0:82 instead of 127.0.0.1:80


When I ran it from Visual Studio for debugging last week, it ran the emulator, attached it to IIS with a binding of 127.0.0.1:80 and everything was peachy.

I don't believe you ever debugged a Azure Emulator deployed project on 127.0.0.1:80 binding with IIS. There is a chance that what you've debugged is just the Web Application project and not the Azure Deployed one. Let me explain why:

  1. Windows Azure Emulator uses internal emulated Load Balancer (LB).This emulated LB binds to 127.0.0.1 port 80 (if port 80 is alreadytaken it uses port 81)

  2. Windows Azure Tools are dynamically creating a virtual IP addressfor every instance of a webrole you have. These dynamic IP Addressesare 127.255.0.X, where X is the logical number of the instance (0,1, 2, etc...).

  3. Windows Azure tools creates a website in the local IIS, with bindingof 127.255.0.X and port 82

enter image description here

Step 3 is repeated for every instance you have defined.

When start debugging, your browser usually opens http: //127.0.0.1:81/ which is the address of the LB. But the request from this address is forwarded to the IIS and its binding to 127.255.0.X:82. You could not have debugged a Windows Azure Emulator deployed project by manually attaching debugger to 127.0.0.1:80, because, if everything was fine there is no w3wp process listening on that address:port, but Azure emulated LB.

When you only have the WebRole (no additional sites defined), Windows Azure Tools does know that it shall attach the debugger to 127.255.0.X:82 where a w3wp process is listening.

This is the clean working configuration of Azure Emulator & SDK & Tools v.1.6 (I think also 1.5 and even back to 1.3 where the Full IIS mode was introduced for first time)

Now if I manually go to IIS and change the bindings back, I can access the site through a browser but obviously I can't debug it via VS.

Yes, you will be able to access the site, but in that way you are skipping the emulated LB, which is not the point when developing Windows Azure Applications.

If you are heving issues of that kind, I suggest that you clean your solution, restart the computer, and if the problem persist uninstall the SDK & Tools and perform clean full install of SDK & Authoring tols for Windows Azure v.1.6 using the Web Platform Installer.