If all else fails you could always call CreateNamedPipe
via P/Invoke, specifying the default timeout you want just as you did in your Win32 server, and then use the NamedPipeServerStream
ctor overload which takes a SafePipeHandle
, to wrap it.
The rest of your .NET server code wouldn't need to change.