I want to use netTcpBinding for my service. I have done everything which I think I should do in App.config file, but the problem is I'm not able to retrieve the metadata of that endpoint.
Please check if you have missed the configuration in IIS to let IIS support netTcpBinding. And if you want to discover service metadata in browser, you have to set httpGetEnabled to True and have used mexHttpBinding instead of mexTcpBinding in the web.config,
otherwise it will only be discoverable from within visual studio itself. For more details on how to configure wcf with nettcpbinding, please refer:
pankaj_rayal
Member
320 Points
101 Posts
Service Metadata on netTcpBinding
Dec 01, 2012 02:30 AM|LINK
Hi,
I want to use netTcpBinding for my service. I have done everything which I think I should do in App.config file, but the problem is I'm not able to retrieve the metadata of that endpoint.
Below is my code:
<?xml version="1.0" encoding="utf-8" ?> <configuration> <system.serviceModel> <services> <service name="OrdersServiceLibrary.OrdersService" behaviorConfiguration="ServiceBehavior"> <endpoint address="net.tcp://localhost:9000/OrdersService" binding="netTcpBinding" bindingConfiguration="tcpBinding" name="OrdersService_Tcp" contract="OrdersServiceLibrary.IOrdersService"/> <endpoint address="mex" contract="IMetadataExchange" binding="mexTcpBinding"/> <host> <baseAddresses> <add baseAddress="net.tcp://localhost:9001/"/> </baseAddresses> </host> </service> </services> <behaviors> <serviceBehaviors> <behavior name="ServiceBehavior"> <serviceMetadata httpGetEnabled="false"/> </behavior> </serviceBehaviors> </behaviors> <bindings> <netTcpBinding> <binding name="tcpBinding" receiveTimeout="00:00:10"/> </netTcpBinding> </bindings> </system.serviceModel> </configuration>Am I missing something?
Whenever i tried to hit net.tcp://localhost:9000/OrdersService, it give me an error that page cannot be displayed.
Please help
Thanks
Shailendra S...
Member
551 Points
145 Posts
Re: Service Metadata on netTcpBinding
Dec 01, 2012 11:25 AM|LINK
http://techaray.com/post/2012/10/29/The-remote-server-returned-an-error-%28415%29-Cannot-process-the-message-.aspx
www.techaray.com
Haixia Xie -...
Contributor
3031 Points
296 Posts
Microsoft
Re: Service Metadata on netTcpBinding
Dec 03, 2012 02:27 AM|LINK
Hi pankaj_rayal,
Please check if you have missed the configuration in IIS to let IIS support netTcpBinding. And if you want to discover service metadata in browser, you have to set httpGetEnabled to True and have used mexHttpBinding instead of mexTcpBinding in the web.config, otherwise it will only be discoverable from within visual studio itself. For more details on how to configure wcf with nettcpbinding, please refer:
#Configuring WCF Service with netTcpBinding
http://rohitguptablog.wordpress.com/2011/06/16/configuring-wcf-service-with-nettcpbinding/
Best Regards.
Feedback to us
Develop and promote your apps in Windows Store