-
I strugle with getting correct endpoint. I have the following setup:
I have plugin for Grafana that calls keycloak to get bearer token to access my api. To get keycloak adress I call |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Show your app host code. Currrrently container to container networking required some understanding of the APIs. That will improve in Aspire 9, but I can show you how to make it work. |
Beta Was this translation helpful? Give feedback.
Sorry for taking so long to respond. This is a tricky topic as we attempt to do some magic under the covers to make sure things "just work" in the default case of passing an endpoint reference or passing a connection string via WithReference.
When you get an
EndpointReference
(viaresource.GetEndpoint
), it has no idea what the URL is or is going to be until the app host starts up. That's why you see exceptions about the endpoint not being allocated when you try to resolve the Url during startup. This is why there's an environment variable callback. It will run after the endpoints have been allocated and you can access various properties.When we detect a container to host reference when r…