4

I have a build/release for a .Net Core WebApp that works on windows machines perfectly, however I want to be able to deploy the same codebase to Linux. I set up a build and release and am using the "Web App on Linux" to deploy to my Linux WebApp. I also made sure that the Runtime Stack(s) on BOTH the Build and on the WebApp are set to use .Net Core 2.2:

enter image description here

The builds and the release run perfectly, however once the deployment is complete the website goes to a 404 (replacing the default Azure startup HTML page). I've FTP'd into the WebApp and see that the files are deployed to the machine, however I see that there are multiple "wwwroot" folders:

enter image description here

The top "wwwroot" folder does contain the DLLs for my application so that is a good sign: enter image description here

Curiously I can get to the static files from my app such as the CSS, JS or the favicon if I navigate to /wwwroot/(filename) enter image description here

I am pretty sure I have everything set up properly so I am hitting a wall on things to try. I've never had issues like this deploying to Windows WebApps so I am sure there is a setting or something that I am unaware of or is missing from the documentation.

For further details on this issue here is my BUILD:

enter image description here

...and my RELEASE setup:

enter image description here

5
  • At least based on the Node.js tutorial, the folder structure is completely different, learn.microsoft.com/en-us/azure/app-service/containers/… and the .NET Core tutorial uses the Git deployment approach, learn.microsoft.com/en-us/azure/app-service/containers/… Commented Feb 10, 2019 at 17:44
  • 1
    Try and add "-r ubuntu.16.10-x64" to your publish arguments and run the build again. It should create a self-contained asp.net core app for linux and your artifact should contain all you need to be able to run it. Commented Feb 10, 2019 at 18:13
  • Thanks Marcus. I just tried that but got the same results. Commented Feb 10, 2019 at 19:47
  • 1
    Hi @INNVTV, I'm running into the same wall. Did you figure out what the problem was? Commented Mar 11, 2019 at 14:03
  • 2
    Hi @MariusBughiu No - I was spending too much time debugging that and opted to use a Windows server instead. I plan on coming back to this when I have some down time as I wanted to use Linux for cost savings and possibly to migrate to Kubernetes in the future. If I resolve this issue I will update this question. Please do the same if you resolve it first!!!! Commented Mar 11, 2019 at 16:06

1 Answer 1

5

I had a similar issue and the issue came down to how VS was publishing the zip vs Dev Ops. If you return to the Azure portal you will need to add a startup command specifying where your main DLL is located.

https://learn.microsoft.com/en-us/azure/app-service/containers/app-service-linux-faq#built-in-images

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.