我有一个基本的WebApi项目(微软天气预报示例)
当我在VS Code中打开并运行项目时,网页在现有的Firefox窗口中打开,我可以通过Postman执行查询。
当我在Visual Studio 2019中打开并运行项目时,单独的Firefox窗口打开,我无法访问localhost,原因如下:
Error: connect ECONNREFUSED 127.0.0.1:5000如何通过Visual Studio 2019访问运行项目的API?
发布于 2020-11-06 22:23:48
以下内容对我很有帮助:
=> =>属性Project调试:
设置App URL:https://localhost:44351/ (或您想要的任何端口)
启用SSL: True
web.config:
<environmentVariables>
<environmentVariable name="ASPNETCORE_HTTPS_PORT" value="44351" />
</environmentVariables>https://stackoverflow.com/questions/64692312
复制相似问题