1

I have a Named Pipe and It Works Fine While I access it using a Client which runs on My System

The Client tries to open the File using following code:

LPTSTR lpszPipename = TEXT("\\\\smyServerName\\pipe\\iPipe01"); 

      hPipe = CreateFile( 
         lpszPipename,   // pipe name 
         GENERIC_READ |  // read and write access 
         GENERIC_WRITE, 
         0,              // no sharing 
         NULL,           // default security attributes
         OPEN_EXISTING,  // opens existing pipe 
         0,              // default attributes 
         NULL);     


      if (hPipe != INVALID_HANDLE_VALUE) 
         break; 

      // Exit if an error other than ERROR_PIPE_BUSY occurs. 

      if (GetLastError() != ERROR_PIPE_BUSY) 
      {
         _tprintf( TEXT("Could not open pipe. GLE=%d\n"), GetLastError() ); 
         return -1;
      }

While Creating the Named Pipe I have used

lpszPipename = TEXT("\\\\.\\pipe\\iPipe01"); 

Instead of myServerName I have used .(Dot). I get GLE 5 (Access denied) while I run the client from another system.

1
  • Give the user account the required access rights on the server. Ask more questions about that at serverfault.com Commented Sep 8, 2010 at 11:45

2 Answers 2

1

First things first - check your permissions and firewall. Almost always, when something works locally but not on the network, it's permissions.

(Had this problem more times than I can count!)

Sign up to request clarification or add additional context in comments.

Comments

1

AFAIR there was a change of security of anonymous access to named pipes in Windows Vista.
When you want to open it (with write access) from the anonymous account, you may have to change the pipe's security attributes as described here.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.