Reputation: 23935
When deploying an ASP.NET 5 application to an Azure web site sometimes I get the pesky error:
ASP.NET 5 An error occurred while starting the application
From an answer to this this question I got from JRoppert that the destination directory on the web site had somehow become corrupt. I used the Kudu tools to delete the site directory and then did a rebuild (Continuous integration from Visual Studio Team Services) and the site starts correctly and works fine.
How can I delete the site directory when doing a build from Visual Studio Team Services?
Upvotes: 1
Views: 80
Reputation: 29966
Azure Web Site supports FTP Deployment. You can install FTP Uploader task and use it to deploy the build to your Azure Web Site. In the setting of FTP Uploader task, you can check "Delete old Files" options to delete the files/folders in web site directory before deployment.
Upvotes: 1