






















1、在 launchSettings.json 文件中修改成为 IIS Express 版本
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:32123",
"sslPort": 12321
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
},
"$schema": "https://json.schemastore.org/launchsettings.json"
}
2、如果不需要 https,可以将 sslPort 改为 0 即可。
3、如果需要 https,还需要执行以下脚本,为 sslPort 配置证书
& "C:\Program Files (x86)\IIS Express\IisExpressAdminCmd.exe" setupsslUrl -url:https://localhost:12321/ -UseSelfSigned
4、检查证书结果
netsh http show sslcert ipport=0.0.0.0:12321
5、应该就可以正常使用了。
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。