1

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?

Community
  • 1
  • 1
Aran Mulholland
  • 23,555
  • 29
  • 141
  • 228

1 Answers1

1

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.

enter image description here

Eddie Chen - MSFT
  • 29,708
  • 2
  • 46
  • 60
  • I've had real drama's getting the dnx web sites to deploy and have been following this guide https://msdn.microsoft.com/en-us/library/vs/alm/build/azure/deploy-aspnet5 in order to get it to work. Basically it uses an Azure PowerShell task to deploy the web site. But I will give this a go as it looks like a simpler option. – Aran Mulholland May 17 '16 at 04:52