Connect web app to Visual Studio Application Insights - visual-studio

I'm using Application Insights as part of my .Net Framework WebAPI project. When running the code locally (in debug mode), I can see all the events that would be sent to AI locally in Visual Studio by clicking the Application Insights button in the toolbar.
I've also got a Angular web App which works in tandem with the .Net backend. I've got the web version of Application Insights setup on it which sends telemetry to an Azure AI instance. Is it possible to have the Angular web app send its telemetry to the local AI instance in Visual Studio when I'm running it locally?
I'm using v2.5.10 of the #microsoft/applicationinsights-web library and Visual Studio Professional 2019 if that makes a difference.

Actually, there is no local AI instance. By default, the data you see in visual studio -> Application Insights Search window is from the current debug session, the screenshot is as below:
Another thing is that if you specify a valid InstrumentationKey, the data are always sending to application insights in azure portal(unless you setup firewall rule to block them).
For Angular web App, there is no way to just show the data in visual studio, but not sending to AI instance in azure.
Here are some suggestions just for your reference, but they cannot totally meet your requirement:
Solution 1: Sending data from Angular web App to AI instance in azure, then you can fetch these data from azure to visual studio locally. To do that, in the visual studio -> Application Insights Search window, change the Debug session telemetry to the AI instance in azure. Like below:
Solution 2: If you just don't want to send the data to Azure, you can use an invalid InstrumentationKey, and then open tools like fiddler to see these telemetry data.

Related

Visual Studio 2022 Xamarin boot emulator with Live Share

We are trying with a friend to write a mobile application (Xamarin.Forms).
Using Live Share we are connected and can co-write code and stuff. But at the same time, debugging works only on the side of the creator. The emulator itself was launched, but the application is visible only in the main group. Tried all the settings and gave permission for everything in options.LiveShare. Is there any way to use this app?
According to this thread , VS2019 still doesn't allow shared debugging of Xamarin sessions.You may want to post an feature request here https://github.com/MicrosoftDocs/live-share/issues?q=

Performance Data from Application Insights in Visual Studio Load Test project

I have configured a Load Test project in Visual Studio 2017 Enterprise and I'm trying to add Performance Data from Application Insights so we can have more data on what's happening with the application at the time of the test. So when I right click on the Run Settings:
After I click that:
Please note that we have Azure services and Visual Studio Team Services. Although I'm not the one administrating these I can still recommend what to do or I might request and get permissions, but I'm not sure what to request!
The API .NET project already has Application Insights integration, but I don't know how to read that data in the Load Test project.
What are we missing?
First, please make sure you have configured multiple instances of Application Insights from within the azure portal. When you use the load testing to add an application it would goes to the configured vsts account and try to connect.
Please manually add the application insight to your application and try again. Take a look at below tutorials, which should be helpful:
What is Application Insights?
Application Insights: Frequently Asked Questions
Set up Application Insights for your ASP.NET website
Troubleshooting no data - Application Insights for .NET

Desktop Application Load Testing with Visual Studio

We have a desktop application (Point Of Sale) which runs on stores which has more than 100+ cashier counters and connected to a local SQL server in the store. We would like to perform Load to determine application performance for various scenarios. I was looking for Visual Studio (2015/2017) based load testing and I don't any helpful documentation. It would be helpful if someone can share load testing procedure for desktop based application using Visual Studio.
JMeter is out of scope for us.

Azure Portal missing Web App

I have a number of web apps hosted in Azure. These can be navigated to by their URL and are live and running correctly. If I use the server browser in Visual Studio 2015 I can see the correct web apps... AND previously deleted web apps.
However in the new Azure portal one of my web apps is missing. What do I need to do to get the new portal to recognise all of my web apps and should I be worried about visual studio displaying old deleted ones?
This is a sync issue that happens occasionally, and that we can fix for you. In order to do this, please share the name of any site in your subscription. You can create a temporary dummy site for that purpose if you like.

Visual Studio 2010 published web site returns "Could not load assembly App_Web_xxxxxx.dll"

I am working on client's application in which we have two servers - development server and testing server. We first develop applications on development server and then publish it and host it on test server for client testing.
Testing server has Microsoft .NET framework 3.5 SP1. On development we have Visual Studio 2010.
We publish the website on development server using VS 2010 and then copy that folder to testing server and host it on its IIS.
Whenever we try access any aspx page of site hosted on testing server, we get error:
Could not load assembly App_Web_xxxxxx.dll". Make sure it is compiled before accessing the page
What can I do to resolve this?
This could be due to a lot of reasons.
I would start by trying one of the following things..
Make sure your IIS Site has the correct .net version specified - same as your application
Make sure you have all the required .net components installed in windows features (control panetl)
Look at event viewer for more errors and post it here
OK guys here is the solution.
Since my testing server is having Microsoft .NET framework 3.5 so on the development server while publishing from VS 2010, I have to choose target framework as 3.5.
Do this:
Right click web site -> Property Page -> Build -> Change the target framework.
After doing this setting, publish the web site again.

Resources