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.

2 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>
Gravatar cheap cytotec online - 11/28/2024 7:13:23 PM
For women under 35, diminished ovarian reserve can signal premature ovarian failure, which is when the ovaries stop functioning before age 40 see section below <a href=https://cytotec2buy.top/>generic of cytotec</a> Estimation of the dietary requirement for vitamin D in free living adults 64 y of age