named-pipes

provider: Named Pipes Provider, error: 40 – could not open a connection to SQL server.

孤人 提交于 2019-12-07 03:57:13
问题 I developed a .net application that depends on a sql server database, the database was on the local machine used for development of the application. When I moved the database to a remote machine and changed the connection string I got the following error: An error has occurred while establishing a connection to the server when connecting to SQL server 2005, this failure may be caused by the fact that under default settings SQL server does not allow remote connection. ( provider: Named Pipes

duplex operation between two processes using named pipes in c#

不想你离开。 提交于 2019-12-07 03:50:40
问题 I am trying to use named pipes to communicate between a server and a client process on the same machine. server sends a message to client, client does something with it and returns a result, and server is supposed to get the result. here is the code for server: using System; using System.IO; using System.IO.Pipes; class PipeServer { static void Main() { using (NamedPipeServerStream pipeServer = new NamedPipeServerStream("testpipe", PipeDirection.InOut)) { Console.WriteLine(

C# Sockets vs Pipes

无人久伴 提交于 2019-12-06 20:58:01
问题 Currently I am working on a multi-process desktop application on Windows. This application will be a shrink wrapped application which will be deployed on client machines across the world. While we can have broad specifications for the machines - e.g. Windows XP SP3 with .Net 4.0 CF, we wont have control over them and we cant be too specific on their configuration - e.g. we cannot specify the machine must have a cuda 1.4 capable graphic processor etc. Some of these processes are managed (.Net

How to call net.pipe (named pipe) WCF services while impersonating in a Windows Service

冷暖自知 提交于 2019-12-06 14:12:42
I am having an issue calling a WCF service over net.pipe with Windows impersonation from a C# Windows service. Background The service reads from a queue and creates children app domains, each running a particular module per the item pulled from the queue. We call the Windows service a “JobQueueAgent” and each module a “Job”. I will use these terms going forward. A job can be configured to run as a specified user. We use impersonation inside the job’s app domain to accomplish this. The following is the flow of logic and credentials in the service: JobQueueAgent (Windows Service – Primary User)

Get process ID of a client that connected to a named pipe server with C#

瘦欲@ 提交于 2019-12-06 14:11:21
问题 I'm not sure if I'm just not seeing it, or what? I need to know the process ID of a client that connected via a named pipe to my server from an instance of NamedPipeServerStream . Is such possible? In the meantime I came up with this function: [DllImport("kernel32.dll", SetLastError = true)] internal static extern bool GetNamedPipeClientProcessId(IntPtr Pipe, out UInt32 ClientProcessId); public static UInt32 getNamedPipeClientProcID(NamedPipeServerStream pipeServer) { //RETURN: // = Client

Async NamedPipes in case of multiple pipe server instances

馋奶兔 提交于 2019-12-06 13:56:54
I'm using code from this article with only difference that maxNumberOfServerInstances is set to -1 (number of server instances with the same pipe name is limited only by system resources) in NamedPipeServerStream constructor Async Listen Method [Listen Server Class]: class PipeServer { string _pipeName; public void Listen(string PipeName) { try { // Set to class level var so we can re-use in the async callback method _pipeName = PipeName; // Create the new async pipe NamedPipeServerStream pipeServer = new NamedPipeServerStream(PipeName, PipeDirection.In, -1, PipeTransmissionMode.Byte,

Correcting out of order printing from stream redirection

狂风中的少年 提交于 2019-12-06 13:37:47
问题 I have a python script that uses multiprocessing.pool.map to do some work. As it goes it prints things to stdout , for errors it prints to stderr . I decided it would be nice to have a separate log file for each of the streams and after a bit of thinking worked out that I should run it like this: time ./ecisSearch.py 58Ni.conf 4 1 > >(tee stdout.log) 2> >(tee stderr.log >&2) This gives me the log files and preserves the output on the appropriate streams. However here comes the problem. If I

Can't do blocking read from named pipe (FIFO) in Linux

泪湿孤枕 提交于 2019-12-06 13:37:10
It is very weird that I can't seem to make this work. This is my architecture: I have a named pipe which will communicate between a always-running root reader process and multiple application writer processes. The reader process has to be blocking while the writers are nonblocking . Therefore this is what I do in the reader process which will run with root privilege. reader.c #define PIPE_ID "/dev/shm/mypipe" // This function configures named pipe void configure_pipe() { // So that others can write umask(0000); if(mkfifo(PIPE_ID, S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH | S_IWGRP | S_IWOTH) != 0)

simple IPC mechanism for C#/WPF application to implement app CLI

て烟熏妆下的殇ゞ 提交于 2019-12-06 12:05:23
问题 So I've been reading lots about interprocess communication on .Net. Named pipes, remoting. It all seems great but possibly overkill for what I need to do. I want to add a command line interface to my WPF application, so I need a simple IPC mechanism to send the string from one process to the already running app. What does SO recommend for doing so? 回答1: NamedPipeClientStream and NamedPipeServerStream are pretty simple. Here's a pretty simple example where IPC is used to pass command line

How do I connect to the VMware's pipe and receive debug information from the running OS?

柔情痞子 提交于 2019-12-06 11:34:45
问题 I'm trying to catch debug information from VMware. This might be an easy task because you can redirect all debug information from VMware's OS into the named pipe like is nicely described here. It works fine with WinDbg but I want to create my own application which will do exactly the same. So I've decided to connect to the named pipe provided by VMware and read from it. I'm able to connect to that named pipe but I'm getting meaningless result when reading from the pipe. I've simplified the