Skip to content

Commit f0455ad

Browse files
committed
Kestrel named pipes
1 parent 56bcd67 commit f0455ad

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

aspnetcore/fundamentals/servers/kestrel/endpoints.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ Kestrel's named pipe support includes advanced customization options. The [Creat
591591

592592
This is useful, for example, in a Kestrel app that requires two pipe endpoints with different [access security](/windows/win32/ipc/named-pipe-security-and-access-rights). The `CreateNamedPipeServerStream` option can be used to create pipes with custom security settings, depending on the pipe name.
593593

594-
:::code language="csharp" source="~/fundamentals/servers/kestrel/endpoints/samples/KestrelNamedEP/Program.cs" highlight="7-23":::
594+
:::code language="csharp" source="~/fundamentals/servers/kestrel/endpoints/samples/KestrelNamedEP/Program.cs" highlight="7-23" id="snippet_1":::
595595

596596
:::moniker-end
597597

aspnetcore/fundamentals/servers/kestrel/endpoints/samples/KestrelNamedEP/Program.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// <snippet_1>
12
using System.IO.Pipes;
23
using System.Security.AccessControl;
34
using System.Security.Principal;
@@ -25,6 +26,10 @@
2526
static PipeSecurity CreatePipeSecurity(string pipeName)
2627
{
2728
var pipeSecurity = new PipeSecurity();
29+
// configure PipeSecurity object and return;
30+
31+
// </snippet_1>
32+
// This code to test preceding snippet compiles.
2833

2934
// Get the current process identity.
3035
var currentIdentity = WindowsIdentity.GetCurrent();

0 commit comments

Comments
 (0)