我是 ASP.NET core 新手,我正在尝试在我的计算机 (Windows 8.1) 上启动一个新的 ASP.NET core 应用程序。我正在关注https://learn.microsoft.com/en-us/aspnet/core/getting-started/?view=aspnetcore-3.1&tabs=windows上的教程(这是最基本的):
\n当我运行应用程序并在 Chrome 中导航到 https://localhost:5001/ 时,收到以下错误:
\n\n\n无法访问此站点\xe2\x80\x99
\n
\n位于 https://localhost:5001/ 的网页可能暂时无法访问,或者可能已永久移至新网址。
\nERR_HTTP2_INADEQUATE_TRANSPORT_SECURITY
对我来说,这感觉像是一个证书问题,所以我点击了“信任开发证书部分”下的链接,然后尝试通过以下方式删除并重新添加旧证书:
\ndotnet dev-certs https --clean\ndotnet dev-certs https --trust\nRun Code Online (Sandbox Code Playgroud)\n但这没有帮助。
\n运行 dotnet watch run 时,我没有看到任何错误。这是输出:
\nwatch : Started \ninfo: Microsoft.Hosting.Lifetime[0] \n Now listening on: https://localhost:5001 \ninfo: Microsoft.Hosting.Lifetime[0] \n Now listening on: http://localhost:5000 \ninfo: …Run Code Online (Sandbox Code Playgroud)