![](/img/trans.png)
[英]Why does my window form look different when I run the program in Visual Studio?
[英]Why does Visual Studio compile my HTTP server app to run on port 5001 when I set it to 443/80?
是否有与launchsettings.json 不同的地方我需要设置applicationUrl?
这是启动设置
"applicationUrl": "https://127.0.0.1:443;http://127.0.0.1:80"
开发过程中使用的
launchSettings.json<\/code> ,例如,从 Visual Studio 运行或使用
dotnet run<\/code>命令。
如果你想在运行编译后的 exe 时配置 URL,可以添加:
"Kestrel": {
"Endpoints": {
"Http": {
"Url": "http://127.0.0.1:80"
},
"Https": {
"Url": "https://127.0.0.1:443"
}
}
}
配置文件
launchSettings.json<\/code>仅在少数地方使用,例如
https:\/\/docs.microsoft.com\/en-us\/aspnet\/core\/fundamentals\/servers\/kestrel\/endpoints?view=aspnetcore-6.0#url-prefixes<\/a>
您还可以为 Kubernetes 使用配置
Kestrel__EndPoints__Http__Url : http://+:80
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.