WCF Relay already connected to a listener, but no listeners are connected?

442 Views Asked by At

I'm currently attempting to write two applications in C# - a client and a server - which connect to a WCF Relay I've got set up in Azure, but I'm getting a really strange error when I try to run either.

This is a brand new WCF Relay that I've set up which has no naming conflicts with anything else, but every time I try to open a connection to it as a listener with my service, it fails with this exception:

System.ServiceModel.AddressAlreadyInUseException: Address sb://[MY_RELAY].servicebus.windows.net/[MY_WCF_RELAY] is already in use by an existing listener with different settings.

And when I try to run my client application connecting to the same relay URL, I get this exception:

System.ServiceModel.FaultException: '50200: There are no listeners connected for the endpoint.

Kind of odd how there's already a listener connected, but at the same time no listeners are connected. I've even checked on the number of active connections to the relay, and it's never jumped past 0.

Anybody have any clue what might be going on here and how I could troubleshoot? Thanks!

1

There are 1 best solutions below

1
On

Please Check you might have configured a tenant with a service path of ./. Because of this, the root path was taken and then every tenant that tried to register would get the below error "Address sb://[namespace].servicebus.windows.net/[WCF Relay name] is already in use by an existing listener with different settings" .

Try to turn off the bad endpoint then all the other endpoint will able to work again.

If you creating a WCF Relay explicitly in the portal (or with NamespaceManager.CreateRelay[Async]) for this endpoint, If so, then you need the binding's IsDynamic == false. If you're not pre-creating the endpoint then the binding's IsDynamic must be true.