{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/IISIntegration/issues/306","repository_url":"https://api.github.com/repos/aspnet/IISIntegration","labels_url":"https://api.github.com/repos/aspnet/IISIntegration/issues/306/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/IISIntegration/issues/306/comments","events_url":"https://api.github.com/repos/aspnet/IISIntegration/issues/306/events","html_url":"https://github.com/aspnet/IISIntegration/issues/306","id":191771474,"number":306,"title":"Add environment variables for external information","user":{"login":"Drawaes","id":16406969,"avatar_url":"https://avatars.githubusercontent.com/u/16406969?v=3","gravatar_id":"","url":"https://api.github.com/users/Drawaes","html_url":"https://github.com/Drawaes","followers_url":"https://api.github.com/users/Drawaes/followers","following_url":"https://api.github.com/users/Drawaes/following{/other_user}","gists_url":"https://api.github.com/users/Drawaes/gists{/gist_id}","starred_url":"https://api.github.com/users/Drawaes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Drawaes/subscriptions","organizations_url":"https://api.github.com/users/Drawaes/orgs","repos_url":"https://api.github.com/users/Drawaes/repos","events_url":"https://api.github.com/users/Drawaes/events{/privacy}","received_events_url":"https://api.github.com/users/Drawaes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-25T22:33:48Z","updated_at":"2016-11-25T22:39:31Z","closed_at":null,"body":"Is it possible to add environment variables to allow the hosted application to understand the external address that IIS is exposing for the hosted application. This information is available from the HttpContext.Request but only once you have a request. An example of how you can do this in a \"traditional asp.net\" application\r\n\r\nServerManager serverMgr = new ServerManager();\r\nSite site = serverMgr.Sites[\"YourSiteName\"];\r\nList<string[]> urls = new List<string[]>();\r\nforeach (Binding binding in site.Bindings)\r\n{\r\n    string bindingInfo = binding.BindingInformation;\r\n    string subString = bindingInfo.Substring(2, bindingInfo.Length - 2);\r\n    string[] adrs = subString.Split(':');\r\n    adrs[0] = \"localhost:\" + adrs[0];\r\n    urls.Add(adrs);\r\n}"},"comment":{"url":"https://api.github.com/repos/aspnet/IISIntegration/issues/comments/263029364","html_url":"https://github.com/aspnet/IISIntegration/issues/306#issuecomment-263029364","issue_url":"https://api.github.com/repos/aspnet/IISIntegration/issues/306","id":263029364,"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":"2016-11-25T22:39:31Z","updated_at":"2016-11-25T22:39:31Z","body":"This belongs in the new AspNetCoreModule repo."}}
{"actor":{"display_login":"Tratcher"}}