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

dotnet-postgres - webapi "dotnet watch run" Failed to determine the https port for redirect. #110

Open
shanemwebster opened this issue Jan 25, 2023 · 1 comment

Comments

@shanemwebster
Copy link

When running "dotnet watch run" from the container terminal inside of a dotnet7 webapi template you get the below error.

How to reproduce

  1. Create new dev container for dotnet-postgres with no additional features.
  2. Open dev container terminal
  3. run dotnet new webapi -o testapi
  4. cd testapi
  5. run dotnet watch run
  6. Open browser and go to listed localhost address

You will then see the following error
warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3] Failed to determine the https port for redirect.

Base OS: Arch Linux

Docker Info:
Client:
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc., 0.9.1)
compose: Docker Compose (Docker Inc., 2.14.2)
scan: Docker Scan (Docker Inc., v0.1.0-271-g6c852fac62)

Server:
Containers: 2
Running: 2
Paused: 0
Stopped: 0
Images: 8
Server Version: 20.10.22
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: false
userxattr: false
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 9ba4b250366a5ddde94bb7c9d1def331423aa323.m
runc version:
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: default
cgroupns
Kernel Version: 6.1.7-1-MANJARO
Operating System: Manjaro Linux
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 23.26GiB
Name: shane-laptop
ID: W55L:GLVC:D6X5:WTRI:4UFT:WNKE:QLM3:763G:3CJW:JEEP:H2DE:6TKI
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false

@samruddhikhandale
Copy link
Member

Hi 👋

I was able to reproduce the same errors.

Hence, I tried to use another .NET project - webapp (created with dotnet new webapp -o test2). The dotnet watch run worked fine and the port forwarded URL also worked this time.

I suspect if the issue is with the wepapi project and not with the dev container/template. I think, it would be great to create an issue on the dotnet repo.

Let me know your thoughts.

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

No branches or pull requests

2 participants