在appsettings.json文件中增加以下节点
"Kestrel": {
"Endpoints": {
"Http": { "Url": "http://sdf.sdfgdf.com:8000" },
"HttpsInlineCertFile": {
"Url": "https://sdf.sdfgdf.com:8443",
//"SslProtocols": [ "Tls12", "Tls13" ],
//如果项目独立运行不托管在iis 取消下面注释
//"Certificate": {
// "Path": "c:\\TEMP\\sdf.sdfgdf.com.pfx",
// "Password": "x0sdf99d"
//}
}
}
},