named-pipes

Can we host a Workflow Service as a Windows Service?

女生的网名这么多〃 提交于 2019-12-03 13:53:02
问题 I am working on a logging application that requires me to have a Workflow that is exposed as a Service (Workflow Service). We want to host it as a Windows Service (don't want to host workflow service as .svc file in IIS). Another reason for having it as windows service is to be able to communicate with the service through the Named pipes. Can we expose a Workflow Service through Named Pipes without hosting it in IIS? 回答1: Yep bep, you sure can. At least, I have accomplished as much with

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

a 夏天 提交于 2019-12-03 13:39:28
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. (assuming you're talking about Unix named pipes from the mention of 'c' and 'IPC'. Windows named pipes work somewhat differently) Anyone with permissions can write to a named pipe, so you have to be careful with permissions and locking (see flock() ). If an application trusts the input it's getting from the named pipe (which will usually be the case unless you explicitly build input validation into it) then a

WCF Multiple Apps using NetNamedPipe

半世苍凉 提交于 2019-12-03 12:34:37
问题 I am trying to run multiple WCF Service hosting apps on the same Machine. I want to run multiple Applications - not multiple services in one application. var host = new ServiceHost(typeof(MyClass1), new Uri[] { new Uri("net.pipe://localhost") }); host.AddServiceEndpoint(typeof(ISomeInterface), new NetNamedPipeBinding(), "FOO"); host.Open(); I change "FOO" for every app, but still can not start multiple Services. Guess its pretty simple, but im stuck :( Regards 回答1: Approaching it like this

How do I call a WCF method from c++ using Named pipes?

烈酒焚心 提交于 2019-12-03 12:01:14
UPDATE: Looking through the protocol here , I can't figure out what goes into the Unsized Envelope Record. I can't find any examples online. ORIGINAL: I have the following WCF service static void Main(string[] args) { var inst = new PlusFiver(); using (ServiceHost host = new ServiceHost(inst, new Uri[] { new Uri("net.pipe://localhost") })) { host.AddServiceEndpoint(typeof(IPlusFive), new NetNamedPipeBinding(NetNamedPipeSecurityMode.None), "PipePlusFive"); host.Open(); Console.WriteLine("Service is Available. Press enter to exit."); Console.ReadLine(); host.Close(); } } [ServiceContract] public

How to make a named pipe not busy after client has disconnected?

烂漫一生 提交于 2019-12-03 08:58:17
I use a named pipe and I want to reuse the same pipe on the server to allow connecting another client once the original client has disconnected. What I do is: server creates a pipe using CreateNamedPipe server writes data using WriteFile , and retries doing so as long as error ERROR_PIPE_LISTENING is returned (which is before any client is connected) clients connects using CreateFile client reads data client close pipe handle using CloseHandle at this point server gets error ERROR_NO_DATA when it attemps to write more data server disconnects the pipe using DisconnectNamedPipe , which I hoped

System.IO.Exception: Pipe is broken

我的未来我决定 提交于 2019-12-03 07:48:17
问题 I have two .NET applications that talk to each other over a named pipe. Everything is great the first time through, but after the first message is sent, and the server is going to listen again, the WaitForConnection() method throws a System.IO.Exception with message Pipe is broken. Why am I getting this exception here? This is my first time working with pipes, but a similar pattern has worked for me in the past with sockets. Code ahoy! Server: using System.IO.Pipes; static void main() { var

How can I control an interactive Unix application programmatically through Perl?

做~自己de王妃 提交于 2019-12-03 07:27:49
I have inherited a 20-year-old interactive command-line unix application that is no longer supported by its vendor. We need to automate some tasks in this application. The most troublesome of these is creating thousands of new records with slightly different parameters (e.g. different identifiers, different names). The records have to be created in sequence, one at a time, which would take many months (and therefore dollars) to do manually. In most cases, creating a record has a very predictable pattern of keying in commands, reading responses, keying in further commands, etc. However, some

Named Pipes - Asynchronous Peeking

寵の児 提交于 2019-12-03 06:23:38
I need to find a way to be notified when a System.IO.Pipe.NamedPipeServerStream opened in asynchronous mode has more data available for reading on it- a WaitHandle would be ideal. I cannot simply use BeginRead() to obtain such a handle because it's possible that i might be signaled by another thread which wants to write to the pipe- so I have to release the lock on the pipe and wait for the write to be complete, and NamedPipeServerStream doesnt have a CancelAsync method. I also tried calling BeginRead(), then calling the win32 function CancelIO on the pipe if the thread gets signaled, but I

is NetNamedPipeBinding safe?

只愿长相守 提交于 2019-12-03 05:30:53
I would like to know if netNamedPipeBinding is considered safe: On one hand NetNamedPipeBinding implements security only on the transport Layer and it uses NTLM ( source ) that is no longer recommended by Microsoft ( source ) On the other hand the Named Pipie is not accessible from a remote computer, and there is no way to eavesdrop on a particular open pipe instance being used to transfer data, or write data to it, unless one can obtain the handle to the specific instance concerned. This is the reason why I don't know what to think about the security of this solution. Chris Dickson You are

Sample on NamedPipeServerStream vs NamedPipeServerClient having PipeDirection.InOut needed

 ̄綄美尐妖づ 提交于 2019-12-03 03:45:35
问题 I'm looking for a good sample where NamedPipeServerStream and NamedPipeServerClient can send messages to each other (when PipeDirection = PipeDirection.InOut for both). For now I found only this msdn article. But it describes only server. Does anybody know how client connecting to this server should look like? 回答1: What happens is the server sits waiting for a connection, when it has one it sends a string "Waiting" as a simple handshake, the client then reads this and tests it then sends back