Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I add a Service Reference with netTcpBinding in WCF?

Is it possible to add a service reference in visual studio, which generates the local proxy class to call the WCF service when using the netTcpBinding?

As I understood it, the service reference method requires a WSDL to be exposed by the service, which is only supported by the http bindings no?

Perhaps, could I add the service reference locally in development, but then switch the configuration to use nettcp at runtime in production?

The reason I am asking is because I am hosting in a windows service (server 2003, so no WAS, and can't use IIS). And we are unable to change the permissions to do the HTTP namespace reservation ... so we can't use the HTTP bindings. NetTcp works, but in this specific case the object graph we're passing back and forth involves objects generated in the service by an EDMX model ... so we can't share it in a contract assembly.

Thanks in advance!

like image 699
Joel Martinez Avatar asked Feb 25 '10 15:02

Joel Martinez


People also ask

What is Nettcpbinding in WCF?

Remarks. This binding generates a run-time communication stack by default, which uses transport security, TCP for message delivery, and a binary message encoding. This binding is an appropriate Windows Communication Foundation (WCF) system-provided choice for communicating over an Intranet.


1 Answers

Simply add a binding using mexTcpBinding.

like image 82
John Saunders Avatar answered Oct 06 '22 19:10

John Saunders