[MSDN Redirect] WebApp created on Linux OS always shows default Microsoft page

Lăng Vi 1 Reputation point
2020-02-19T17:52:31.64+00:00

Hello I have create Web app using following Config,

Publish: Code RunTime Stack: .NET Core 3.1(LTS) Operating System: Linux

I have created my website using React.js and working fine locally. I deployed on azure using FTP and when I hit https://{mywebappname}. chiasetatca.net, It shows me default page instead of my website home page.

Hey, .NET Core developers! Your app service is up and running. Time to take the next step and deploy your code.

I also check that wwwroot contain all my website files. Is there anything missing here? Why it is not showing my website's home page?

Help would be appreciated!

Best

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,831 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 25,476 Reputation points Microsoft Employee
    2020-02-22T01:20:14.83+00:00

    Hi @Lăng Vi ,

    I did run into the same issue you did when I created a reactjs app using create-react-app npm package. When I deployed the application to an Windows OS, the page came up as expected. Checking the log files, revealed .NET Core is running /defaulthome/hostingstart/hostingstart.dll, which makes sense because we're running a .NET Core on a Linux host and why we're getting that default page. To get around this, you can wrap your react app in a dotnet new react -o myapp as instructed in https://learn.microsoft.com/en-us/aspnet/core/client-side/spa/react?view=aspnetcore-3.1&tabs=visual-studio. But since .NET Core 3.1 hasn't been deployed to all regions, you're safer switching to .NET Core 3.0. If there's a new feature in 3.1 that your app requires, they you'll need to switch to a docker image.

    Also, bear in mind that FTP'ing your content to your web app doesn't execute package restoration. So you'll need make sure you create your necessary dependencies and config files before-hand and FTP along your with artifacts. See https://learn.microsoft.com/en-us/azure/app-service/deploy-ftp#deploy-files-to-azure for more information.

    Hope this helps.

    Regards,
    Ryan

    0 comments No comments