use appinsights in an on-premise web server - azure-application-insights

We would like to use appinsights to collect data for our on-premise sites.
I found an article https://unhandled.wordpress.com/2018/02/01/using-azure-application-insights-with-on-premises-servers/
which will install an old (2016) software (Application Insights Status Monitor).
Is it still the right way to use appinsight in an on-premise web server?

There are two ways to instrument on-premise web server.
Option I: Use Status Monitor v2 to auto-instrument your application. No need to change code.
Option II: Add Application Insights SDK to your web application project. Redeploy your application.

Related

Application Insights picks up SQL telemetry locally but not in a real environment

Generally I've had pretty good luck with Application Insights' auto-detection of a SQL dependency. However, in a recent case where we added Application Insights to a Web API project, we are not seeing dependency tracking for SQL Server in the portal. Version info:
Application Insights 2.5.0
Entity Framework 6.x
.NET 4.5.2
The funny thing is that Azure will automatically pick up SQL calls when developers are using the debugger from Visual Studio. What do we need to do to capture timings for SQL calls on a real environment?
Thanks,
BGU
The solution was to upgrade the Web API project to a more recent version of .NET (4.6 or higher). Good luck out there.
https://learn.microsoft.com/en-us/azure/application-insights/app-insights-monitor-performance-live-website-now
Dependency diagnostics like full sql command text will be available in Application insights only at runtime. If web api project is hosted on IIS server, then try integrating your web application virtual directory to app insights resource using status monitor. Once you do that, it will push full sql command text to d app insights portal.Comparison Build time and run time integration

Publishing ASP.net to Azure VM

There is LOTS of information on publishing asp to Azure Cloud Web Service and so forth but I cannot find a lot on publishing it to an azure VM.
Also another problem is anything I find assumes I have started a project with azure enabled from the start. Which I haven't done, so I would have to somehow convert it, again I have seen many ways of doing this on the web based on different requirements.
So how would I publish an ASP.net project (that has no reference to azure) to an azure VM.
Thanks
Install Web Deploy into your VM and publish directly through Visual Studio
http://www.iis.net/downloads/microsoft/web-deploy

Deploy to an Azure WebRole without Visual Studio

Is there a way I can deploy my entire website/webapp to an Azure WebRole without the need of Visual Studio?
Context: We have a test environment where there's an IIS hosted web app where our testers test (of course). The thing is, we want to grab that exact tested web app folder and deploy it "as is" to a WebRole.
Please avoid commenting on our procedure, we have been looking at it and we will eventually change it if we have to, I just need a 'simple' yes(how)/no answer.
IIS Web Deploy can be used to package/migrate/restore IIS applications. It can be enabled while deploying a web role as described in this article and allows to update the web role with the application as deployed in your test environment.
Be aware that only single instance cloud services are supported and that in case of a maintenance operation by the fabric controller, your service will be rolled back to the state created by the initial azure package deployment. (There once was a tool for syncing between multi-instance web deployments but sadly that did not work out too well and is no longer supported. Do not attempt to use or rebuild it.)
Installing and Configuring Web Deploy shows the steps to get web deploy for your local testing IIS while articles on using web deploy like this one show examples for calling the tool.
Another option to evaluate are azure websites and git deployment. This could provide you with a documented and reproducible form of deployment that is not prone to unwanted rollbacks while allowing the service to scale to multiple instances. This option might not work out if the application it too tied to the web roles infrastructure or contains code not suitable for the more restricted web sites environment.
A third option to look at is using CSPack as presented in this article. You basically create a service definition and package up the webapp manually without building it in Visual Studio or TFS.
Yes - make sure you have enabled Remote Access on your webrole. Then copy your web app from your local IIS folder to F:\sitesroot\0 (NOTE - may be E:\sitesroot\0 on same web roles).
Yes, you can write a programmatic interface against Web Deploy from your C# code. If you're deploying to Azure Web Sites, you could also use the Windows Azure Management Libraries to spin up new web sites or clouand deploy them.

Difference Between Azure Web Site and Azure Cloud Service

I'm about to migrate several separate ASP.NET 4.0 Web Forms applications to Azure. Several are apps using SQL Server 2008. I'm seeing "conflicting" tutorials for this:
Deploying an ASP.NET Web Application to a Windows Azure Web Site and SQL Database
vs
Deploying an ASP.NET Web Application to a Windows Azure Cloud Service and SQL Database
This StackOverflow question goes some way towards explaining this. However, there have been several changes to Azure in recent months and I'm not sure how up to date the information is.
I want as simple a migration process as possible because of the number of sites I have to migrate. Is there a situation where I would have to use the Cloud Service route?
Aside from what the linked-to answer provides: You have to go the Cloud Service route if there are apps you need to install (e.g. an MSI, COM object, etc.). There's simply no facility to do this with Web Sites. In Web Sites, you cannot alter the VM instance at all. With Cloud Services, you have lots of flexibility to install software, alter IIS behavior, pretty much anything you need to do (as long as the installs can be automated).
One point which can be very valuable if you consider migration of ASP.NET 4.0 Web Forms applications - Microsoft Azure Websites do no support SSL for custom domains yet. That might be a blocker for your migration work to the Websites service.
Note that Windows Azure is very dynamic environment with great number of new features coming every new release. In order to be up-to-date I would suggest following ScottGu's Blog to find out about new features and their release dates.
EDIT
Windows Azure Website supports SSL for custom domains now. SSL Certificates and SSL bindings can be configured in Configure tab.
You can also read more about SSL configuration for Azure Website at Configuring an SSL certificate for a Windows Azure web site.

Managing web software versions by clients requests

I need some consulting on a deployment issue on web applications .
Let say I have many web apps installed on my web server (WCF service , ASP.NET site, Silverlight app , Static web app , and thing you can host on IIS).
My main problem , I need to manage these application version up to my clients.
Example : Today I have Wcf service with version 1 , all the clients work with , after next month I release version 2 and I need to install it separatly on IIS and start move clients one by one to it .
Same thing can happen to any application type I have .
Is there a modern way I can do that .
Thanks in advance...
Take a look at Nuget and set up a feed your clients can use. Full versioning capabilities included:
http://nuget.codeplex.com/
http://www.codersbarn.com/post/2012/05/09/An-Introduction-to-Nuget.aspx
If you deploy your WCF service version (such that 2 versions can co-exists), you can make use of application configuration files to manage what service each individual application points to. So after you deploy the new version of your service, you simply go through each applications web.config file and modify it to point to the new service when you desire.

Resources