Application Insights Live Metric for Virtual Directory Apps - azure-web-app-service

I have an App Service on azure. It contains 2 web app set in 2 different virtual directory. There is no web app in the root folder. I have configure the Application Insight for both project in Visual Studio and publish each app to their azure virtual directory. But nothing is showing up in Live Metric of the Application Insight of the App Service. All I see is : "Not available: your app is offline or using an older SDK" .

It seems that Application insight could only run on root website.
BTW, the way you set up virtual applications may have some mistakes. You should set as below:
For more details, you could refer to the article-Deploying multiple virtual directories to a single Azure Website.
Also you will have to add the app insights SDK to all the app and be sure you set InstrumentationKey for each as well.
Refer this SO thread for similar kind of issue.

Related

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.

ASP.NET Core App on Google Cloud Platform (Linux)

We have several intranet ASP.NET applications as parts of erp system running on local company Windows server, but recently decided to move to Linux servers due to low cost of maintenance. I know that it's possible to deploy ASP.NET Core Apps to Google Cloud Platform, but I did not find any info how to setup Linux VM to make deploy possible.(there is only info about setting up Windows VM).
Maybe someone had an experience of deploying asp.net core to linux on Google Cloud Platform?
You can set up a Linux VM in the GCP Console (on VM instances page) and then deploy your app using that instance, however, Google Cloud Platform documentation offers 4 substitute ways to deploy an ASP.NET Core app to GCP.
The simplest one would be to deploy it from Visual Studio.
To deploy your ASP.NET Core app to GCP, you can use Google Cloud
Tools for Visual Studio extension, which takes care of all the
necessary details to deploy your app from right inside the Visual
Studio IDE.
Another option would be to deploy a Framework Dependent Deployment bundle (see “Method 2” in the mentioned documentation).
This would be the simplest way to deploy your app from the command
line.
If you need more control over how your app’s container is built, you can also specify your own Dockerfile to deploy your app to Google App Engine with it (see “Method 3”).
This method would be especially helpful if you need to install custom
packages in the container, extra tools or need more control over the
contents of the container.
Alternatively, if you need more control over your workloads, or need to use protocols not supported by App Engine, you can use the Container Engine ("Method 4").
Here you may find a step-by-step tutorial on deploying an ASP.NET Core app to App Engine, which you might want to use as a reference.

Multiple web sites in one Azure Web App

Is it possible to host 2 different sites in one Web App? I copied contents of both sites to D:\home\site\wwwroot\web1 and D:\home\site\wwwroot\web2 folders and bounded 2 subdomains web1.domain.com and web2.domain.com to my Azure Web App. I saw recommendation to edit ServiceDefinition.csdef, but I can't find it. I guess because it was not deployed with VS.
How can I achieve this goal?
Yes it is possible to host 2 different sites.
It can be done by creating virtual directory.
Publish the root project with help of VS.
On Azure portal from the web app create a virtual directory through app settings.
Now again publish the child project but edit the destination url like:
"http://123.azurewebsites.net/Child"
You're using Azure Webapp so there are no *.csdef files anymore. You can do this in the Azure Portal. Click on Application Settings blade and scroll down to "Virtual Applications and directories".
Here you can create additional apps. For example, here is one with 3 virtual apps. Note the path to the physical files.
Finally, when you deploy in your CI/CD pipeline, you'll have specific the name of your virtual app.

Azure App Settings not added to website when using virtual applications

According to the following screenshoot that shows all environment variables for an application and the configured app settings in the azure portal, i get the impression that app settings do not work with virtual applications. Is this intented?
I'm not exactly sure what your left pane image is showing, but App Settings should apply to both the roo app and any virtual apps under it. They are based on environment variables (e.g. foo becomes APPSETTING_foo), which are available throughout the environment.

Set up NewRelic on DNN 7 running in azure web app

I have tried to get new relic to run inside my dnn 7 installation which runs in Azure web app.
I created a NewRelic account from the Azure portal and then I followed the directions here
The following APP SETTINGS were created in the configure tab of my web app:
NEWRELIC_LICENSEKEY : ****I used the one from my account*-*****
NEWRELIC_HOME: C:\Home\site\newrelic
COR_PROFILER_PATH: C:\Home\site\newrelic\NewRelic.Profiler.dll
COR_PROFILER: {71DA0A04-7777-4EC6-9643-7D28B46A8A41}
COR_ENABLE_PROFILING: 1
I then added the explicit app name to the web config, as instructed from the documentation link above, because I have the "Always On" enabled for my webapp
No data appeared even after restarting my web app numerous times.
So then I tried to set it up in the New Preview Azure Portal (am I the only one who hates the new portal, seems needlessly complicated.). I followed the instructions for the new portal here. This did not work either.
I manually uploaded the newrelic folder to the site root, and azure root folders and no success eighter. No logs are generated.
Can someone help me figure out what I am missing and why I can't get NewRelic to run in my DNN 7 azure web app.
Thanks in advance.
Jordan
Okay,
My web app was set to run 64 bit. The ddn site is not set up as a web project so I could not use NuGet to install a package. What I did was create a blank project and install the NewRelic package for 64 bit azure webapp
I than copied the files from that project and uploaded it into the site root of my web app, followed the instructions about manual install and restarted my website.
It now works.

Resources