Proper way to install Application Insights in a Windows 8.1 Javascript app - windows-8.1

I have a Windows 8.1 universal app written using javascript and would like to install application insights to capture telemetry data.
I've followed the instructions here and installed the Application Insights for Javascript Apps nuget package in my project.
It's partially working. I see page views coming through and some (but not all) of the exceptions I'm tracking using calls to appInsights.trackException. I don't get any crash reports.
Is there something I'm missing that's preventing crash reports and exceptions from being tracked? Is this the correct way to setup Application Insights for Windows 8.1 javascript apps?
Any help would be greatly appreciated. There doesn't seem to be much information out there on this scenario.

We don't support JavaScript for devices. Sorry.

Related

Page keeps loading forever

Im using IIS 8.5 on Windows Server 2012 R2 so I add my Web Api but when I try to view the site it stays in a loading state like this:
Do not show any message or error just stays loading, I think that i miss some configuration or feature in my IIS but I don't know which one.
Edit: I use .Net framework, it is a REST .net web api like this reference, the IIS have installed .Net versions 3.5 and 4.5, it's IIS not the express and the default IIS website runs fine.
I would really appreciate any help.
Try to reduce the timeout settings to a minimum level, say 10 seconds.
See if it throws a Timeout error.
Without much information from your side its hard to judge.
Perhaps it could be an external service you are trying to access(Web service) or a DB connection?
Please check if the application pool you assigned to your solutions runs under the correct version of .net framework and in integrated mode. I had similar issues when trying to run an mvc app in classic mode. Check this out.
EDIT 1 - Reconfiguring IIS
If problems persists then try the ASP.NET IIS Registration tool. Execute the followig command as administrator:
aspnet_regiis -i
At the end of this post the different locations for aspnet_regiis are described. You should select a .NET Framework version corresponding to that of your project, run aspnet_regiis and assign the proper application pool to your app.

How to get Universal Windows Platform (UWP) application symbolicated crash reports?

For a live/testing Universal Windows Platform(UWP) application how I can get crash reports? Is there any SDK for UWP, Like for iOS/Android platform Crashlytics provide symbolicated report about an application crash.
Following Details I want in a crash report
1. Device Details - like Device Name, Model etc
2. OS Version
3. File Name - In which app crash
4. Line Number - In which app crash
5. Parents Method - Parents Method of method in which app crash
6. Other threads details
I want something similar to Crashlytics SDK, like for iOS. Here the screenshot one of my iOS application which contains crash details
I suggest that you may use Hockeyapp, you may merge Hockeyapp SDK to your app, it will help you collect crash report and some other things. HockeySDK.UWP is in process now, you may use HockeySDK.WINRT instead. Here is the link.
Hockeyapp for UWP is in "preseason" so currently in development but available for users already.
just sign up for Hockeyapp with a free accound and apply for "preseason" you'll get access to UWP and other beta features in a few days. (at least I received access quite fast on multiple accounts)
when you have access it's just adding this nuget package:
https://www.nuget.org/packages/HockeySDK.UWP
Microsoft Application Insights also has some good functionality for this but it's deprecated since last month where Microsoft tells you to move to Hockeyapp

The different between Web Performance Test and App Insight

Currently, I had used WinJS to developed UWP app.
I saw the tutorial of Azure Web Performance Test and App Insight.
I confuse each of them, what are the different of both?
When you create a C# UWP application, Visual Studio has an option to integrate Application Insights for your project.
Unfortunately, you don’t have that same option when using UWP in HTML/JavaScript. In that case, you will have to do all plumbing manually. Microsoft provide a SDK for using Application Insight in JavaScript.
We wrote small a wrapper for JavaScript sdk that adds those metadata and everything starts working fine for HTML/JavaScript UWP apps.
http://mcnextpost.com/2015/10/26/uwphtml-using-application-insights-in-your-windows-web-applications/

How do I profile an Azure app running in the Compute Emulator?

