Container service discovery #6048
Replies: 2 comments
-
I have a very similar problem. My example project, reproducing it: My question, on StackOverflow: Question is, what i am doing wrong? Other integrations seems to work, so it must be something more to this, than in the custom service example in the Aspire docs. |
Beta Was this translation helpful? Give feedback.
-
Remove the name. Named endpoints are referenced differently from the default "http"/"https" endpoints. More details here https://learn.microsoft.com/en-us/dotnet/aspire/service-discovery/overview |
Beta Was this translation helpful? Give feedback.
-
Good morning
I can't seem to get service discovery with containers to work and haven't been able to find documentation on this.
I have an image which I am able to run via. the apphost:
This starts the container as expected via podman

And I register an http client with
builder.Services.AddHttpClient<PDFTOIMAGEClient>( static client => client.BaseAddress = new("https+http://pdfToImage"));
but get a No such host is known. (pdftoimage:443)
What to do...
Small follow-up question that might be besides the aspire scope: How does this works when deploying this to say azure container apps. Is Aspire able to have my image be part of the deployment process and do the bindings between services as it is able to do for projects, databases, caches and such?
Help is appreciated!
Beta Was this translation helpful? Give feedback.
All reactions