我做了以下編輯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