Azure Web App of nodejs application loads blank screen after deployment - node.js

I'm trying to learn to use the azure web app services to deploy a MEAN stack application.
I connected Web App deployments to a git repo and clicked deploy, which it appears to have done successfully.
When I load the webapp url in a browser, its a blank white screen.
How do I troubleshoot this scenario?

You should check if the correct ports are opened.
Good luck!

There are various steps for debugging Node.js web apps on Azure Web Apps here:
https://azure.microsoft.com/en-us/documentation/articles/web-sites-nodejs-debug/
Start off by enabling logging in your IISNode.yml file by setting loggingEnabled: true and devErrorsEnabled: true and seeing what the logs say.

I usually use KUDU to debug Node.js application on Azure Web Site (currently named Web Apps). I doubted this might because the root directory was incorrect, i.e. your website should be started under ~/your_project/app but in Azure it was launched under ~/your_project.
Here is a doc for KUDU. http://blogs.msdn.com/b/benjaminperkins/archive/2014/03/24/using-kudu-with-windows-azure-web-sites.aspx

Related

Azure Web App with Linux Logging not works

i try my first steps with Azure. I have upload a WebApp (Blazor WASM Serverhosted) on a Linux System. Now i want to see the logs. My application brokes on Azure on startup. Everything I have tried has not worked.
The logstream shows nothing.
The Monitoring/logs are disabled
I activate in Monitoring/App Service Logs the File System and go to FTP Folder and i don't find a log-folder or something like this
I hope for help to fix my App or Configuration on Azure
Still the issue can be available in github . You can achieve this by using below steps.
Steps provided here. And I am deployed in Linux app service
Now you can be able to view the logs in application insights
You can add/modify the custom logs as well by using the custom telemetry client.
Refer here for detailed information

Why can't I access my Azure website after successful deployment

I build a website with React and I deployed it on Azure. I build it and then deployed the build folder with vs code on Azure. The process is actually very easy using VS Code and the Azure extension. It is explained well here.
So far so good, everything worked fine. Now I needed to deploy the same app (the same build folder) but in another webApp. Basically, I needed to have separate versions of the app. So, I did the same things I did the first time (create webapp on Azure -> deploy with VS Code). However, I can't see my website when I go to the url. All I see is the default generated webapp, which is a dummy html page.
It looks something like this:
Hey, Node developers!
Your app service is up and running.
Time to take the next step and deploy your code.
I am seeking to understand this: I deployed the same build folder. I didn't change anything. I can't see my website (I thought it may take some time but I waited for nine hours now)
Things I've tried:
deploy again and again
restart the app on azure
stop and rerun the app on azure
go to the URL on incognito mode
I searched a lot and I've seen some answers that it can be about some path or file in the Azure configurations. However, I don't have anything in my configurations. Here are screenshots of my app configurations on Azure
here is my app configurations (when I go to configurations on Azure)
and these are the general configurations/settings
here is the deployment slots:
The message you are getting is the standard message when the app service is created but nothing is deployed.
Possible explainations are:
the app is being deployed to a different site
the app is being deployed to the same site but a different slot
the deployment is failing
your application is not listening on the port provided by the PORT environment variable
Recently I got into same issue,
Check you node version in package.json. I used this,
"engines": {
"node": "^12.16.3"
}
Azure web service was on Linux server. Startup commnand required in Azure General Settings -> Stack Settings
pm2 serve /home/site/wwwroot --no-daemon
You can also look at the log metrics after deploying or start the service. It will provide you info on the issue.

Azure App Service suddenly delivers file directory overview instead of Angular App

I have an Azure Web App (WebAppLinux) running an Angular application. The deployment is based on the Azure WebApp#1 task in an Azure pipeline.
Everything was fine until today. Without anyone having done a deployment, the website only shows an index page with the files stored in the home directory.
A re-deployment through the CI/CD pipeline is still successful. However, the error remains.
Was there any change to the Azure App Service that made my application incompatible?
The answer of LuisDev99 in https://stackoverflow.com/a/61707805/3809334 has solved the problem.
We had to add
pm2 serve /home/site/wwwroot --no-daemon --spa
to the Startup Command under Configuration, select the tab -> General Settings
In the past we had a startup script that called npx serve -s within our Angular application.
It seems that this way did not work anymore over the weekend. Maybe because there was a configuration change in the WebApp by Microsoft
Not an answer, but if you file an issue in https://github.com/Azure-App-Service/Linux/issues, that will help proceed with the next steps for investigation.

How to deploy single cshtml file in Azure app service

I have a .Net core app developed using Visual Studio 2019 and deployed on Azure app service. I have function app as well in the same solution. I have to do couple of things and then redeploy to Azure app service.
Add one .cshtml file
Modify one .cshtml file
My question is, how to deploy the CSHTML file only to the Azure app service? Without affecting the existing functionality of application.
As per my understanding, if web app is deployed in Azure app service then the whole thing (solution) has to be deployed even though there are/is very small code modifications.
Please let me know.Thanks.
Even if you have Web App and Function App in the same solution, they should be separated units of deployment. That said, your deployment pipeline should be separately triggered for Web App and Function App.
From the technical point of view(or architecture) there's no concept of "solution". Solution(.sln) is a Visual Studio specific being and even though it's supported e.g. in VS Code, I'd never treat it as deployment unit. Especially in your scenario, when in fact two separate services are responsible for handling your code.
Even if you deploy Function App as a part of the same App Service Plan as your Web App, it's still a separate Azure service. In such a scenario they only share compute.
Yes its possible if you have access to kudu deployment center you can perform manual add/update information , please visit below URL:-
https://[yourAppName].scm.azurewebsites.net
You can also navigate to this site using the azure portal , once you open the app service blade you will find the kudu deployment center option in the bottom left of the menu.
It will provide an online file explorer of your application hosted on the app service and from there you can migrate to relevant folder and perform add/update.

Azure Linux Web App Default Page Isn't getting replaced

I've deployed an asp.net core 2.2 webapp to azure linux appservice using VS2019 deployment.
It was successful, but my front page is still Default Azure Page, and none of the controllers are working.
What am I missing?
I get the same result by running devops build/release.
I had to set environment variable WEBSITE_WEBDEPLOY_USE_SCM = false to be able to deploy the app.
I tried looking for Default Documents page on azure to remove the default page, but the azure page for it is gone.
I FTP'ed onto server, my app is there, there is no sign of any default.html.
How do I get my site to actually run and display after deployment success?
You need to check the Startup Command in your Azure App Service configuration settings.
Replace
YourApp.dll
with your applications dll name.

Resources