我正在一个解决方案中开发多个 asp.net core 应用程序,当我使用 IIS Express 在 Visual Studio 中运行该解决方案时,希望将它们放在相同的 url 和端口下。例如:
我尝试更改 lauchSettings.json 文件以使用相同的主机和 url,但随后出现服务器无法运行的错误。
有办法配置吗?
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:44369/App2",
"sslPort": 44369
}
},
"$schema": "http://json.schemastore.org/launchsettings.json",
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "api",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"App2": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "api",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:5001;http://localhost:5000"
}
}
}
Run Code Online (Sandbox Code Playgroud)