Charu
Charu

Reputation: 2749

Is it possible to connect to a WCF web service on premise from azure using Azure Service bus relays without changing WCF service

I have to add a Service Bus Endpoint in the WCF service in order to communicate with it from the AZure Service Bus using Relays.

Now I have few services in on-premise whose configuration I cannot change. Is it possible to communicate with those without adding a servicebus endpoint?

The one service that I have access to , I adding another service end point like this and its working

   <service name="Service.ProblemSolver">
        <endpoint contract="Service.IProblemSolver"
                  binding="netTcpBinding"
                  address="net.tcp://localhost:9358/solver"/>
        <endpoint contract="Service.IProblemSolver"
                  binding="netTcpRelayBinding"
                  address="sb://namespace.servicebus.windows.net/solver"
                  behaviorConfiguration="sbTokenProvider"/>
    </service>

But, is it possible without adding a new binding?

Upvotes: 0

Views: 435

Answers (1)

Will Shao - MSFT
Will Shao - MSFT

Reputation: 1207

As far as I known, If we want to expose our on-premise endpoints, there has two methods:

  1. Open the ports and firewall or NAT. At this situation,you can communicate with those service without adding a new endpoints. It is similar to directly expose your on-premise endpoints to internet. But I don't recommend to use it for security issue.

  2. Using Azure service bus service. However, you need to change your endpoints settings as your origin post(https://azure.microsoft.com/en-us/documentation/articles/service-bus-dotnet-hybrid-app-using-service-bus-relay/ ).

About your requirement, you could encapsulate your on-premise service into new WCF service with Azure Service Bus configuration settings if it is necessary

Upvotes: 1

Related Questions