named-pipes

NamedPipeClientStream throws UnauthorizedAccessException on Connect

大憨熊 提交于 2019-12-02 02:27:17
I have the same problem everyone else has when connecting a "write" pipe to a running service: UnauthorizedAccessException. I tried every solution and nothing can make it connect successfully. The scenario is having a low-integrity C#/WPF app running in system tray that gets notifications from a Windows Service using named pipes and can tell the service to cancel certain operations or wait for more data (which is why it needs a write pipe to the service). Reading from service's pipe works fine, and I am using two pipe objects (one from service to client and another from client to service). The

Why I'm getting trash on this pipe?

非 Y 不嫁゛ 提交于 2019-12-01 20:20:44
问题 I'm running a full-duplex server/client code I found on Oracle's website: When writing ./fd_client hahaha I get something like: HAHAHA0� $0 The upper case is OK (it's what the server it's supposed to return) but, how the hell do I avoid that trailing trash? fd_client.c #include <unistd.h> #include <stdio.h> #include <errno.h> #include <ctype.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <string.h> #include <stdlib.h> #include <string.h> #include <pthread.h>

C#: Asynchronous NamedPipeServerStream understanding

天涯浪子 提交于 2019-12-01 19:59:49
I was trying to find any good and clear example of asynchronous NamedPipeServerStream and couldn't find any suitable for me. I want to have NamedPipe Server which is asynchronously accept messages from clients. The client is simple and it's fine for me. But I can't find examples of server, or can't understand how it works. Now as I understand I need to create NamedPipeServerStream object. Let's do this: namedPipeServerStream = new NamedPipeServerStream(PIPENAME, PipeDirection.In, 1, PipeTransmissionMode.Byte, PipeOptions.Asynchronous, BUFFERSIZE, BUFFERSIZE); Seems to work. But I don't know,

C#: Asynchronous NamedPipeServerStream understanding

梦想的初衷 提交于 2019-12-01 19:59:45
问题 I was trying to find any good and clear example of asynchronous NamedPipeServerStream and couldn't find any suitable for me. I want to have NamedPipe Server which is asynchronously accept messages from clients. The client is simple and it's fine for me. But I can't find examples of server, or can't understand how it works. Now as I understand I need to create NamedPipeServerStream object. Let's do this: namedPipeServerStream = new NamedPipeServerStream(PIPENAME, PipeDirection.In, 1,

Why I'm getting trash on this pipe?

橙三吉。 提交于 2019-12-01 19:57:53
I'm running a full-duplex server/client code I found on Oracle's website: When writing ./fd_client hahaha I get something like: HAHAHA0� $0 The upper case is OK (it's what the server it's supposed to return) but, how the hell do I avoid that trailing trash? fd_client.c #include <unistd.h> #include <stdio.h> #include <errno.h> #include <ctype.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <string.h> #include <stdlib.h> #include <string.h> #include <pthread.h> #include "fullduplex.h" /* For name of the named-pipe */ int main(int argc, char *argv[]) { int wrfd, rdfd,

Inter-Process communication options

只愿长相守 提交于 2019-12-01 18:12:30
I need to subscribe inside one app for the event exposed by another app. I noticed that many people consider the using of WCF Named Pipes as the best practice. Am I right that if I choose WCF Named Pipes I'll have to use IIS? And by the way, what options do I have in general? jgauffin Named pipes are one of the fastest way to do IPC (inter-process communication) on the same machine. The have existed for a long while (was NT4 the first OS?) and not specific for WCF. I would however not use WCF/Named pipes through ASP.NET as IIS do not use named pipes for it's communication. that means that your

SQL Server Error “Named Pipes Provider: Could not open a connection to SQL Server [53]”

本秂侑毒 提交于 2019-12-01 16:12:34
I used to have a desktop application pointing to a Sybase database through an .ini file that had this connection string: CONNECTION_NAME = "DSN="Dna_Name";UID="User";PWD="Password"" It worked perfectly. A few days ago the database has been migrated to SQL Server 2008 R2 and I need to update the .ini file to redirect the new production server. I updated the connection string as follow: CONNECTION_NAME = "Provider=SQLNCLI10.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog="CatalogName";Data Source="Production_DNS"" But I'm getting the following error: Named Pipe Provider:

C++ Windows Asynch IO Named Pipe first message not received

旧城冷巷雨未停 提交于 2019-12-01 14:40:28
Modified code from Named Pipe Server Using Overlapped I/O https://msdn.microsoft.com/en-us/library/windows/desktop/aa365603(v=vs.85).aspx The server code is as follows: #include <windows.h> #include <stdio.h> #include <tchar.h> #include <strsafe.h> #include <iostream> #define CONNECTING_STATE 0 #define READING_STATE 1 #define INSTANCES 4 #define PIPE_TIMEOUT 5000 #define BUFSIZE 4096 typedef struct { OVERLAPPED oOverlap; HANDLE hPipeInst; TCHAR chRequest[BUFSIZE]; DWORD cbRead; TCHAR chReply[BUFSIZE]; DWORD cbToWrite; DWORD dwState; BOOL fPendingIO; } PIPEINST, *LPPIPEINST; BOOL

Can't use named pipe from C to communicate with shell script

你离开我真会死。 提交于 2019-12-01 12:53:29
I have a C program like so (copied from here ): #include <fcntl.h> #define PATH "testpipe" #define MESSAGE "We are not alone" int main() { int fd; mkfifo ( PATH, 0666 ); fd = open ( PATH, O_WRONLY ); write ( fd, MESSAGE, sizeof ( MESSAGE ) ); close ( fd ); unlink ( PATH ); return 0; } and a shell script like so: echo < testpipe Once I execute the C program, the echo statement returns, but We are not alone is not printed. I have also tried creating the pipe from the command line, and with mknod instead, and it makes no difference. Why is this not working? EDIT: A lot of people have pointed out

Setting named pipe security in a Domain

寵の児 提交于 2019-12-01 12:47:14
I have a server that I'm setting up over a named pipe. It works fine for administrators of the domain, but when I test the client on a normal user, it gives the exception "Access to path is denied". So here is what I'm trying to set the permissions to give access to all authenticated users in the domain. What am I doing wrong here? Server: NamedPipeServerStream pipeServer = new NamedPipeServerStream("message-generator", PipeDirection.InOut, pipeThreads, PipeTransmissionMode.Message, PipeOptions.None); PipeSecurity pipeSecurity = pipeServer.GetAccessControl(); pipeSecurity.AddAccessRule(new