dotnet / docs-aspire

This repository contains .NET Aspire documentation.
https://learn.microsoft.com/dotnet/aspire
MIT License
73 stars 83 forks source link

Advanced networking/endpoint configuration #1382

Closed aaronpowell closed 1 month ago

aaronpowell commented 1 month ago

Describe the issue or suggestion

There are a lot of optional to the WithHttpEndpoint (and related) method which can be used to control various aspects of the networking stack.

Recently, I was attempting to host an external executable (the Azure SWA CLI) as an Aspire component, and it runs its own proxy which checks for the port availability before binding, but this failed as DCP already had the port bound. Upon discussions with an engineer from Aspire I learnt that we can set the isProxied property to false, then DCP doesn't proxy, and that worked.

This starts getting into the areas of advanced networking, how to configure multiple endpoints, how to read endpoint configurations, how to disable the DCP proxy feature,


Associated WorkItem - 288509

IEvangelist commented 1 month ago

We do discuss this a bit, but I suppose we could expand upon this area here:

https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/networking-overview#endpoint-extension-methods

What do you think @aaronpowell?

aaronpowell commented 1 month ago

Yep, that probably makes the most sense.