{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/Home/issues/1538","repository_url":"https://api.github.com/repos/aspnet/Home","labels_url":"https://api.github.com/repos/aspnet/Home/issues/1538/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Home/issues/1538/comments","events_url":"https://api.github.com/repos/aspnet/Home/issues/1538/events","html_url":"https://github.com/aspnet/Home/issues/1538","id":158298745,"number":1538,"title":"UseUrls with empty argument makes the web fail to startup","user":{"login":"andrew-vandenbrink","id":12871379,"avatar_url":"https://avatars.githubusercontent.com/u/12871379?v=3","gravatar_id":"","url":"https://api.github.com/users/andrew-vandenbrink","html_url":"https://github.com/andrew-vandenbrink","followers_url":"https://api.github.com/users/andrew-vandenbrink/followers","following_url":"https://api.github.com/users/andrew-vandenbrink/following{/other_user}","gists_url":"https://api.github.com/users/andrew-vandenbrink/gists{/gist_id}","starred_url":"https://api.github.com/users/andrew-vandenbrink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrew-vandenbrink/subscriptions","organizations_url":"https://api.github.com/users/andrew-vandenbrink/orgs","repos_url":"https://api.github.com/users/andrew-vandenbrink/repos","events_url":"https://api.github.com/users/andrew-vandenbrink/events{/privacy}","received_events_url":"https://api.github.com/users/andrew-vandenbrink/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-03T06:19:18Z","updated_at":"2016-06-03T07:09:01Z","closed_at":"2016-06-03T07:09:01Z","body":"```\r\npublic static void Main(string[] args)\r\n        {            \r\n                var host = new WebHostBuilder()\r\n                    .UseKestrel()\r\n                    .UseContentRoot(Directory.GetCurrentDirectory())\r\n                    .UseIISIntegration()\r\n                    .UseStartup<Startup>()\r\n                    .UseUrls(args)\r\n                    .Build();\r\n\r\n                host.Run();           \r\n        }\r\n```\r\n\r\nWith \"UseUrls(args)\"\r\nIt is possible to run the asp.net core with \"dotnet run http://localhost:{freePort}\"\r\n\r\nBut when you press F5 in visual studio, the web refuse to show up at all\r\n\r\nwhich makes me to have to code it this way..\r\n\r\n```\r\npublic static void Main(string[] args)\r\n        {\r\n            if (args.Length == 0)\r\n            {\r\n                var host = new WebHostBuilder()\r\n                    .UseKestrel()\r\n                    .UseContentRoot(Directory.GetCurrentDirectory())\r\n                    .UseIISIntegration()\r\n                    .UseStartup<Startup>()\r\n                    .Build();\r\n\r\n                host.Run();\r\n            }\r\n            else\r\n            {\r\n                var host = new WebHostBuilder()\r\n                    .UseKestrel()\r\n                    .UseContentRoot(Directory.GetCurrentDirectory())\r\n                    .UseIISIntegration()\r\n                    .UseStartup<Startup>()\r\n                    .UseUrls(args)\r\n                    .Build();\r\n\r\n                host.Run();\r\n            }\r\n        }\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/aspnet/Home/issues/comments/223506887","html_url":"https://github.com/aspnet/Home/issues/1538#issuecomment-223506887","issue_url":"https://api.github.com/repos/aspnet/Home/issues/1538","id":223506887,"user":{"login":"andrew-vandenbrink","id":12871379,"avatar_url":"https://avatars.githubusercontent.com/u/12871379?v=3","gravatar_id":"","url":"https://api.github.com/users/andrew-vandenbrink","html_url":"https://github.com/andrew-vandenbrink","followers_url":"https://api.github.com/users/andrew-vandenbrink/followers","following_url":"https://api.github.com/users/andrew-vandenbrink/following{/other_user}","gists_url":"https://api.github.com/users/andrew-vandenbrink/gists{/gist_id}","starred_url":"https://api.github.com/users/andrew-vandenbrink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrew-vandenbrink/subscriptions","organizations_url":"https://api.github.com/users/andrew-vandenbrink/orgs","repos_url":"https://api.github.com/users/andrew-vandenbrink/repos","events_url":"https://api.github.com/users/andrew-vandenbrink/events{/privacy}","received_events_url":"https://api.github.com/users/andrew-vandenbrink/received_events","type":"User","site_admin":false},"created_at":"2016-06-03T07:09:01Z","updated_at":"2016-06-03T07:09:01Z","body":"```\r\n var host = new WebHostBuilder()\r\n                    .UseKestrel()\r\n                    .UseContentRoot(Directory.GetCurrentDirectory())\r\n                    .UseUrls(args)\r\n                    .UseIISIntegration()\r\n                    .UseStartup<Startup>()                    \r\n                    .Build();\r\n\r\n                host.Run();\r\n```\r\n\r\nIt works, thanks."}}
{"actor":{"display_login":"andrew-vandenbrink"}}