1

my code work good in my server but in azure app service i get this error "The operation has timed out." in the lineenter code here

 pipeStream.Connect(TimeOut);

my code

public void Send(string SendStr, string PipeName, int TimeOut = 1000)
    {
        try
        {
            NamedPipeClientStream pipeStream = new NamedPipeClientStream(".", PipeName, PipeDirection.Out, PipeOptions.Asynchronous);

            // The connect function will indefinitely wait for the pipe to become available
            // If that is not acceptable specify a maximum waiting time (in ms)
            pipeStream.Connect(TimeOut);
            Debug.WriteLine("[Client] Pipe connection established");

            byte[] _buffer = Encoding.UTF8.GetBytes(SendStr);
            pipeStream.BeginWrite(_buffer, 0, _buffer.Length, AsyncSend, pipeStream);
        }
        catch (TimeoutException oEX)
        {
            Debug.WriteLine(oEX.Message);
        }
    }
Yitzhak Weinberg
  • 2,324
  • 1
  • 17
  • 21

1 Answers1

0

After much work it solved my problem is almost completely http://stackoverflow.com/a/3478552/5996253

K DawG
  • 13,287
  • 9
  • 35
  • 66
Yitzhak Weinberg
  • 2,324
  • 1
  • 17
  • 21