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 ...
a CommunicationException "The socket connection was aborted" trying to connect to "net.tcp://......" with a time code about 60 seconds it waited.
wcf host side:
_WCFHost.AddServiceEndpoint(typeof(IServiceWCFContract), new NetTcpBinding(),_ServiceUrl);
_WCFHost.Open();
wcf client side:
var channelfactory = new ChannelFactory<IServiceWCFContract>(new NetTcpBinding(), service.Url);
channelfactory.Open(new TimeSpan(0,0,20)); //20 sec timeout
var resp = channel.GetValues();
I'm sure I'm grabbing the correct url from the RoleEnvironment.Roles["WcfWorkerRole"].Instances
I've made sure enableNativeCodeExecution = "true" is set in the .csdef in both roles.
Ive tried basic http binding too, but azure doesn't like the worker roles having http: names spaces.