Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8711539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:54:10+00:00 2026-06-13T04:54:10+00:00

I recently installed the new .NET Framework 4.5 (previously was 4.0 installed) on my

  • 0

I recently installed the new .NET Framework 4.5 (previously was 4.0 installed) on my Server and I´m getting a System.ServiceModel.AddressAlreadyInUseException when I start my Windows Service that exposes WCF endpoints.

System.ServiceModel.AddressAlreadyInUseException: There is already a
listener on IP endpoint 0.0.0.0:56543. This could happen if there is
another application already listening on this endpoint or if you have
multiple service endpoints in your service host with the same IP
endpoint but with incompatible binding configurations. —>
System.Net.Sockets.SocketException: Only one usage of each socket
address (protocol/network address/port) is normally permitted at
System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot,
SocketAddress socketAddress) at
System.Net.Sockets.Socket.Bind(EndPoint localEP) at
System.ServiceModel.Channels.SocketConnectionListener.Listen() —
End of inner exception stack trace — at
System.ServiceModel.Channels.SocketConnectionListener.Listen() at
System.ServiceModel.Channels.BufferedConnectionListener.Listen() at
System.ServiceModel.Channels.ExclusiveTcpTransportManager.OnOpen()
at
System.ServiceModel.Channels.TransportManager.Open(TransportChannelListener
channelListener) at
System.ServiceModel.Channels.TransportManagerContainer.Open(SelectTransportManagersCallback
selectTransportManagerCallback) at
System.ServiceModel.Channels.TransportChannelListener.OnOpen(TimeSpan
timeout) at
System.ServiceModel.Channels.ConnectionOrientedTransportChannelListener.OnOpen(TimeSpan
timeout) at
System.ServiceModel.Channels.TcpChannelListener`2.OnOpen(TimeSpan
timeout) at
System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan
timeout) at
System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan
timeout) at
System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan
timeout) at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan
timeout) at
System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan
timeout) at Qosit.Infrastructure.UnisServer.OnStart(String[] args)

The configuration of my WCF endpoints looks like that:

<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>

I think it has something to do with the MEX endpoint that uses the same port, but I’m not sure how to configure it correctly after upgrading to .NET Framework 4.5.

Was there a change in WCF so that these configuration raises an exception?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T04:54:11+00:00Added an answer on June 13, 2026 at 4:54 am

    This is because of some limitations in using the same port for both the netTcp endpoint and mex endpoint documented here refer section “Sharing a port between a service endpoint and a mex endpoint using the NetTcpBinding”. In 4.0 the defaults for listenBackLog and MaxConnections were 10. In 4.5 these defaults were revised as 12 * ProcessorCount. This exception happens when you try to share a port between netTcpBinding and mex endpoint provided you have different values for these two properties. In 4.0 this worked fine as you have set these to the default values (10) and thus these settings do not differ on both endpoints. But in 4.5 these are left as 10 for netTcp endpoint, but computed as 12* ProcessorCount. So the exception.

    To solve this issue there are 2 ways:

    1. Remove these settings (listenBackLog and MaxConnections) from the config. In this way you will get a default of 12 * Processor count automatically which is > than 4.0 defaults.
    2. Follow the work around of configuring mex endpoint on a different port as described in documentation

    Please check out this blog for more details.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have recently installed the new Azure development tools for Visual Studio 2010 service
I've recently installed VS2008 on a new machine, and now find that it will
We recently built a new dev server for flex builder and installed coldfusion 8.
I have a headless workstation running Ubuntu 12.04 server and recently installed new Tesla
I recently installed the new Windows Mobile 6.5.3 SDK upgrading my old Windows Mobile
I recently installed the Mono Framework, .net 3.5 f/w and MonoDevelop (hint: I'm trying
I'm fairly new to the Spring framework. I have recently installed SpringSource Tool Suite
I recently installed Visual Studio 11 Beta with .Net Framework 4.5 on mine production
Recently installed new wordpress theme. The problem is, there are only following font options
I recently installed Zend Studio 9 and created a Zend Framework project. In the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.