title: How do you create Windows security descriptors in managed code?
body: <p>I have a named pipe that's created in a managed process. I have a 2nd process that tries to open a file handle to the named pipe, however the 2nd process is running under an lower privilege than the process that created the named pipe. My understanding is that I need to create the named pipe in the first process with a security descriptor like the one described in this MSKB article: <a href="http://support.microsoft.com/kb/813414" rel="noreferrer">http://support.microsoft.com/kb/813414</a></p>
  
  <p>The problem is that I am not sure how to do this in managed code, the KB article uses C++. Does anyone know of a way to create the named pipe so that it can be read and written to anonymously, preferably using a security descriptor? Lowering the privileges of the first process that created the named pipe is not an option, I need it to be running with high privileges.</p>