Skip to content

Failed to bind to address: address already in use #1615

Answered by salhidev
salhidev asked this question in Q&A
Discussion options

You must be logged in to vote

I was able to solve this using app.UsePathBase("/Authentication");
while making my swagger setup agnostic :

app.UseSwagger();
app.UseSwaggerUI(options => {
    options.SwaggerEndpoint("v1/swagger.json", "My API V1");
});
`.WithLaunchProfile("Authentication");`
Authentication profile in launchSettings.json

"Authentication": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "Authentication/swagger",
"applicationUrl": "https://localhost:7104;http://localhost:5280",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Local"
}
}

Replies: 12 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@salhidev
Comment options

Answer selected by salhidev
Comment options

You must be logged in to vote
5 replies
@DamianEdwards
Comment options

@paulomorgado
Comment options

@DamianEdwards
Comment options

@paulomorgado
Comment options

@jspaey
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication
5 participants
Converted from issue

This discussion was converted from issue #1592 on January 10, 2024 00:33.