ASP.NETCORE WEB API路由不使用HTTPS

问题描述 投票:0回答:1

问题 为什么在我的ASP.NET Core Web API中仅使用

dotnet run

而不使用

http

我正在研究

练习 - 从ASP.NET团队中创建一个最小的API。根据本练习的第3个部分的第3项,

https命令的输出还应包括Scaffold a Project

路径,例如,

dotnet run但是,在我的Windows 10机器上,输出仅包括

https
路径(如下所示),尽管我首先运行了
https://localhost:7200
以信任自singing证书。
命令信任证书

http

输出
dotnet dev-certs https --trust

PS C:\Users\MyUserName> dotnet dev-certs https --trust Trusting the HTTPS development certificate was requested. A confirmation prompt will be displayed if the certificate was not previously trusted. Click yes on the prompt to trust the certificate. Successfully trusted the existing HTTPS certificate.

使用下面的命令可以解决该问题。

dotnet run

    
asp.net-core asp.net-core-webapi asp.net-web-api-routing
1个回答
0
投票
最新问题
© www.soinside.com 2019 - 2025. All rights reserved.