Unable to start Kestrel. System.Net.Sockets.SocketException (13): Permission denied

7/5/2020
Back to List

Problem

When running a ASP.NET Core application as a non-root user, Kestrel fails to bind to port 80 and 443.

Unable to start Kestrel. System.Net.Sockets.SocketException (13): Permission denied

Solution

To allow the app to bind to privelaged ports between 1 and 1023 run the following command, adjusting the path to the binary.

sudo setcap CAP_NET_BIND_SERVICE=+eip /path/to/binary

SuperChad
Gravatar About Sean Nelson
I like codes and stuff.

1 comments
Gravatar Fafcryday - 11/14/2024 9:46:32 PM
Improvement of cyclosporine A bioavailability by incorporating ethyl docosahexaenoate in the microemulsion as an oil excipient <a href=https://fastpriligy.top/>priligy</a>