{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/Hosting/issues/892","repository_url":"https://api.github.com/repos/aspnet/Hosting","labels_url":"https://api.github.com/repos/aspnet/Hosting/issues/892/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Hosting/issues/892/comments","events_url":"https://api.github.com/repos/aspnet/Hosting/issues/892/events","html_url":"https://github.com/aspnet/Hosting/issues/892","id":192103277,"number":892,"title":"ASPNet Core 1.01 App - Unable to start on Azure (HTTP 502.5) - Failed to start process with commandline '\"dotnet\" \\\\?\\D:\\home\\site\\wwwroot\\Esoterix.Modle.Portalweb.dll', ErrorCode = '0x80004005'","user":{"login":"tiefling","id":1827169,"avatar_url":"https://avatars.githubusercontent.com/u/1827169?v=3","gravatar_id":"","url":"https://api.github.com/users/tiefling","html_url":"https://github.com/tiefling","followers_url":"https://api.github.com/users/tiefling/followers","following_url":"https://api.github.com/users/tiefling/following{/other_user}","gists_url":"https://api.github.com/users/tiefling/gists{/gist_id}","starred_url":"https://api.github.com/users/tiefling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiefling/subscriptions","organizations_url":"https://api.github.com/users/tiefling/orgs","repos_url":"https://api.github.com/users/tiefling/repos","events_url":"https://api.github.com/users/tiefling/events{/privacy}","received_events_url":"https://api.github.com/users/tiefling/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-11-28T20:02:25Z","updated_at":"2016-12-09T18:48:40Z","closed_at":"2016-11-28T23:18:11Z","body":"I am trying to deploy an aspnet core app to Azure using VSTS release. This seems to have gone through OK but when I try to start up the app I am presented with the HTTP 502.5 error...\r\n\r\nCommon causes of this issue:\r\n\r\nThe application process failed to start\r\nThe application process started but then stopped\r\nThe application process started but failed to listen on the configured port\r\n\r\nTroubleshooting steps:\r\n\r\nCheck the system event log for error messages\r\nEnable logging the application process’ stdout messages\r\nAttach a debugger to the application process and inspect\r\n\r\nThere seems to be much written about IIS in this but not with Azure.\r\n\r\nI managed to find an event log which threw out some XML repeatedly logging...\r\n\r\n> Failed to start process with commandline '\"%LAUNCHER_PATH%\"\r\n> %LAUNCHER_ARGS%', ErrorCode = '0x80070002'.\r\n\r\nAfter more investigation I discovered that I needed to change the %LAUNCHER_PATH% and %LAUNCHER_ARGS% values myself. I've tried various changes to the web.config but no luck. My web.config now looks like this...\r\n\r\n    <?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n    <configuration>\r\n    \r\n      <!--\r\n        Configure your application settings in appsettings.json. Learn more at http://go.microsoft.com/fwlink/?LinkId=786380\r\n      -->\r\n    \r\n      <system.webServer>\r\n        <handlers>\r\n          <add name=\"aspNetCore\" path=\"*\" verb=\"*\" modules=\"AspNetCoreModule\" resourceType=\"Unspecified\"/>\r\n        </handlers>\r\n        <aspNetCore processPath=\"dotnet\" arguments=\"site\\wwwroot\\Esoterix.Modle.Portalweb.dll\" stdoutLogEnabled=\"true\" stdoutLogFile=\"LogFiles\\stdout\" forwardWindowsAuthToken=\"false\"/>\r\n      </system.webServer>\r\n    </configuration>\r\n\r\nThe paths are from the root of the Azure deployment which seems to work for the stdout log file path (I was getting errors reported with that) but not for the app itself. I'm still seeing the following error..\r\n\r\n    <Event>\r\n        <System>\r\n            <Provider Name=\"IIS AspNetCore Module\"/>\r\n            <EventID>1000</EventID>\r\n            <Level>0</Level>\r\n            <Task>0</Task>\r\n            <Keywords>Keywords</Keywords>\r\n            <TimeCreated SystemTime=\"2016-11-28T19:31:32Z\"/>\r\n            <EventRecordID>1514022203</EventRecordID>\r\n            <Channel>Application</Channel>\r\n            <Computer>RD0004FFD7108D</Computer>\r\n            <Security/>\r\n        </System>\r\n        <EventData>\r\n            <Data>Failed to start process with commandline '\"dotnet\" site\\wwwroot\\Esoterix.Modle.Portalweb.dll', ErrorCode = '0x80004005'.</Data>\r\n        </EventData>\r\n    </Event>\r\n\r\nWhich is repeated 4 times\r\n\r\nIf I look in my stdout output I have the following...\r\n\r\n> Failed to load the dll from [\\\\?\\D:\\home\\site\\wwwroot\\hostpolicy.dll],\r\n> HRESULT: 0x800700C1\r\n> \r\n> An error occurred while loading required library hostpolicy.dll from\r\n> [\\\\?\\D:\\home\\site\\wwwroot]\r\n\r\nIf I try running the exe directly with the web config here...\r\n\r\n    <?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n    <configuration>\r\n    \r\n      <!--\r\n        Configure your application settings in appsettings.json. Learn more at http://go.microsoft.com/fwlink/?LinkId=786380\r\n      -->\r\n    \r\n      <system.webServer>\r\n        <handlers>\r\n          <add name=\"aspNetCore\" path=\"*\" verb=\"*\" modules=\"AspNetCoreModule\" resourceType=\"Unspecified\"/>\r\n        </handlers>\r\n        <aspNetCore processPath=\"\\\\?\\%home%\\site\\wwwroot\\Esoterix.Modle.Portalweb.exe\" arguments=\"\" stdoutLogEnabled=\"true\" stdoutLogFile=\"\\\\?\\%home%\\LogFiles\\stdout\" forwardWindowsAuthToken=\"false\"/>\r\n      </system.webServer>\r\n    </configuration>\r\n\r\nThen my stdout gives me the following error...\r\n\r\n> Failed to load the dll from [\\\\?\\D:\\home\\site\\wwwroot\\hostfxr.dll],\r\n> HRESULT: 0x80070057\r\n> \r\n> The library hostfxr.dll was found, but loading it from\r\n> \\\\?\\D:\\home\\site\\wwwroot\\hostfxr.dll failed\r\n> \r\n>  - Installing .NET Core prerequisites might help resolve this problem.\r\n> \r\n>      http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/aspnet/Hosting/issues/comments/266090557","html_url":"https://github.com/aspnet/Hosting/issues/892#issuecomment-266090557","issue_url":"https://api.github.com/repos/aspnet/Hosting/issues/892","id":266090557,"user":{"login":"moozzyk","id":1438884,"avatar_url":"https://avatars.githubusercontent.com/u/1438884?v=3","gravatar_id":"","url":"https://api.github.com/users/moozzyk","html_url":"https://github.com/moozzyk","followers_url":"https://api.github.com/users/moozzyk/followers","following_url":"https://api.github.com/users/moozzyk/following{/other_user}","gists_url":"https://api.github.com/users/moozzyk/gists{/gist_id}","starred_url":"https://api.github.com/users/moozzyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moozzyk/subscriptions","organizations_url":"https://api.github.com/users/moozzyk/orgs","repos_url":"https://api.github.com/users/moozzyk/repos","events_url":"https://api.github.com/users/moozzyk/events{/privacy}","received_events_url":"https://api.github.com/users/moozzyk/received_events","type":"User","site_admin":false},"created_at":"2016-12-09T18:48:40Z","updated_at":"2016-12-09T18:48:40Z","body":"See: https://github.com/aspnet/Home/issues/1842#issuecomment-265951372"}}
{"actor":{"display_login":"moozzyk"}}