如何解决IIS Express 端口 - 文件中的多个端口
愚蠢的问题,但我找不到它。为什么 IIS express 使用 2 个端口(下面的示例文件)。
其次,在这里的这个练习中,当我被要求设置一个应用程序时,它引用了 3007,我无法访问它。 https://docs.microsoft.com/en-us/learn/modules/identity-application-types/5-exercise-web-apps-call-apis
{
"iisSettings": {
"windowsAuthentication": false,"anonymousAuthentication": true,"iisExpress": {
"applicationUrl": "https://localhost:3007","sslPort": 3007
}
},"profiles": {
"IIS Express": {
"commandName": "IISExpress","launchbrowser": true,"environmentvariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},"IdentityWeb": {
"commandName": "Project","dotnetRunMessages": "true","applicationUrl": "https://localhost:5001;http://localhost:5000","environmentvariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
解决方法
iisSettings
用于运行 VS2019 或其他 Visual Studio 版本的 IDE。
IdentityWeb
(peojectname) 用于 dotnet 命令行。
官方文档: Development and launchSettings.json
这些只是项目根据运行环境的不同配置,无需纠结。
测试步骤。
-
在 vs2019 中删除
iisSettings
,然后更改属性,然后检查launchSettings.json
文件。之前删除的ssl端口是44316,那我们就删了。更改属性后,生成新的ssl端口。
现在,我们可以运行项目(我们需要重新启动 IDE [vs2019]),它工作正常。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。