To clarify the above endpoint link:
The Azure portal has a configuration page that you need to check to make sure that the appropriate ports are open. AS WELL AS are those listed on the endpoints page for your Windows virtual machine. I assume the same applies to other hosted OS VMs, such as Linux, etc.

When I came across the Endpoints tab for the virtual machine in question on the Azure portal, I noticed that there are RDP and PowerShell ports, but not HTTP. Adding that I found that I could hit my IIS server in a virtual machine. In a nutshell, it looks like two firewalls, one on your server and one on the Azure portal.
source share