named-pipes

Expose a WCF Service through a Named Pipes binding

Intro: I successfully implemented a WCF Service hosted in a Windows Service a few days ago. The community here at StackOverflow helped me with the WSDL exposure here. I thank you once again. However recently I found out that there is another potential client for this service this time located on the same machine as the service and this ...

Why are pipes considered dangerous to use in Windows/unix/linux?

Why are pipes considered dangerous to use? What can be done to avoid these security issues? I'm mostly interested in Windows, but if you have other OS information, please provide. ...

What are the differences between pipes in Windows and Linux?

What are the differences between pipes in Windows and Linux? ...

How do you configure WCF to support FaultContracts where both the host and client are in the same process using a net.pipe?

I'm trying to create an in-process unit test for my service to client interactions using net.pipe binding. Like a good WCF service it uses FaultContractAttribute on service operations to expose possible faults (wrapped exceptions) to metadata. I would like to have the client and service endpoints configured thru XML (App.config). Howe...

C# 3.5 - Connecting named pipe across network

What is the correct way to setup a named pipe in C# across a network? Currently I have two machines, 'client' and 'server'. Server sets up its pipe in the following manner: NamedPipeServerStream pipeServer = new NamedPipeServerStream( "pipe", PipeDirection.InOut, 10, PipeTransmissionMode.Byte, PipeOptions.None) pip...

How do I synchronize two processes?

I have a single HW interface I want to use from two applications (processes) on the same workstation. The HW requires a single initialization call then either app uses the same function (in the same library) to do many transactions with the HW. So each app should act like this: main() // I don't know if another app already init'e...

Configuring SQL Native Client ODBC on the client computer?

We have an application where our clients are connecting to a SQL Server 2005 database - via a SQL Native Client ODBC data source. We are having some difficulties with the ODBC connection getting severed during program execution. After questioning a tech support person, he said that he had seen this type of error before, but they fixed th...

Timeout on a NamedPipe in C#

I have a couple of apps talking to each other, and I use a NamedPipe. But if the other app isn't available then the NamedPipe waits for ever to connect. It also doesn't support timeouts. What's the right way to do this? ...

Web service can't open named pipe - access denied

Hi All, I've got a C++ service which provides a named pipe to clients with a NULL SECURITY_ATTRIBUTES as follows: hPipe = CreateNamedPipe( lpszPipename, PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED, PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT, PIPE_UNLIMITED_INSTANCES, BUFSIZE, BUFS...

SQL Server 2005 - Enabling both Named Pipes & TCP/IP protocols?

We have a SQL Server 2005 database, and currently all our users are connecting to the database via the TCP/IP protocol. The SQL Server Configuration Manager allows you to "enable" both Named Pipes, and TCP/IP connections at the same time. Is this a good idea? My question is not whether we should use named pipes instead of TCP/IP, but a...

write to fifo/pipe from shell, with timeout

I have a pair of shell programs that talk over a named pipe. The reader creates the pipe when it starts, and removes it when it exits. Sometimes, the writer will attempt to write to the pipe between the time that the reader stops reading and the time that it removes the pipe. reader: while condition; do read data <$PIPE; do_stuff; done...

Strange intermittent SQL connection error, fixes on reboot, comes back after 3-5 days (ASP.NET)

For some reason every 3-5 days our web app loses the ability to open a connection to the db with the following error, the strange thing is that all we have to do is reboot the container (it is a VPS) and it is restored to normal functionality. Then a few days later or so it happens again. Has anyone ever had such a problem? I have notice...

Enumerating Named Pipes in Windows

I am having trouble connecting to a Named Pipe (in this case a fast cgi named pipe) According to MSDN, I should be using CreateFile() or CallNamedPipe() (flat C API, synchronous - no overlapped I/O) http://msdn.microsoft.com/en-us/library/aa363858(VS.85).aspx Yet I am getting INVALID_HANDLE_VALUE and when I GetLastError() it is zero!? ...

Should I even bother supporting anything but RESTful HTTP?

I'm developing a WCF-based API for my company's CRM software. In the future, it will be used to develop applications on multiple platforms. I know WCF provides named pipe, TCP, and HTTP transports, but should I bother with the complexity of supporting all three when everything seems to be using RESTful HTTP these days? ...

Communication between Windows service and applications in different user sessions

I have the following situation: Windows Server environment with multiple user sessions. Windows Service is listening on well known port. Tray application in each user session which is started automatically. Silverlight (SL) application is running in browser and communicating with Windows Service using sockets and predefined port. My...

Is there a standard command-line tool for unix for piping to a socket?

I have some applications, and standard Unix tools sending their output to named-pipes in Solaris, however named pipes can only be read from the local storage (on Solaris), so I can't access them from over the network or place the pipes on an NFS storage for networked access to their output. Which got me wondering if there was an analogo...

How do I perform a non-blocking fopen on a named pipe (mkfifo)?

If I have a program which creates and attempts to open a named pipe using mkfifo, how can I open a pipe for reading or writing without blocking? Specifically, I'm writing a C program which can be run with or without a gui (written in Java). In the C program, I successfully create the named pipes using mkfifo, however when I do FILE* i...

Are there repercussions to having many processes write to a single reader on a named pipe in posix?

I am writing a program for POSIX (OSX) where I will have many processes sending messages to one listener, who is essentially a logging thread. All of the processes are running in seperate programs, and using a single named pipe (FIFO) that many processes write to, but only a single process reads from is very tempting. Questions: 1) ...

It really looks like OS X has a bug when using poll() on a named pipe (FIFO)... can an expert confirm?

I'm been trying to poll from a set of named-pipes for a little while now and i keep getting an immediate response of POLLNVAL on any named pipe file descriptor. After finding this blog post about broken polling in OS X I'm pretty certain that this is a b-u-g bug in OS X. I'm already planning on switching my code to using UDP sockets, b...

Breaking ReadFile() blocking - Named Pipe (Windows API)

To simplify, this is a situation where a NamedPipe SERVER is waiting for a NamedPipe CLIENT to write to the pipe (using WriteFile()) The Windows API that is blocking is ReadFile() The Server has created the synchronous pipe (no overlapped I/O) with blocking enabled The client has connected, and now the server is waiting for some data....