Win10 HttpListener access denied exception solution

Problem Description

When starting httpListener.Start(); [System.Net.HttpListenerException](): {"Access Denied."} problem.

insert image description here

solution:

Run cmd with administrator privileges, enter: netsh http add urlacl url=http://+:7000/ user=Tester
Note: Tester is the computer name (2021.11.30 revision, Tester is the computer name is not rigorous enough, it should refer to the current login user name)

insert image description here

A successful addition appears.

Reference: HttpListener access denied exception in WIN7 solves C#

Guess you like

Origin blog.csdn.net/qq_39860954/article/details/115859647