{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/Mvc/issues/6411","repository_url":"https://api.github.com/repos/aspnet/Mvc","labels_url":"https://api.github.com/repos/aspnet/Mvc/issues/6411/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Mvc/issues/6411/comments","events_url":"https://api.github.com/repos/aspnet/Mvc/issues/6411/events","html_url":"https://github.com/aspnet/Mvc/issues/6411","id":236942369,"number":6411,"title":"[Question] - hosting.json","user":{"login":"dazinator","id":3176632,"avatar_url":"https://avatars1.githubusercontent.com/u/3176632?v=3","gravatar_id":"","url":"https://api.github.com/users/dazinator","html_url":"https://github.com/dazinator","followers_url":"https://api.github.com/users/dazinator/followers","following_url":"https://api.github.com/users/dazinator/following{/other_user}","gists_url":"https://api.github.com/users/dazinator/gists{/gist_id}","starred_url":"https://api.github.com/users/dazinator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dazinator/subscriptions","organizations_url":"https://api.github.com/users/dazinator/orgs","repos_url":"https://api.github.com/users/dazinator/repos","events_url":"https://api.github.com/users/dazinator/events{/privacy}","received_events_url":"https://api.github.com/users/dazinator/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-06-19T16:08:21Z","updated_at":"2017-06-19T16:09:59Z","closed_at":null,"body":"I have just converted my project.json based solution from vs2015 to a vs2017 csproj based solution, and now I notice that the port that the executable serves the web app on has reverted to port 5000.\r\n\r\nIn startup.cs I add a json configuration file to configure the hosting:\r\n\r\n```\r\n\r\n var configRootBuilder = new ConfigurationBuilder();\r\n\r\n  configRootBuilder.SetBasePath(Directory.GetCurrentDirectory())\r\n                    .AddJsonFile(appSettingsPath)\r\n                    .AddJsonFile(hostingConfigPath, optional: true)\r\n ```\r\n\r\nthe `hosting.json` file looks like this:\r\n\r\n```\r\n{\r\n  \"server.urls\": \"http://localhost:57929;http://localhost:60001\"\r\n}\r\n\r\n```\r\n\r\nThis worked prior to the upgrade, however after the upgrade, when I run the solution:\r\n\r\n![image](https://user-images.githubusercontent.com/3176632/27294525-c16c488a-5511-11e7-90dc-217b50bebebc.png)\r\n\r\n\r\nWhat am I missing?\r\n\r\nOur deployment processes rely on updating this `hosting.json` file with hostname:port suitable for the environment, but now it is no longer having any affect.\r\n"},"comment":{"url":"https://api.github.com/repos/aspnet/Mvc/issues/comments/309488426","html_url":"https://github.com/aspnet/Mvc/issues/6411#issuecomment-309488426","issue_url":"https://api.github.com/repos/aspnet/Mvc/issues/6411","id":309488426,"user":{"login":"davidfowl","id":95136,"avatar_url":"https://avatars0.githubusercontent.com/u/95136?v=3","gravatar_id":"","url":"https://api.github.com/users/davidfowl","html_url":"https://github.com/davidfowl","followers_url":"https://api.github.com/users/davidfowl/followers","following_url":"https://api.github.com/users/davidfowl/following{/other_user}","gists_url":"https://api.github.com/users/davidfowl/gists{/gist_id}","starred_url":"https://api.github.com/users/davidfowl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidfowl/subscriptions","organizations_url":"https://api.github.com/users/davidfowl/orgs","repos_url":"https://api.github.com/users/davidfowl/repos","events_url":"https://api.github.com/users/davidfowl/events{/privacy}","received_events_url":"https://api.github.com/users/davidfowl/received_events","type":"User","site_admin":false},"created_at":"2017-06-19T16:09:59Z","updated_at":"2017-06-19T16:09:59Z","body":"`hosting.json` isn't special anymore. You can pass a configuration file to the code in your `Program.cs` via `IWebHostBuilder.UseConfiguration`"}}
{"actor":{"display_login":"davidfowl"}}