skip to Main Content

I created my first "ASP.NET Core Web API" project. From within Visual Studio I can deploy it to an Azure Web App (App Services) and I can test it successfully from within the Azure API Management instance.

I’m working on setting up an Azure DevOps pipeline for it that has an "Azure App Service Deploy" task. I can transfer all the files in the $(Agent.TempDirectory)WebAppContent directory (…objReleasenet8.0PubTmpOut on disk) to C:homesitewwwroot but that deployment won’t work; I’m getting 500 statuses in the API Management tests. Inspecting the deployments using the ….scm.azurewebsites.net tool I’m noticing that in the successful Visual Studio deployment the hostingstart.html file is present, after the Azure DevOps pipeline deployment it is missing. Is there in Azure DevOps some "Azure App Service Deploy" or "Visual Studio build" task argument that I can use to have that file generated? Or is my diagnosis wrong to start with?

2

Answers


  1. Chosen as BEST ANSWER

    I'd figured it out. Posting hoping that someone will use it.

    It has nothing to do with the hostingstart.html file in the subject.

    Browsing the ...scm.azurewebsites.net/DebugConsole/?shell=powershell site I've found the C:homelogfileseventlog.xml. The app could not start because of errors like this:

    'C:homesitewwwroot' hit unexpected managed exception, exception code = '0xe0434352'

    I'd google it and the problem was that I was trying to run a 64bit .Net 8 LTS app on .Net 6 LTS 32 bit Configuration (Web App -> Settings -> Configuration). I made them match and the Web API works now.


  2. Hostingstart.html is default generated file once you create new app service.

    Coming to deployment, you can deploy by either using "Azure App Service" task or drag and drop the files it doesn’t matter; what matter is where you’re dropping files and what files you are dropping with environment set up.

    In your app service you might have some configuration which is setting environment as read only. The configuration item is WEBSITE_RUN_FROM_PACKAGE app setting.

    You can also check deployment failure reason on .scm.azurewebsites.net by navigating to C:/home/site/deployments/log.xml and status.xml.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search