Windows 8 Azure Emulator is a transfer port 80 through 81

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://127.255.0.0:22000/NotifyService. The connection attempt lasted for a time span of 00:00:01.1820716. TCP error code 10061: No connection could be made because the target machine actively refused it 127.255.0.0:22000. - Server stack trace: at System.ServiceModel.Channels.SocketConnectionInitiator.Connect(Uri uri, TimeSpan timeout) at System.ServiceModel.Channels.BufferedConnectionInitiator.Connect(Uri uri, TimeSpan timeout) at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout) at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.CallOpenOnce.System.ServiceModel.Channels.ServiceChannel.ICallOnce.Call(ServiceChannel channel, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeSpan timeout, CallOnceManager cascade) at System.ServiceModel.Channels.ServiceChannel.EnsureOpened(TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) 

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:

IIS Status

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.

+2
source share
2 answers

Repeated port numbers are not a symptom for problems. This is normal behavior and always has been. By executing / configuring Windows 8 Dev Box, you have installed "Windows functions" to activate WCF:

WCF Actication

Another way to check if your service is really up and running:

  • Make sure you have an endpoint by running Compute Emulator and waiting for local deployment
  • telnet on the provided IP address and port number to find out if a connection can actually be established.

Check UI Endpoints:

Endpoints ui

Well, this will show you the input endpoints. And from what I see, you are using internal endpoints. Just for the sake of testing, try changing them to "Enter" to see if there will be a change in behavior.

But first, check that you have installed WCF activation.

+2
source

I always get this problem when I forget to untie the default website in IIS (full IIS) in my dev block. Have you forgotten to do this? By default, your local IIS will associate http port 80 with "Default Web Site." If you edit this binding (using inetmgr) to a different port, then the emulator can capture 80.

0
source

All Articles