{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/3046","repository_url":"https://api.github.com/repos/Microsoft/vsts-tasks","labels_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/3046/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/3046/comments","events_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/3046/events","html_url":"https://github.com/Microsoft/vsts-tasks/issues/3046","id":187884477,"number":3046,"title":"Cannot use AppOffline rule on first deploy with virtual directory","user":{"login":"mclark1129","id":4752690,"avatar_url":"https://avatars.githubusercontent.com/u/4752690?v=3","gravatar_id":"","url":"https://api.github.com/users/mclark1129","html_url":"https://github.com/mclark1129","followers_url":"https://api.github.com/users/mclark1129/followers","following_url":"https://api.github.com/users/mclark1129/following{/other_user}","gists_url":"https://api.github.com/users/mclark1129/gists{/gist_id}","starred_url":"https://api.github.com/users/mclark1129/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mclark1129/subscriptions","organizations_url":"https://api.github.com/users/mclark1129/orgs","repos_url":"https://api.github.com/users/mclark1129/repos","events_url":"https://api.github.com/users/mclark1129/events{/privacy}","received_events_url":"https://api.github.com/users/mclark1129/received_events","type":"User","site_admin":false},"labels":[{"id":391088230,"url":"https://api.github.com/repos/Microsoft/vsts-tasks/labels/Area:%20Release","name":"Area: Release","color":"5319e7","default":false}],"state":"open","locked":false,"assignee":{"login":"Ajay-MS","id":16772764,"avatar_url":"https://avatars.githubusercontent.com/u/16772764?v=3","gravatar_id":"","url":"https://api.github.com/users/Ajay-MS","html_url":"https://github.com/Ajay-MS","followers_url":"https://api.github.com/users/Ajay-MS/followers","following_url":"https://api.github.com/users/Ajay-MS/following{/other_user}","gists_url":"https://api.github.com/users/Ajay-MS/gists{/gist_id}","starred_url":"https://api.github.com/users/Ajay-MS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ajay-MS/subscriptions","organizations_url":"https://api.github.com/users/Ajay-MS/orgs","repos_url":"https://api.github.com/users/Ajay-MS/repos","events_url":"https://api.github.com/users/Ajay-MS/events{/privacy}","received_events_url":"https://api.github.com/users/Ajay-MS/received_events","type":"User","site_admin":false},"assignees":[{"login":"Ajay-MS","id":16772764,"avatar_url":"https://avatars.githubusercontent.com/u/16772764?v=3","gravatar_id":"","url":"https://api.github.com/users/Ajay-MS","html_url":"https://github.com/Ajay-MS","followers_url":"https://api.github.com/users/Ajay-MS/followers","following_url":"https://api.github.com/users/Ajay-MS/following{/other_user}","gists_url":"https://api.github.com/users/Ajay-MS/gists{/gist_id}","starred_url":"https://api.github.com/users/Ajay-MS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ajay-MS/subscriptions","organizations_url":"https://api.github.com/users/Ajay-MS/orgs","repos_url":"https://api.github.com/users/Ajay-MS/repos","events_url":"https://api.github.com/users/Ajay-MS/events{/privacy}","received_events_url":"https://api.github.com/users/Ajay-MS/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2016-11-08T02:19:30Z","updated_at":"2016-12-07T04:49:30Z","closed_at":null,"body":"I believe this issue is similar to the one reported in Microsoft/vsts-rm-extensions#55.  When I try to deploy an application to a virtual directory for the first time, and I want to use the AppOffline rule, the task fails with the following error message:\r\n\r\n> Error: Could not find a part of the path 'D:\\home\\site\\wwwroot\\v1\\App_Offline.htm'.\r\n\r\nIf I run the task first without this rule, or manually create the virtual directory on the app service, the task succeeds.  I think that the task needs to manually create the directory if it doesn't already exist before running the msdeploy task so that the AppOffline rule will work."},"comment":{"url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/comments/265355224","html_url":"https://github.com/Microsoft/vsts-tasks/issues/3046#issuecomment-265355224","issue_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/3046","id":265355224,"user":{"login":"Ajay-MS","id":16772764,"avatar_url":"https://avatars.githubusercontent.com/u/16772764?v=3","gravatar_id":"","url":"https://api.github.com/users/Ajay-MS","html_url":"https://github.com/Ajay-MS","followers_url":"https://api.github.com/users/Ajay-MS/followers","following_url":"https://api.github.com/users/Ajay-MS/following{/other_user}","gists_url":"https://api.github.com/users/Ajay-MS/gists{/gist_id}","starred_url":"https://api.github.com/users/Ajay-MS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ajay-MS/subscriptions","organizations_url":"https://api.github.com/users/Ajay-MS/orgs","repos_url":"https://api.github.com/users/Ajay-MS/repos","events_url":"https://api.github.com/users/Ajay-MS/events{/privacy}","received_events_url":"https://api.github.com/users/Ajay-MS/received_events","type":"User","site_admin":false},"created_at":"2016-12-07T04:49:30Z","updated_at":"2016-12-07T04:49:30Z","body":"@mclark1129 \r\n\r\nCreation of physical path corresponding to virtual application is a creation operation corresponding to webapp. Since main functionality of task is to do deployment as per spec we will not be able to include creation of physical path for virtual application as part of this task. **Azure App Service Deploy**  assumes website or virtual application(along with physical path should already exist). If in future there will be any task for webapp creation we will include physical path creation as part of that.\r\n\r\nSecond, Since physical path for a virtual application doesn't exist. It means deployment to virtual application is happening for first time. For first time deployment taking app_offline doesn't make much significance.\r\n\r\nFor now you can check following workarounds - \r\n1. Create physical path for virtual application from azure portal before deployment.\r\n2. Don't select app_offline for first time deployment."}}
{"actor":{"display_login":"Ajay-MS"}}