Is NetNamedPipeBinding binding guaranteed to work only on the same machine?

I've created a Windows Service that uses WCF for communications to it. The service should be used be called only from the same machine. If I can guarantee that there's no way to communicate with it from another machine, I can consider it secured.

Since I'm using communications on a single machine, I opted to used NetNamedPipeBinding. This bindings documentation says it's Optimized for on-machine communications, but does not give any guarantees.

My questions is, does NetNamedPipeBinding provide on-machine-only guarantees? If not what binding does, or how would you go implementing a custom bindings that does provide such guarantees?

Thanks, Asaf

Answers


Microsoft published the following on Choosing a Transport on MSDN:

When to Use the Named Pipe Transport

A named pipe is an object in the Windows operating system kernel, such as a section of shared memory that processes can use for communication. A named pipe has a name, and can be used for one-way or duplex communication between processes on a single machine.

When communication is required between different WCF applications on a single computer, and you want to prevent any communication from another machine, then use the named pipes transport. An additional restriction is that processes running from Windows Remote Desktop may be restricted to the same Windows Remote Desktop session unless they have elevated privileges.

That pretty much gives the desired guarantee.


I was reading text from Essential WCF - Chapter 4 (Bindings) and found following, which I am reproducing with only intent to help someone;

WCF Restricts the netNamedPipeBidning Binding to Local Machine Communication

Although it is possible to use named pipes to communicate across a network, WCF restricts the use to local machine communication. This means it can be used to ensure that your service is not available across a network. This is accomplished using two mechanisms:

a) the Network Security Identifier (SID: S-1-5-2) is denied access to the named pipe. b) the name of the named pipe is randomly generated and stored in shared memory so only clients running on same machine can access it.


NetNamedPipeBinding is only good for the local machine. See the chart at the post here for a good, methodical way to determine which type of binding to use.

Here's an external link that provides a more definitive answer than just-take-my-word-for-it.


Need Your Help

The result of stored procedure to a table, without creating the table manually in SQL Server

sql-server tsql stored-procedures sql-server-2000

What I need to do is, put the results of stored procedure (with lots of parameters) in to a table. Something like that: