改成0.0.0.0
文件launchSettings.json
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:51632",
"sslPort": 44360
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "publisher/all",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"acc_ai": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "publisher/all",
"applicationUrl": "https://0.0.0.0:5001;http://0.0.0.0:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
从内部服务器转到 https://localhost:5001/news/all。
从公共互联网到 https://public_ip:5001/news/all。