Why is my App Insights not recording data? - visual-studio

I'd like to set up App Insights on a .NET Core API project I have.
I've been following a couple articles, this simple one with setup steps here: https://learn.microsoft.com/en-us/azure/azure-monitor/learn/dotnetcore-quick-start
And the more in-depth: https://learn.microsoft.com/en-us/azure/azure-monitor/app/asp-net-core
I have everything set up and registered correctly
But I can't get any data to show up, either in Azure or in Visual Studio's App Insights Search
The steps to setup seem pretty straightforward and I haven't missed any steps - any good reasons why no data is showing up?

As per your description, there seems no configuration error in your site since you can see the telemetry data is sent via visual studio output.
There are some things you need to check:
In application insights search:
1.please make sure the time range is selected as a proper value, like last hour or last 30 minutes.
2.For the types, select All.
And also note that, there is always some minutes delay for the data to be displayed on azure portal.
If you want to get more infor, then in appsettings.json, you should change Warning to Information

Related

WINUI3 Uno Platform Microsoft Store runFullTrust warning

I have been in the process of migrating one of my project from a standard UWP project to an Uno platform based project to allow me a wider variety of devices to publish to. After overcoming a number of hurdles I generate my msixbundle and submit this to the Microsoft store. Because the original application was published with a .appxupload it need too be some kind of bundle to accept it. When i submit the bundle i receive the following warning
Package acceptance validation warning: The following restricted
capabilities require approval before you can use them in your app:
runFullTrust.
In my package manifest the only capability ticked is Internet (Client). Nothing else is ticked and the application doesn't need anything to work.
Any idea where this has come from or is set and how I might go about changing this to the correct value. I have done quite a bit of googling and some places suggest ticking or unticking certain things on the package submission page(nothing i ticked on unticked seemed to help) or is this simply because it is uno platform?
Any suggestions would be greatly appreciated.
Edit
As a test I created a brand new uno platform application I also created a new app in the Microsoft app store linked the two. Left every single capability unticked(that's right none were checked) produced and msix submitted it to the store and i am receiving the exact same error. This leads me to think this is because it is an UNO platform app.
In case it is useful im using vs 2022 17.3.6.
This being a store submission question, you may want to check out UWP community server; plenty of people there with apps in the store, someone must have hit the same roadblock as you. https://uwpcommunity.com/

Windows 10 Mobile: Accessing device log (like logcat on Android)

I'm trying to find a way to view the device log of a Windows 10 Mobile Device.
I have already searched my way through various forums but it seems to be very new topic not many have come across so far.
So my question is:
How do I do this?
I'm looking for something vaguely equivalent to Android Studio's Logcat.
I know my way around in Visual Studio, I hoped there would be some way to do it via the debug console, but as far as I know that thing is limited to the current app you are developing.
Any help would be nice. I'm kind of lost here.
Cheers.
Currently there is no equivalent of Logcat.
But I can advise you some alternatives:
1) Visual Studio Console: you can display information from the code directly on the Visual Studio console. To do it just add below line to the fragment of your code:
System.Diagnostics.Debug.WriteLine("This is information to be displayed on the VS Console...");
You can also change the color of the font:
a. For example for errors you can set it to be RED:
Console.ForegroundColor = ConsoleColor.Red;
If you need some more complex solution you can try Microsoft HockeyApp.
With this tool you can measure performance of your app. Not only bugs but also how many users use your app (they can even contact you to report errors).
https://www.hockeyapp.net/features/
Third solutuion here is to use this official Logging APIs samples avilable on GitHub:
https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/Logging
Hope this wil help you.

Load test and Scale MVC web api service

I would like to load test my MVC web api and get the best hardware configurations or number of load balanced servers to achieve specific number of concurent requests.
But I do not know where to start. Can someone point me in the right direction?
As regards to ASP.NET Web API, the steps are pretty straight forward.
create a unit test project for your web api method(s). check this out
add a load test to the test project check this out
perform the load test in the cloud. Take a look at this and this.
Note that the last step requires that you have visual studio ultimate and a visual studio online account. Your visual studio online account gets you 15,000 user minutes free every month to load test your app. You should be able to glean useful information in the test results to help in your decisions e.g how many VM instances you might need, etc.

What is the best way to migrate online application to offline

I have a certain online application that generates reports(and prints them) based on some repository of information. Now I would like to make an offline application which is provides the same experience and in which the repository is pre-loaded into the users' computer. What is the best way to convert this online app to offline app. The first thing that came to my mind was setup a local server and database. This ensures the experience is consistent. But I'm open to other options, such as storing the data in a file system and then loading it via flash/flex based apps or C# or Java. The objective of this offline app is to provide the functionality(report generation) to users where internet is not feasible.
I am not sure about the windows aspect of your question, but if I was doing an offline web based page(s) I would be looking at a LocalStorage database (though it does have some downsides), but there are other alternatives such as WebSQL and IndexedDB.
If you have reports, do they still have value when they are out of date? Do you need to store the configuration of those reports or is it all just read only?
Shameless self promotion, I have a project that is designed to handle database synchronization, though it's not done, it's close. You can see it (with an ugly but very functional) demo at https://github.com/forbesmyester/SyncIt

Windows Workflow Foundation 4.0 Pick Activity Containing a Delay Activity

I'm working with Beta 2 of Visual Studio 2010 to get some advanced understanding of WF4. I've created a workflow that has a Pick Activity that is contained in an If Activity. In the Pick Activity I have two Triggers, one that contains a Delay set with a TimeSpan of 10 seconds, the other Trigger has a Bookmark for a manager to approve. I'm trying to use the Delay to set a "state" variable to "Expired" if the manager doesn't approve in the allotted time. This is very similar to what Matt Milner did in his post at: http://msdn.microsoft.com/en-us/library/ee342461.aspx, except he uses a DoWhile Activity, whereas I need to use the If Activity I've described here. I'm also using persistence and hosting the workflow from an ASP.Net application. I'm wondering if the problem I'm seeing is caused by the internet browser not keeping the workflow running in memory, and there is no way for the workflow to come be re-started when the delay completes.
If you are using the WorkflowServiceHost, or a XAMLX, to host the workflow you will need to configure the WorkflowManagementService to reload and restart the workflow. If you are using the WorkflowApplication you are responsible for reloading the workflow after it has been persisted.
But as Chris said: a bit more info on what is actually going wrong might be helpful here.

Resources