How to add service URL for Aspire front end sample

Akash Prakash 0 Reputation points
2024-01-09T05:25:37.2133333+00:00

We created aspire sample with Core Web API backend localhost URL = [http://localhost:5192/] and Core front end localhost URL = [http://localhost:5039/] , In our front end we have added ServiceUrl="api/documenteditor/" to call backend service while we upload a document in a document edtor. But instead of "http://localhost:5192/api/documenteditor/" we getting "http://localhost:5039/api/documenteditor/" of frontend , so unable to send request to backend. How to configure the backend service that needs to add by default while uploading without hardcoded URL so that even we deployed it needs to update the deployed URL in the service URL? I have attached images of code.User's image

User's image

User's image

Developer technologies | ASP.NET | ASP.NET Core
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.