How should one configure an Azure Webrole when using a TCP-based WCF on the same ports as IIS?
An on-premise solution would typically use WAS activation, however this usually involved setting permissions on the HTTP ports etc. In Windows Azure this interface isn't readily available.
The best way to host a WCF service in an Azure WebRole is using Windows Activation Service (WAS). Typically this is needed when you want to provide web content (HTTP) and some TCP-based WCF service on the same ports (80 or 443).
Here is a PowerShell script that will enable the TCPPortSharing service, and configure IIS appropriately. Although this works for Azure, with slight modification you can use this for an on-premise Windows 2008 R2 server as well.