Skip to content

Conversation

@Rick-Anderson
Copy link
Contributor

@Rick-Anderson Rick-Anderson commented Feb 4, 2025

@Rick-Anderson
Copy link
Contributor Author

@JamesNK please review these changes CoPilot made to your code.


### Customize Kestrel named pipe endpoints

Kestrel's named pipe support includes advanced customization options. The [CreateNamedPipeServerStream](/dotnet/api/microsoft.aspnetcore.server.kestrel.transport.namedpipes.namedpipetransportoptions.createnamedpipeserverstream) property on the named pipe options allows pipes to be customized per-endpoint.

This comment was marked as resolved.

@Rick-Anderson Rick-Anderson marked this pull request as ready for review February 5, 2025 20:39
@Rick-Anderson Rick-Anderson requested a review from JamesNK February 5, 2025 20:40
@Rick-Anderson
Copy link
Contributor Author

@JamesNK pls review

@JamesNK
Copy link
Member

JamesNK commented Feb 26, 2025

The code sample isn't complete in the preview:

image

The bottom CreatePipeSecurity method cuts off halfway through.

Can you suggest working code? I left the configuration to the reader. I could add a comment saying as much or you can provide working code.

options.CreateNamedPipeServerStream = (context) =>
{
var pipeSecurity = CreatePipeSecurity(context.NamedPipeEndpoint.PipeName);
var pipeOptions = PipeOptions.None; // Essential!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pipeOptions variable isn't used anywhere

@Rick-Anderson Rick-Anderson changed the title Kestrel named pipes Kestrel named pipes /n/1 Mar 1, 2025
@Rick-Anderson Rick-Anderson merged commit a135bea into main Mar 4, 2025
3 checks passed
@Rick-Anderson Rick-Anderson deleted the kestrel/named/pipes/n/1 branch March 4, 2025 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New .NET 9 feature: Customize Kestrel named pipe endpoints

3 participants