question

LngVi-4276 avatar image
LngVi-4276 asked ·

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

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-webapps-development
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ryanchill avatar image
ryanchill answered ·

Hi @LngVi-4276,

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://docs.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://docs.microsoft.com/en-us/azure/app-service/deploy-ftp#deploy-files-to-azure for more information.

Hope this helps.

Regards,
Ryan

Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.