Obtención de la excepción AddressAlreadyInUseException después de actualizar a .NET 4.5
Recientemente instalé el nuevo .NET Framework 4.5 (anteriormente tenía la versión 4.0) en mi servidor y obtengo unSystem.ServiceModel.AddressAlreadyInUseException
cuando inicio mi servicio de Windows que expone los puntos finales de WCF.
System.ServiceModel.AddressAlreadyInUseException: ya existe un agente de escucha en el punto final de IP 0.0.0.0:56543. Esto podría suceder si ya hay otra aplicación escuchando en este punto final o si tiene múltiples puntos finales de servicio en su host de servicio con el mismo punto final IP pero con configuraciones de enlace incompatibles. ---> System.Net.Sockets.SocketException: normalmente se permite un uso de cada dirección de socket (protocolo / dirección de red / puerto) en System.Net.Sockets.Socket.DoBind (EndPoint endPointSnapshot, SocketAddress socketAddress) en el sistema. Net.Sockets.Socket.Bind (EndPoint localEP) en System.ServiceModel.Channels.SocketConnectionListener.Listen () --- Fin del seguimiento de la pila de excepciones internas --- en System.ServiceModel.Channels.SocketConnectionListener.Listen () en System. ServiceModel.Channels.BufferedConnectionListener.Listen () en System.ServiceModel.Channels.ExclusiveTcpTransportManager.OnOpen ()
en System.ServiceModel.Channels.TransportManager.Open (Tonel de control de la cuenta del usuario) en System.ServiceModel.Channels.TransportManagerContainer.Open en la caja de control del motor.Parece en el cuadro de mandos de los botones del sistema. .OnOpen (TimeSpan timeout) en System.ServiceModel.Channels.TcpChannelListener`2.OnOpen (TimeSpan timeout) en System.ServiceModel.Channels.Cervicio de inspección de objetos. at System.ServiceModel.Channels.CommunicationObject.Open (TimeSpan timeout) en System.ServiceModel.ServiceHostBase.OnOpen (TimeSpan timeout) en System.ServiceModel.Channels.CommunicationObject.Open (TimeSpan timeest) [] args)
La configuración de mis puntos finales WCF se ve así:
<system.serviceModel>
<bindings>
<netTcpBinding>
<binding name="NetTcpBindingConfiguration" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="524288" maxBufferSize="65536" maxConnections="10" maxReceivedMessageSize="65536">
<readerQuotas maxDepth="32" maxStringContentLength="5242880" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />
</binding>
</netTcpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="">
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
<behavior name="MEX">
<serviceMetadata/>
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="MEX" name="MyAssembly.MyNamespace.MyService">
<endpoint address="net.tcp://localhost:56543/MyService"
binding="netTcpBinding" bindingConfiguration="NetTcpBindingConfiguration" contract="MyAssembly.MyNamespace.MyServiceInterface" />
<endpoint address="net.tcp://localhost:56543/MEX" binding="mexTcpBinding"
contract="IMetadataExchange" />
</service>
</services>
</system.serviceModel>
Creo que tiene algo que ver con el punto final MEX que usa el mismo puerto, pero no estoy seguro de cómo configurarlo correctamente después de actualizar a .NET Framework 4.5.
¿Hubo un cambio en WCF para que esta configuración genere una excepción?