VS运行netcore api提示localhost证书不安全

问题

VS运行netcore api/web 提示localhost证书不安全,不是专用连接

处理方式

1.以管理员身份打开cmd(命令提示符)

# 清除旧证书
dotnet dev-certs https --clean
 
# 重新生成证书
dotnet dev-certs https

# 信任新证书
dotnet dev-certs https --trust

2.重新启动

a.关闭所有浏览器窗口,重新打开;
b.重启 Visual Studio 并重新运行项目

posted @ 2025-09-26 08:59  夏日凉风  阅读(15)  评论(0)    收藏  举报