I have a an application which is middle ware between web API code and windows Service.
Now My 1st request i.e. from Web API to Middle Ware using WCF is working perfectly fine. but when i try for the next phase i.e. from middle layer to windows service code which also releases another service is not accessible. Following is the error i am getting.
There was no endpoint listening at http://192.168.1.222:8001/TerminalCommands that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
Below are the web config of both
Middel Ware service config
<configuration>
<system.servicemodel>
<bindings>
<basichttpbinding>
<binding name="BasicHttpBinding_TerminalControllerAPI" />
</basichttpbinding>
</bindings>
<client>
<endpoint address="http://192.168.1.222:8001/TerminalCommands">
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_TerminalControllerAPI"
contract="TerminalControllerCommandsSVC.TerminalControllerAPI"
name="BasicHttpBinding_TerminalControllerAPI" />
</endpoint></client>
<services>
<service behaviorconfiguration="QuickMessageServiceMEXBehavior" name="MaxiSwitch.API.SwitchCommands">
<endpoint address="service" binding="wsDualHttpBinding" contract="MaxiSwitch.API.ISwitchCommands" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseaddress="http://192.168.1.222:8002/TerminalControllerCommands" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<servicebehaviors>
<behavior name="QuickMessageServiceMEXBehavior">
<servicemetadata httpgetenabled="true" />
</behavior>
</servicebehaviors>
</behaviors>
</system.servicemodel>
<startup><supportedruntime version="v4.0" sku=".NETFramework,Version=v4.5" /></startup></configuration>
Server Config
<configuration>
<configsections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configsections>
<system.diagnostics>
<sources>
<source propagateactivity="true" name="System.ServiceModel" switchvalue="Warning,ActivityTracing">
<listeners>
<add type="System.Diagnostics.DefaultTraceListener" name="Default">
<filter type="" />
</add>
<add name="ServiceModelTraceListener">
<filter type="" />
</add>
</listeners>
</source>
<source name="System.ServiceModel.MessageLogging" switchvalue="Warning,ActivityTracing">
<listeners>
<add type="System.Diagnostics.DefaultTraceListener" name="Default">
<filter type="" />
</add>
<add name="ServiceModelMessageLoggingListener">
<filter type="" />
</add>
</listeners>
</source>
</sources>
<sharedlisteners>
<add initializedata="h:\ho projects\code data\consoleapplication1 - copy\consoleapplication1\app_tracelog.svclog">
type="System.Diagnostics.XmlWriterTraceListener, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
name="ServiceModelTraceListener" traceOutputOptions="Timestamp">
<filter type="" />
</add>
<add initializedata="h:\ho projects\code data\consoleapplication1 - copy\consoleapplication1\app_messages.svclog">
type="System.Diagnostics.XmlWriterTraceListener, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
name="ServiceModelMessageLoggingListener" traceOutputOptions="Timestamp">
<filter type="" />
</add>
</sharedlisteners>
</system.diagnostics>
<system.servicemodel>
<diagnostics>
<messagelogging logmalformedmessages="true" logmessagesattransportlevel="true" />
</diagnostics>
<services>
<service name="MaxiSwitch.API.WebTerminalCommand.TerminalControllerTerminalCommand" behaviorconfiguration="QuickMessageServiceMEXBehavior">
<endpoint address="service" binding="basicHttpBinding" contract="MaxiSwitch.API.WebTerminalCommand.ITerminalControllerTerminalCommand" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseaddress="http://192.168.1.222:8001/TerminalCommands" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<servicebehaviors>
<behavior name="QuickMessageServiceMEXBehavior">
<servicemetadata httpgetenabled="true" />
</behavior>
</servicebehaviors>
</behaviors>
</system.servicemodel>
<startup>
<supportedruntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>