I think profiling an application deployed to Azure is not a big deal http://msdn.microsoft.com/en-us/library/hh369930.aspx
I'd like to do the same locally, in the Compute Emulator. It looks like this is currently difficult http://www.pettijohn.com/2011/05/performance-testing-azure-dev-fabric.html at best, at least with the native VisualStudio 2010 profiler.
Am I missing a simple way to do this? Are there any third-party tools that make this fairly easy to do?
I'm using the Azure SDK 1.4 and Azure Tools for Visual Studio 2010 1.3
For later versions of the SDK you can refer to this article in the Windows Azure documentation, where it is explained how to do CPU sampling for both worker roles and web roles: for the latter case, you should attach to the WaIISHost.exe process.
As also indicated in the answer from Marcus Jansson, you may need to attach to the w3wp.exe process. For example, when I'm debugging one of the web sites contained in a web role I need to explicitly attach to the w3wp.exe process that is hosting that site, since Visual Studio does not attach automatically to all relevant IIS instances.
UPDATE 2013-01-10 19:03 UTC I was unable to profile web roles using the linked instructions. I discovered that:
it is useless to attach to WaIISHost.exe, since it seems that it doesn't contain the role code;
I cannot attach to w3wp.exe instances from Visual Studio 2010 (I receive an error message with code VSP1449).
Since I'm using Windows Azure SDK 1.8, I then tried to run my web role under IIS Express (see this post for further details) and then I attached to the iisexpress.exe process. This way I was able to profile my web site.
If you run the web role in IIS, you can just attach to the process w3wp.exe.
I think it depends on what you're trying to profile.
The link you included in your question is for profiling memory for a web role, and yes it looks a little involved.
If you're looking to profile a worker role, it's much easier. You can simply start the worker role through Visual Studio (or using the method mentioned in the post you linked to if you're worried about the effect of the debugger on the profiling) and select Analyze -> Profiler Attach/Detach -> WaWorkerHost. From there it should look just like profiling any other application.

Azure - error on starting with multiple web role projects

If I have more than one webroles(projects, not instances) in my application, I get this error: (I only get it if I attach a web role. It works fine wit as many worker roles projects as I want)
Microsoft Visual Studio
Windows Azure Tools for Microsoft Visual Studio
There was an error attaching the debugger to the IIS worker process for URL 'http://127.0.0.1:5100/' for role instance 'deployment(21).CloudPOC.WebRoleToHostDataService.0'. Unable to start debugging on the web server. The web server is not configured correctly. See help for common configuration errors. Running the web page outside of the debugger may provide further information.
Click Help for more information.
OK
What is wrong here? I can't understand it and I need a webservice project!
Make sure you are starting the Azure project rather than the Web Project itself. You might have set the Web Role as the startup project, and if you do that you'll find that IIS runs the Web App rather than the Azure Dev Fabric, meaning any Dev Fabric specific stuff (like config settings per role) aren't available causing problems.
What you're meant to do is let the Azure Dev Fabric (Compute Simulator) fire up all your roles for you, and it'll also work out if it needs to open a web browser etc.
So right click on the Azure Cloud project, set that as the Startup Project, and try again.
Hope that helps,
Andy
EDIT thought of something else!
Make sure your web.config is compiling to allow debug="true". If you have added a new WebSite to your solution, it won't be so by default:
<system.web>
<compilation debug="true" targetFramework="4.0" />
I had similar issue which got resolved with following steps.
Make sure you have correct version of .net framework 4.0 is intalled. (.Net Framework 4.0.30319 is the latest version)
Uninstall if there isany other .Net 4.0 framework in present on your system by going to Add And Remove programs.
Go to %windir%\Microsoft.NET\Framework64 physical location and remove unwanted .Net framework 4.0 folder
I've also had this problem and it happened when I upgraded my app to 4.0... I ran without debugging and got the following error:
There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined
and after researching that error, I found this:
http://forums.asp.net/t/1571308.aspx/1
which says there's currently a bug w/ vs2010 and 4.0... I took the answers recommendation and commented out the extensions section and it worked for me... Another possible solution.

Resources