NamedPipeClientStream Connect Fails when Invoked in the IIS Context RRS feed

  • Question

  • Our app (the named pipe server) runs in a console application. The code for creating the named pipe is as follows:

     NamedPipeServerStream stat_pipe =  new NamedPipeServerStream(Config.STATUS_PIPE_NAME, PipeDirection.InOut, 1);

    The named pipe client is running in IIS, a .Net Core API application. The pipe connection is in an [HttpGet] method in a class inherited from Controller.

    The code for creating the named pipe is as follows:

     NamedPipeClientStream stat_pipe =
          new NamedPipeClientStream(".", Config.STATUS_PIPE_NAME, PipeDirection.InOut, PipeOptions.Asynchronous,

    When the client tries to connect to the pipe, the following exception occurs:

    "Access to the path is denied."

    The code works when not running in the IIS context.


    Tuesday, June 4, 2019 12:52 PM

All replies

  • Hi msgraber57,

    Thank you for posting here.

    For your question is more relat5ed to IIS, you could post a new thread in IIS forum for suitable support.

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, June 5, 2019 5:33 AM