HTTP Listener fails to initialize when lacking SeChangeNotifyPrivilege
This article provides a solution to an issue that HTTP Listener fails to initialize when user lacks SeChangeNotifyPrivilege.
Applies to: Windows Server 2016, Windows Server 2019
Original KB number: 4570992
Symptoms
When initializing a new HTTP Listener using the HttpInitialize
function or the .NET HttpListener
class, the operation fails and you receive this error message:
HttpInitialize failed with 5 ( -access denied)
Cause
This issue occurs when the account running the code lacks the SeChangeNotifyPrivilege privilege.
Workaround
Grant the Bypass traverse checking user right to the relevant account.
This privilege is granted to the Everyone group by default.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for