title: can not Impersonate the permission in the NamedPipes if client and server are in the different machines
body: <p>I got the UnknownErrorException with error code 1346 for named pipe, the code as below
  (notes: the client and server are in different machines)</p>
  
  <p>server code:</p>
  
  <pre><code>public static void ReadFile()
  {
      string contents = File.ReadAllText(@"d:\123.txt");   &lt;-- exception
  }
  
  public static void Main()
  {    
      var pipe = new NamedPipeServerStream("testpipe", PipeDirection.InOut);
      while (true)
      {
          pipe.WaitForConnection();
          pipe.RunAsClient(ReadFile);
      }
  }
  </code></pre>
  
  <p>client code</p>
  
  <pre><code> NamedPipeClientStream pipeClient =
                  new NamedPipeClientStream("\\jachang-w1", "testpipe",
                      PipeDirection.InOut, PipeOptions.None,
                      TokenImpersonationLevel.Impersonation);
   pipeClient.Connect();
  </code></pre>
  
  <p>I have search the info from google, and found the error is  "ERROR_BAD_IMPERSONATION_LEVEL, Either a required impersonation level was not provided, or the provided impersonation level is invalid"</p>
  
  <p>but I have set TokenImpersonationLevel.Impersonation in the client, so server should be able access it. could someone tell me what wrong it is? and how should I do?</p>
  
  <p>Thanks</p>