How to setup iis in Azure web app service with Net Core 2 app? - azure

I develop simple Web Api on Net Core 2 and add Angular app to it (inside wwwroot folder) and publish it from my VS 2017 IDE to Azure Web App Service. All work fine, but when I reload page of my app in browser, server can't find route. So It often happens when iis not setup for SPA, It's described in https://angular.io/guide/deployment, I must configure the server to return the application's host page (index.html) when asked for a file that it does not have. How I can setup server node of iis in Azure Web App Service (web.config in Net Core 2 was deleted).

I am afraid you cannot achieve this.
Cause: Azure App Services runs IIS so it behaves mostly the same as local IIS, routing requests using a native module called AspNetCoreModule. So, it needs your published web.config file. Even though you deleted the web.config file, Azure would also generate a new web.config file to be used.(Though I don't understand why you delete the web.config file)
Solution:
Even you can upload the web.config file to Azure again, I'm afraid of that it will be ignored and doesn't work. So, I suggest you redeploy your website which contains web.config file to Azure and configure it well.
Additional: Azure Web App service is a kind of PaaS. So, if you want to install IIS manually, you can choose to host your website on a Windows Azure VM.

Related

Connecting to an Azure App Service via IIS Manager (inetmgr)

Is it possible to remote-connect to an Azure App Service running on Windows with my IIS Manager?
This seems to have been possible according to this blog post by clicking in IIS Manager File -> Connect to a site.
I refer to the steps mentioned in the link shared by you and in the last step I got an error below.
I did some research on it and it looks like managing the App Service from IIS is not supported anymore. I have not got any official link but the below links might give you some information on it.
Microsoft.Web.Configuration.AppHostFileProvider not found after configured Remote IIS Administration for Microsoft Azure Web App
Can no longer manage any Web Apps with IIS Remote Manager - Could not load file or assembly - AppHostFileProvider
I'm not sure for what purpose why you want to. My thoughts is you shouldn't be doing that as it defeat the purpose of PaaS services. Cannot access the iis layer in app service however you can still configure in web.config of your web app.

Jsp project not showing on azure,how to deploy it correctly

I have a java jsp project need to upload to azure web apps. So I created web app service but in ftp there is no web apps folder, so I created one but still I can't access it.Any suggestions please.
First, make sure your App Service Web App has Tomcat as the Java web server in general settings:
Then make sure your JSP files are copied under /wwwroot/webapps/ROOT/
You might need to restart the web app after your files are deployed
For more information, please check our quickstart and configuration guide:
https://learn.microsoft.com/en-us/azure/app-service/quickstart-java
https://learn.microsoft.com/en-us/azure/app-service/configure-language-java

Vue Frontend and Express backend on same Azure web app Service

I have built a web app that has a Vue front-end and an express back-end.
I am trying to host these on an Azure Web App Service but I am a complete novice with Azure.
I have gotten the web app working fine when I place the Client side in one web app and the Server side in a different one.
I want to have both running in the same web app.
From researching online it seems that I need to go to:
my web app-> configuration-> path mappings ->Virtual applications and directories.
I created a new application with Virtual Path "/app" and physical path "site\app".
I deployed (using visual studio code) my back-end to my azure web app and thus this sits inside wwwroot.
In filezilla I create a new folder in the site directory called "app" and paste in my built Vue client side.
However, when I try to navigate to www.myapp.azurewebsites.net/app I am not presented with the expected Vue index.html rather a 404. If I just navigate to www.myapp.azurewebsites.net/ I get the default route from the server side as expected.
What am I doing wrong?
When creating a webapp, please choose Windows operating environment, because currently choosing Linux does not support Virtual Application and directories.
The directory structure should be like below.
Setting in portal.
For more details, you can refer my answer in another post.

Is a node.js app running on express.js hosted in Azure using IIS?

I'm working on a app that is hosted in Azure.
The app is a web-app based on node.js/express.js.
Is it running on/in a IIS server since it is hosted in Azure?
My app does not use the iisnode package. But i wonder if it is inherently running on IIS since it is hosted in Azure?
Also: As i understand at the moment, IIS-express and express.js is two completely different environments for hosting web-servers.....?
Just according to your description, it seems that you were talking about hosting a node App based on express.js to Azure WebApp for Windows.
Yes for hosting Node.js app in IIS on Azure WebApp for Windows, you need to use iisnode (a native IIS module) to host node.js applications with the web.config file in IIS on Windows. For more details, you can refer to the wiki page iisnode wiki of GitHub repo Azure/iisnode to know what iisnode is, and to know how to host it with a web.config file in IIS via the other wiki page Using a custom web.config for Node apps of GitHub repo projectkudu/kudu.
However, No for Azure WebApp for Windows, because you also can use IIS as a reverse proxy server to handle a Node app via the default port %HTTP_PLATFORM_PORT% specified by Azure WebApp like the blog Running java jar file to serve web requests on Azure App Service Web Apps for Java said. But generally, it's not a recommended way.
Meanwhile, No for hosting Node app on other Azure services, such as Azure WebApp for Liunx, Azure VM, or Azure Container services, these services based on Linux do not require IIS, so the iisnode module also be not absolute required.

How do I mount an already existing php app to an empty azure php web app

Ok so I created an empty php web app in Azure, and I already have an existing php app that I have only tested locally, question is: How do I "transfer" that app to that empty php web app I created in Azure?
To migrate your existing PHP app to Azure Web Apps, you might need to do the following things:
Deploy all files of your PHP app to a virtual directory's root (D:\home\site\wwwroot) using FTP or source control:
Deploy your app to Azure App Service using FTP/S
Local Git Deployment to Azure App Service
Configure PHP in Azure App Service Web Apps
Azure Web Apps run on Microsoft IIS. If you have ever had your project run on Apache Web server, you also need to translate .htaccess ontent to IIS web.config.

Resources