| <div class="vote"> </div> | <div class="post-text" itemprop="text"> I created a simple WCF service and hosted it in IIS by creating a new website. In Web.config file,I am providing bindings for http and net tcp. I created a console client and adding service reference. It generates two binding in client config - for http and for tcp. When I try to invoke the service using tcp, I get this error - An unhandled exception of type 'System.ServiceModel.EndpointNotFoundException' occurred in mscorlib.dll Additional information: There was no endpoint listening at net.tcp://agoel.extron.com/Service.svc that could accept the message. This is often caused by an incorrect address or SOAP action. when I run using Http endpoint , it works fine. Note - I am using Windows 10 OS, IIS 10.0 and WPAS\WAS (Windows Process Activation Service) are installed. I already enabled\checked HTTP Activation, TCP Activation in .Net framework in Windows features. And modified IIS server settings to include net tcp. My website Web.config file looks like <system.serviceModel><bindings><netTcpBinding><binding name="NewBinding0" portSharingEnabled="true"><security mode="None" /></binding></netTcpBinding></bindings><services><service behaviorConfiguration="My" name="WCFServiceOM.Service1"> <!-- the service name must match the configuration name for the service implementation. --><endpoint address="" binding="basicHttpBinding" contract="WCFServiceOM.IService1"/><endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/><endpoint binding="netTcpBinding" bindingConfiguration="NewBinding0" contract="WCFServiceOM.IService1" /><endpoint address="mexOM" binding="mexTcpBinding" contract="IMetadataExchange"/><host><baseAddresses><add baseAddress="net.tcp://localhost:8087/Service1" /><add baseAddress="http://localhost:7778/Service1"/></baseAddresses></host></service></services><behaviors><endpointBehaviors><behavior name="webBehanior"><webHttp/></behavior></endpointBehaviors><serviceBehaviors><behavior name="My"><!-- To avoid disclosing metadata information, set the values below to false before deployment --><serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/><!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information --><serviceDebug includeExceptionDetailInFaults="true"/></behavior></serviceBehaviors></behaviors> And my client App.Config look like <configuration><startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" /></startup><system.serviceModel><!--<bindings><netTcpBinding><binding name="NetTcpBinding_OM" /></netTcpBinding></bindings><client><endpoint address="net.tcp://localhost/servicemodelsamples/service.svc"
binding="netTcpBinding" bindingConfiguration="NetTcpBinding_OM"
contract="ServiceReference1.IService1" name="NetTcpBinding_OM1" /></client>--><bindings><basicHttpBinding><binding name="BasicHttpBinding_IService1" /></basicHttpBinding><netTcpBinding><binding name="NetTcpBinding_IService1"><security mode="None" /></binding></netTcpBinding></bindings><client><endpoint address="http://domainname.company.com:7777/Service.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService1"
contract="ServiceReference1.IService1" name="BasicHttpBinding_IService1" /><endpoint address="net.tcp://domainname.company.com/Service.svc" binding="netTcpBinding"
bindingConfiguration="NetTcpBinding_IService1" contract="ServiceReference1.IService1"
name="NetTcpBinding_IService1" /></client></system.serviceModel></div> |
↧
Problems with Hosting WCF service on IIS (Using WAS) for netTCP bindings?
↧