views:

215

answers:

2

I can't find a duplicate for this question, but I honestly hope I'm not the first to ask.

I have a WCF service that is sitting inside my LAN. For .NET clients on my lan, NetTcpBinding is the appropriate binding. However, one of my clients is a PHP web application. Is there any way to do this?

Update: I am well aware I can have multiple endpoints. I want to know if I can enjoy the speed, reduced network traffic and lack of latency of nettcp compared to wshttp from a php app.

It happens to be a PHP app running on windows so COM interop or .NET Interop would work. I'm wondering if there is a "native" solution, such a a pecl module or pear library.

+2  A: 

NetTcpBinding is intended "for WCF-to-WCF communication" only. (MSDN)

This binding uses a proprietary protocol to communicate, and it is not meant to be interoperable since it is optimized for WCF-to-WCF.

You could have different endpoints for your WCF service. Why don't you expose another endpoint with a binding that could be consumed easily from your php application? (like BasicHttpBinding or WebHttpBinding)

Daniel Vassallo
Meant to and able too are two different things. But I will review that document.
Justin Dearing
@Justin: You could have different endpoints for your WCF service. Why don't you expose another endpoint with a binding that could be consumed easily from your php application?
Daniel Vassallo
A: 

You can add another binding to an existing service endpoint. So why don't you just add a basichttp or wshttp binding in addition to the nettcpbinding. It is just a few lines in your config file and doesn't require any code change.

Pratik
I want the compactness, speed, and lack of latency that netTcp gives over http.Your suggestion is exactly what I do now.
Justin Dearing