WCF InvalidOperationException: A binding instance has already been associated to listen URI

Two endpoints (basic and mex) couldn't be on the same address. Add some specific address for one of them (or for both ones).

For example:

<endpoint name="mex" address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>

You're missing the address attribute from your metadata endpoint:

<endpoint name="mex" binding="mexHttpBinding" contract="IMetadataExchange" address="mex" />

Without it WCF thinks you want to host the mex endpoint at the same address.

Tags:

Wcf