title: Socket/Timeout in Azure WebRole for synchronous communication with WCF Host in WorkerRole
body: <p>I'm trying to get this to work on an internal tcp connection. The code runs flawlessly in development but when deployed to Azure I get ...</p>
  
  <p>a CommunicationException "The socket connection was aborted" trying to connect to "net.tcp://......" with a time code about 60 seconds it waited.</p>
  
  <p>wcf host side:</p>
  
  <pre><code>_WCFHost.AddServiceEndpoint(typeof(IServiceWCFContract), new NetTcpBinding(),_ServiceUrl);
  _WCFHost.Open();
  </code></pre>
  
  <p>wcf client side:</p>
  
  <pre><code>var channelfactory = new ChannelFactory&lt;IServiceWCFContract&gt;(new NetTcpBinding(), service.Url);            
  channelfactory.Open(new TimeSpan(0,0,20)); //20 sec timeout
  var resp = channel.GetValues();
  </code></pre>
  
  <p>I'm sure I'm grabbing the correct url from the RoleEnvironment.Roles["WcfWorkerRole"].Instances</p>
  
  <p>I've made sure enableNativeCodeExecution = "true" is set in the .csdef in both roles.</p>
  
  <p>Ive tried basic http binding too, but azure doesn't like the worker roles having http: names spaces.</p>