I just want to throw this out there.
If you want a survivable method for transferring data between two applications, you might consider using Mail Slots or even bringing in BizTalk or another message platform.
There are several things to consider:
- what happens if the server is rebooted or loses power?
- What happens if the server application becomes unresponsive?
- What happens if the server application is killed or goes away completely?
- What is the appropriate response of a client application in each of the above?
Each of those contexts represent a potential loss of data. If the data loss is unacceptable then named pipes is not the mechanism you should be using. Instead you need to persist the messages somehow.
Mail Slots, storing to a database, or even leveraging Biztalk can take care of the survivability of the message itself.
If 1 or 3 happens, then the named pipe goes away and must be recreated by a new instance of your server application. If #2 happens, then the pipe won't go away until someone either reboots the server or kills the server app and starts it again.
Regardless, the client application needs to handle the above issues. They boil down to connection failed problems. Depending on what the client does you might have it move into a wait state and let it ping the server every so often to see if it has come back again.
Without knowing the nature of the data and communication processes involved its hard to recommend a proper approach.