我做了以下编辑launchStingSettings.json在Windows上,它没有窍门。目前这是在Visual Studio 2017 RC中唯一的方法。
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:50183/",
"sslPort": 44318
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "https://localhost:44318",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"corePostgresIdentity": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:44318"
}
}
}
我更新了我的launchSettings.json来匹配你的,但项目仍在启动原来的端口是5000,而不是50183.上如果我把'的https://本地主机:44318'到地址栏中,我的浏览器说它无法连接到服务器。不知道它从哪里得到5000,重新启动VS Code没有帮助。必须有一些我缺少的东西。 –
我不确定,对不起。也许试着去看看https://docs.microsoft.com/en-us/aspnet/core/tutorials/your-first-mac-aspnet。此外,搜索解决方案中的所有文件“5000”,它必须在某处。 –
对于将来可能有此问题的任何人 - 如果您还使用WebListener(https://docs.microsoft.com/zh-cn/aspnet/core/fundamentals/servers/weblistener),那么它将侦听端口5000并忽略您的launchSettings.json配置。 – jacobappleton