I was developing a project with WCF REST and TCP (inter-role) endpoint on Windows 7. I just upgraded to Windows 8 and now I have serious problems with it.
First of all, when I deploy my project on azure, I get the following warnings:
Windows Azure Tools: Warning: Remapping private port 80 to 81 in role 'OfisimCRM.WebClient' to avoid conflict during emulation. Windows Azure Tools: Warning: Remapping private port 443 to 446 in role 'OfisimCRM.WebClient' to avoid conflict during emulation.
Skype is disabled and this is not a problem.
It is not so important, but it is important that I get more serious errors from my interrel communication requests, although I completely disabled the firewall. Here he is:
Could not connect to net.tcp:
TCP Client Code:
public static LicenseItem CheckLicense(int userID) { // This instance does not exist in memory cache. Check if other servers in the same web role know anything about this instance. var webRoles = RoleEnvironment.Roles["OfisimCRM.WebClient"]; var myID = RoleEnvironment.CurrentRoleInstance.Id; LicenseItem remoteValue = null; foreach (var targetInstance in webRoles.Instances) { // I am currently going through a loop of instances. Check if the current enumaration shows my address. if (targetInstance.Id == myID) { // Skip. } else { // This is a neighbour instance. Check to see if it knows about the instance I'm looking for. NetTcpBinding binding = new NetTcpBinding(SecurityMode.None); EndpointAddress targetAddress = new EndpointAddress( String.Format("net.tcp://{0}/NotifyService", targetInstance.InstanceEndpoints["NotificationServiceEndPoint"].IPEndpoint) ); ChannelFactory<INotifyService> channelFactory = new ChannelFactory<INotifyService>(binding, targetAddress); INotifyService targetClient = channelFactory.CreateChannel(); try { remoteValue = targetClient.CheckLicense(userID); if (channelFactory.State != System.ServiceModel.CommunicationState.Faulted) { channelFactory.Close(); } } catch (TimeoutException timeoutException) { Trace.TraceError("Unable to check license on web role instance '{0}'. The service operation timed out. {1}", myID, timeoutException.Message); ((ICommunicationObject)targetClient).Abort(); } catch (CommunicationException communicationException) { Trace.TraceError("Unable to check instance on web role instance '{0}'. There was a communication problem. {1} - {2}", myID, communicationException.Message, communicationException.StackTrace); ((ICommunicationObject)targetClient).Abort(); } } } return remoteValue; }
Edit 1: Important update:

I think the problem is with the second instance. I did debugging, and I saw that the connection was rejected only by this stopped instance. I think this explains everything, but I do not know why this is happening.
Edit 2: workaround:
I noticed that this is not a Windows 8 problem, because I updated the Azure SDK from June 2012 to the fall of 2012. I downloaded an updated version of my project from TFS, than I saw that it works. In conclusion, this is the Azure SDK, but I do not know why.