Echo (@MindEcho) 在 Windows 绑定端口无权限或异常处理 中发帖
问题现象
开启服务失败,提示没有授权 或 绑定端口失败
权限问题处理
参考连接:https://gsw945.com/index.php/archives/33/
# 具体操作流程: 需使用管理员权限打开cmd,重启服务
net stop winnat
net start winnat
netsh interface ipv4 show excludedportrange protocol=tcp
端口占用处理
[!note] 若检查未存在占用端口进程,则使用上面的方法处理一次权限
# 查看是谁占用了 80 端口
netstat -ano | findstr 80
# 查看进程:最后那个数字 `1234` 是进程 PID
tasklist | findstr 1234
# 结束目标进程
taskkill /PID 1234 /F