i get the following error when trying to start my service:
Could not start the Service: System.InvalidOperationException: This service has multiple endpoints listening at 'https://b2e.my.loc:8093/' which share the same initiating action 'http://localhost:8080/kestrel/AirService'. As a result, messages with this action would be dropped since the dispatcher would not be able to determine the correct endpoint for handling the message. Please consider hosting these Endpoints at separate ListenUris.
We got an application that is using a third party WSDL in order to search and book flight.
and we have another winform application that takes the generated reference.cs from the above wsdl
the idea is to create a "simulator" so instead of invoking the real WSDL we are actually invoking the simulator itself and generating the data we need (sort of mocking)
consider the following reference.cs file generated by the WSDL:
namespace FlightWCF
{
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
[System.ServiceModel.ServiceContractAttribute(Namespace = "", ConfigurationName = "FlightWCF.ISearch")]
public interface ISearch
{
[System.ServiceModel.OperationContractAttribute(Action = "http://localhost:8080/kestrel/AirService", ReplyAction = "*")]
FlightWCF.serviceResponse1 service(FlightWCF.serviceRequest1 request);
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
[System.ServiceModel.ServiceContractAttribute(Namespace = "", ConfigurationName = "FlightWCF.IReserve")]
public interface IReserve
{
[System.ServiceModel.OperationContractAttribute(Action = "http://localhost:8080/kestrel/AirService", ReplyAction = "*")]
FlightWCF.serviceResponse6 service(FlightWCF.serviceRequest6 request);
}
}
this is part of my app.config
<service name="MyFlightClass.ServiceFlight">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="basicSecureHttpBindingConfiguration" contract="FlightWCF.ISearch" />
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="basicSecureHttpBindingConfiguration" contract="FlightWCF.IReserve" />
</service>
and this is the service that is using the above code:
namespace MyFlightClass
{
class ServiceFlight : ISearch, IReserve
{
public FlightWCF.serviceResponse1 service(FlightWCF.serviceRequest1 request)
{
//DO SOMETHING
}
public FlightWCF.serviceResponse6 service(FlightWCF.serviceRequest6 request)
{
//DO SOMETHING
}
}
}
the problem is that both service uses that same "Action".
if i change the "Action" of one if them, it becomes unreachable.
and i can't find any data on how to configure a service with 2 endpoints that have different contracts but with the same action.
the suggestion "Please consider hosting these Endpoints at separate ListenUris" is unclear to me.