named-pipes

How to lower integrity of WCF named pipe

点点圈 提交于 2019-12-19 03:22:24
问题 I have an Internet Explorer add-in, written in C#, which talks via a WCF named-pipe to a .NET desktop application. The desktop app creates the ServiceHost for the netNamedPipeBinding, and each instance of the IE add-in creates a ChannelFactory to talk to the app. Everything works fine under Windows XP, but an exception is thrown under IE's protected mode in Windows 7. System.ServiceModel.CommunicationException: Cannot connect to endpoint 'net.pipe://localhost/MyApp.MyID'. ---> System.IO

How to lower integrity of WCF named pipe

大憨熊 提交于 2019-12-19 03:22:22
问题 I have an Internet Explorer add-in, written in C#, which talks via a WCF named-pipe to a .NET desktop application. The desktop app creates the ServiceHost for the netNamedPipeBinding, and each instance of the IE add-in creates a ChannelFactory to talk to the app. Everything works fine under Windows XP, but an exception is thrown under IE's protected mode in Windows 7. System.ServiceModel.CommunicationException: Cannot connect to endpoint 'net.pipe://localhost/MyApp.MyID'. ---> System.IO

Named Pipe CreateFile() returns INVALID_HANDLE_VALUE, and GetLastError() returns ERROR_PIPE_BUSY

时光总嘲笑我的痴心妄想 提交于 2019-12-18 17:06:16
问题 I have written a class to handle named pipe connections, and if I create an instance, close it, and then try to create another instance the call to CreateFile() returns INVALID_HANDLE_VALUE , and GetLastError() returns ERROR_PIPE_BUSY . What's going on here? What can I do to insure the call to Connect() succeeds? PipeAsync A, B; A.Connect("\\\\.\\pipe\\test",5000); A.Close(); cout << GetLastError(); // some random value B.Connect("\\\\.\\pipe\\test",5000); cout << GetLastError(); // 231

Can Sql Server BULK INSERT read from a named pipe/fifo?

瘦欲@ 提交于 2019-12-18 16:45:20
问题 Is it possible for BULK INSERT/bcp to read from a named pipe, fifo-style? That is, rather than reading from a real text file, can BULK INSERT/bcp be made to read from a named pipe which is on the write end of another process? For example: create named pipe unzip file to named pipe read from named pipe with bcp or BULK INSERT or: create 4 named pipes split 1 file into 4 streams, writing each stream to a separate named pipe read from 4 named pipes into 4 tables w/ bcp or BULK INSERT The closest

How to flush a pipe using bash

[亡魂溺海] 提交于 2019-12-18 15:03:28
问题 I have a script that writes to a named pipe and another that reads from the pipe. Occasionally, when starting the script I have noticed that the contents of the pipe exist from a previous run of the script. Is there a way to flush out the pipe at the beginning of the script? 回答1: I think dd is your friend: dd if=myfifo iflag=nonblock of=/dev/null strace shows open("myfifo", O_RDONLY|O_NONBLOCK) and indeed doesn't even block on an empty fifo. 回答2: You can read from the pipe until it is empty.

C# UnauthorizedAccessException when enabling MessageMode for read-only named pipe (NamedPipeClientStream class)

折月煮酒 提交于 2019-12-18 12:59:10
问题 There's a problem with the NamedPipeClientStream class in .NET, in that you cannot create an instance of this class with PipeDirection.In , and then successfully change the ReadMode to PipeTransmissionMode.Message . Attempting to do so will raise an UnauthorizedAccessException . Although pipes would usually be used to communicate between processes, this simple example within a single process shows the problem: var pipeOut = new NamedPipeServerStream("SomeNamedPipe", PipeDirection.Out, 1,

Sockets vs named pipes for local IPC on Windows?

一曲冷凌霜 提交于 2019-12-18 11:50:52
问题 Are there any reasons for favoring named pipes over sockets for local IPC (both using win-api), effectiveness-wize, resource-wize or otherwise, since both behave very much alike (and likely to be abstracted by a similiar interface anyway), in an application that is likely to already use sockets for network purposes anyway? I can name at least the addressing issue: port numbers for sockets against filenames for pipes. Also, named pipes (AFAIK) won't alert the firewall (block/unblock dialog),

Using WCF's net.pipe in a website with impersonate=true

我只是一个虾纸丫 提交于 2019-12-18 06:55:19
问题 I'm trying to use WCF named pipes in a web site, and it's failing with errors: There was no endpoint listening at net.pipe://localhost/mypipename that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. and the InnerException: The pipe name could not be obtained for net.pipe://localhost/mypipename. and there is another inner exception giving an access denied message. My web site is using impersonation, and

Windows Named Pipe issue: Error code 233 alternates

久未见 提交于 2019-12-18 05:54:41
问题 I need help on my application I am making. It's a simple program that responds to command line parameters. If the application is invoked for the first time, it starts up as a pipe server (blocking, non-overlapped) on another thread devoted to it, while the main thread does something else. Now, the user can still invoke the application using the same application executable and command line parameters but since its not the first instance of the application, it passes the command line parameters

Concurrent read/write of named pipe in Java (on windows)

戏子无情 提交于 2019-12-17 19:30:48
问题 I'm trying to provide communication between a C# app and a Java app on windows using named pipes with the method described by v01ver in this question: How to open a Windows named pipe from Java? I'm running into a problem on the Java side because I have a reader thread constantly waiting for input on the pipe and when I try to write to the pipe from my main thread it gets stuck forever. final RandomAccessFile pipe; try { pipe = new RandomAccessFile("\\\\.\\pipe\\mypipe", "rw"); } catch