Can Azure Application Insights be used on applications not hosted in Azure? - asp.net

Is it possible for me to add Application Insights to a .NET application that we host in our local environment for monitoring within Azure, or does Application Insights only work for applications hosted on Azure?

You can monitor any kind of app anywhere with Application Insights, as long as the thing being monitored can send outbound telemetry to application insights. the ip addresses for application insights are documented here if this requires setting up any kind of firewall/etc rules.
Azure is the "storage location" for your telemetry. Your app doesn't have to run in Azure, or even be a web app. people use application insights for console apps, device apps powershell scripts, web apps hosted all over the place, etc.

Related

ASP.NET Monitoring and logging

Is there any service similar to Application Insights and Application Monitoring which Azure provides which I can install in my own server and is free for small uses?

Can I replace AppDynamics with Azure App Insights

Our existing Infra is hosted on private servers. AppDynamics is used for monitoring hundreds of application & host performances.
As a move we are moving all our applications on Azure. Is this possible to get away from AppDynamics & use any Azure solutions for the same purpose. Possibly Azure App Insight/Monitor ??
We have tried Java Application Monitoring on Azure App Insight; Azure Monitor is useful there. Also we have used LogAnalytics for creating various performance Dashboards on Azure Monitor.
Can Application Insight support all the similar features of AppDynamics: Like Workflow Monitoring Performance Monitoring etc etc..

ASP.Net web app running locally with IIS Server not running on Azure

I have simple ASP.Net web app in which there is Socket connection implementation.
It is working in local IIS Server, but not working when deployed on Azure.
Source Code on GitHub.
It is working in local IIS Server, but not working when deployed on Azure.
I previously followed this tutorial to build my web application with WebSockets. Per my understanding, you need to enable the Web sockets option under the "SETTINGS > Application settings" of your Azure web App on Azure Portal. Moreover, here is a similar tutorial about Introduction to WebSockets on Windows Azure Web Sites, you could refer to it.
UPDATE:
For using SSL for WebSockets under Azure Web Apps, you could just connect to wss://{your-appname}.azurewebsites.net (WebSockets over HTTPS). Azure Web Sites supports SSL even on free sites by using a default SSL certificate for *.azurewebsites.net. Details you could follow this tutorial.
TEST:
Additionally, if it does not work in your web app, you could leverage the Log stream under the MONITORING section of your app service on Azure Portal to retrieve the detailed error message to narrow this issue.

Web Application deployed in IIS is unable to access Database

I have a web application developed in .net and deployed in IIS so that other systems on the LAN can access the application easily. It was all working fine but suddenly when i did some modification in application deployment services under world wide web under IIS in windows features on/off then my application unable to access database. I have checked everything i am able to access the same database in SQL server management studio.
Please help me
I have resolved my problem and it was very silly actually the problem with in the iis application pool i have stopped the application pool of my application and then started and the problem solved....!!!!

How to embed an asp.net site in a windows service (or vice versa)

I'm building a windows service but I would like to get some web pages to control some settings, get diagnostics, etc...
How would you go about combining an asp.net web site AND a windows service together ?
I know that WCF can be self hosted into an arbitrary process but can I do the same with asp.net ?
Another option would be to have my service logic in the asp.net web site application_start method to spawn long running threads. But then, I don't get window service built in feature such as auto start on boot up. Another issue might be that IIS might decide to recycle the process. Moreover, my service needs to open a raw tcp socket to accept connections. Can I do that in IIS ?
Thanks
I think the easiest and most robust way to do this is to have an ASP.NET Web Site running under IIS on the same server as the Windows Service. The Windows Service can host a WCF Web Service that will be accessible to the ASP.NET application.
I would have your Windows service self-host a WCF "configuration" service. The WCF service only needs to be exposed locally if the UI is on the same machine. If the windows service needs to open a separate raw socket for communications this can punch a hole through the firewall.
Then the ASP.NET UI can be hosted by IIS as usual, and call the WCF methods to perform the configuration tasks.
It seems like you really need both thingsā€”a web app hosted in IIS and a windows service hosted as windows service.
Then you can just share data between the two in some way, e.g. via a database.

Resources