Reputation: 337
Can I host a WCF Service using netTcpBinding which is accessible (please note i am asking about ACCESSIBLE means browsable) in the same machine (localhost) and not outside the localhost... not even intranet.
Upvotes: 0
Views: 837
Reputation: 337
As suggested by, Henk Holterman
NetNamedPipeBinding is the best approach when we host the service inside a loaalhost and the service requires just intra process communication like communication with another WCF in the same machine or say a .Net client present in the same machine...
Again, netNamedPipeBinding makes the communication faster because
1) Serialization takes place in binary format 2) unlike netTcpBinding where we communicate through a Port, netNamedPipebinding uses named pipes to communicate between process.
Thanks. Suraj
Upvotes: 0
Reputation: 2358
You can host WCF services by using IIS (only 7.0 or higher for net.tcp) or as windows service.
For IIS you should create site or web application and add binding with port for net.tcp protocol.
There is no difference between hosting on the localhost and on a remote computer.
In general, it is better to use NetNamedPipeBinding for local connection
Upvotes: 1
Reputation: 23290
This can also be done at hosting level (in IIS):
Doesn't matter how the service is setup, IIS won't allow access outside 127.0.0.1
EDIT: This feature is not available on IIS 5.1 (Windows XP). You're going to need a firewall, or check out IIS Express.
Upvotes: 2
Reputation: 1418
I should think so, as long as the port it's running on is not externally accessible (e.g. blocked by a firewall).
Upvotes: 3