{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/Hosting/issues/453","labels_url":"https://api.github.com/repos/aspnet/Hosting/issues/453/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Hosting/issues/453/comments","events_url":"https://api.github.com/repos/aspnet/Hosting/issues/453/events","html_url":"https://github.com/aspnet/Hosting/issues/453","id":113747497,"number":453,"title":"Make hosting configuration consistency","user":{"login":"davidfowl","id":95136,"avatar_url":"https://avatars.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},"labels":[{"url":"https://api.github.com/repos/aspnet/Hosting/labels/2%20-%20Working","name":"2 - Working","color":"CCCCCC"},{"url":"https://api.github.com/repos/aspnet/Hosting/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"pakrym","id":1697911,"avatar_url":"https://avatars.githubusercontent.com/u/1697911?v=3","gravatar_id":"","url":"https://api.github.com/users/pakrym","html_url":"https://github.com/pakrym","followers_url":"https://api.github.com/users/pakrym/followers","following_url":"https://api.github.com/users/pakrym/following{/other_user}","gists_url":"https://api.github.com/users/pakrym/gists{/gist_id}","starred_url":"https://api.github.com/users/pakrym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pakrym/subscriptions","organizations_url":"https://api.github.com/users/pakrym/orgs","repos_url":"https://api.github.com/users/pakrym/repos","events_url":"https://api.github.com/users/pakrym/events{/privacy}","received_events_url":"https://api.github.com/users/pakrym/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/aspnet/Hosting/milestones/18","html_url":"https://github.com/aspnet/Hosting/milestones/1.0.0-rc2","labels_url":"https://api.github.com/repos/aspnet/Hosting/milestones/18/labels","id":1371266,"number":18,"title":"1.0.0-rc2","description":null,"creator":{"login":"muratg","id":1808428,"avatar_url":"https://avatars.githubusercontent.com/u/1808428?v=3","gravatar_id":"","url":"https://api.github.com/users/muratg","html_url":"https://github.com/muratg","followers_url":"https://api.github.com/users/muratg/followers","following_url":"https://api.github.com/users/muratg/following{/other_user}","gists_url":"https://api.github.com/users/muratg/gists{/gist_id}","starred_url":"https://api.github.com/users/muratg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muratg/subscriptions","organizations_url":"https://api.github.com/users/muratg/orgs","repos_url":"https://api.github.com/users/muratg/repos","events_url":"https://api.github.com/users/muratg/events{/privacy}","received_events_url":"https://api.github.com/users/muratg/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":3,"state":"open","created_at":"2015-10-22T21:04:09Z","updated_at":"2015-11-10T08:47:45Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2015-10-28T05:37:47Z","updated_at":"2015-11-10T18:33:50Z","closed_at":null,"body":"Right now we have a mix of config keys supported by the Hosting library. These grew organically and are inconsistent:\r\n\r\n- Hosting:DetailedErrors - Show detailed errors for startup failures\r\n- server or Hosting:Server - Specify which servers\r\n- app or Hosting:App - Application where the startup is\r\n- ASPNET_ENV or Hosting:Environment - The environment to run as (Development, Production etc)\r\n- webroot - Webserver root, used by iis and static file servers\r\n\r\nThese values can be provided via `Microsoft.AspNet.Hosting.json` (soon to be `hosting.json`), command line options or environment variables.\r\n\r\nLinux only supports `_` as the separator for environment key separator so Hosting:Foo=1 turns needs to be specified as `export Hosting__Foo=1`.\r\n\r\nProposal:\r\n\r\n### Config file (Microsoft.AspNet.Hosting.json) \r\n\r\n```\r\n{\r\n   \"webroot\": \"wwwroot\",\r\n   \"server\" : \"Microsoft.AspNet.Server.Kestrel\",\r\n   \"app\": \"MyProjectReference\",\r\n   \"environment\": \"Development\",\r\n   \"detailedErrors\": true\r\n}\r\n```\r\n\r\n### Command Line Options\r\n\r\n`Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --webroot \"wwwroot\" --app \"MyProjectReference\" --environment \"Development\" --detailedErrors true`\r\n\r\nThe casing of `--detailedErrors` should really be `detailed-errors`, it's more unixy.\r\n\r\n### Environment variables\r\n\r\nThese are global enough that it makes sense to make them prefixed:\r\n\r\nPrefix=ASPNET\r\n\r\n```\r\nASPNET_WEBROOT=wwwroot\r\nASPNET_SERVER=Microsoft.AspNet.Server.Kestrel\r\nASPNET_APP=MyProjectReference\r\nASPNET_ENVIRONMENT=Development\r\nASPNET_DETAILED_ERRORS=true\r\n```\r\n\r\nPrefix=HOSTING\r\n\r\n```\r\nHOSTING_WEBROOT=wwwroot\r\nHOSTING_SERVER=Microsoft.AspNet.Server.Kestrel\r\nHOSTING_APP=MyProjectReference\r\nHOSTING_ENVIRONMENT=Development\r\nHOSTING_DETAILED_ERRORS=true\r\n```\r\n\r\nProblems, the low level hosting API (WebHostBuilder) lets users pass in IConfiguration directly, what values are we reading from this IConfiguration? Is it prefixed? Or should it assume the names are all top level? \r\n\r\nI'd vote for top level names. Meaning that the above env variables would need to be transformed."},"comment":{"url":"https://api.github.com/repos/aspnet/Hosting/issues/comments/155524421","html_url":"https://github.com/aspnet/Hosting/issues/453#issuecomment-155524421","issue_url":"https://api.github.com/repos/aspnet/Hosting/issues/453","id":155524421,"user":{"login":"Tratcher","id":1821173,"avatar_url":"https://avatars.githubusercontent.com/u/1821173?v=3","gravatar_id":"","url":"https://api.github.com/users/Tratcher","html_url":"https://github.com/Tratcher","followers_url":"https://api.github.com/users/Tratcher/followers","following_url":"https://api.github.com/users/Tratcher/following{/other_user}","gists_url":"https://api.github.com/users/Tratcher/gists{/gist_id}","starred_url":"https://api.github.com/users/Tratcher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tratcher/subscriptions","organizations_url":"https://api.github.com/users/Tratcher/orgs","repos_url":"https://api.github.com/users/Tratcher/repos","events_url":"https://api.github.com/users/Tratcher/events{/privacy}","received_events_url":"https://api.github.com/users/Tratcher/received_events","type":"User","site_admin":false},"created_at":"2015-11-10T18:33:50Z","updated_at":"2015-11-10T18:33:50Z","body":"@BillHiebert @rustd FYI"}}