Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UseUrls and Minimal APIs #4

Closed
wants to merge 1 commit into from
Closed

Conversation

johnkors
Copy link

@johnkors johnkors commented Sep 7, 2021

Hi,

Weird way of asking, sorry about that. But shouldn't this resolve to port 8080? For me, it just binds to the default port 5000.

➜  TodoApi git:(main) ✗ docker run -v $(pwd):/out mcr.microsoft.com/dotnet/sdk:6.0 dotnet run --project /out
Building...
info: Microsoft.Hosting.Lifetime[14]
      Now listening on: http://localhost:5000
info: Microsoft.Hosting.Lifetime[0]
      Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
      Hosting environment: Development
info: Microsoft.Hosting.Lifetime[0]
      Content root path: /out
 TodoApi git:(main) docker run -v $(pwd):/out mcr.microsoft.com/dotnet/sdk:6.0 dotnet --info            
.NET SDK (reflecting any global.json):
 Version:   6.0.100-preview.7.21379.14
 Commit:    22d70b47bc

Runtime Environment:
 OS Name:     debian
 OS Version:  11
 OS Platform: Linux
 RID:         linux-x64
 Base Path:   /usr/share/dotnet/sdk/6.0.100-preview.7.21379.14/

Host (useful for support):
  Version: 6.0.0-preview.7.21377.19
  Commit:  91ba01788d

.NET SDKs installed:
  6.0.100-preview.7.21379.14 [/usr/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.0-preview.7.21378.6 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.0-preview.7.21377.19 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Edit: Found the app.Run(urls) to work as expected, so I guess a minor bug in the WebHost APIs for now.

- builder.WebHost.UseUrls("http://*:8080");
+ app.Run("http://*:1333");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants