This is a migrated thread and some comments may be shown as answers.

Silverlight - when to call monitor.Stop()

3 Answers 19 Views
Monitor integration
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Curt
Top achievements
Rank 1
Iron
Curt asked on 06 Nov 2013, 12:45 AM
Can someone please provide some tips on how/when to call monitor.Stop() from a silverlight xap inside of a web browser?  Thanks!

3 Answers, 1 is accepted

Sort by
0
Soren
Telerik team
answered on 11 Nov 2013, 08:15 AM
Hi Curt,

This is a notorious difficult scenario, and unfortunately we haven't been able to nail down a rock solid solution for this (since we are building on top of the browser stack so you might be familiar with the issues regarding onbeforeunload etc. ). The issue with ensuring a call to Stop is that this ensures that the recorded data is either send to the server or persisted on the machine. Failing to call Stop, or calling stop at a point where both network and file access is gone holds the risk of losing data.

So a complete solution may combine the following methods:

  • You can try listening for the Application.Exit event within Silverlight but from our experience both the network and possibly also the ability to write to isolated storage is already gone at this point.
  • You can go to a more elaborate setup, trying to hook into the javascript unloading events that calls back into the silverlight application. We have better success with this though it is not without flaws, as it builds on top of the browsers own ability to detect unloads (which are somewhat flaky). You can get a good explanation here: http://stackoverflow.com/questions/3660560/how-to-detect-a-browser-refresh-from-silverlight-4
 
Hope this helps to at least outline the possible ways to attack the issue. As mentioned, we haven't been able to nail a rock solid solution but combining the methods above is as close as we've been able to get.

Let me know if you need further information

Regards,
Soren
Telerik
ICENIUM MONITOR AVAILABLE FOR DOWNLOAD.
Monitor and track applications built with Icenium at run-time. Reduce support by fixing run-time crashes as they occur, obtain user insights such as location and system configuration, find and remove application bottlenecks, and track which features are used most to help prioritize development.
Try Icenium with EQATEC Analytics today >>
0
Curt
Top achievements
Rank 1
Iron
answered on 12 Nov 2013, 06:01 PM
Thanks Soren. I noticed that the App Exit worked intermittently . I'll investigate the javascript technique.
0
Soren
Telerik team
answered on 13 Nov 2013, 10:10 AM
Hi Curt,

Let me know about your findings

Regards,

Soren
Telerik
ICENIUM MONITOR AVAILABLE FOR DOWNLOAD.
Monitor and track applications built with Icenium at run-time. Reduce support by fixing run-time crashes as they occur, obtain user insights such as location and system configuration, find and remove application bottlenecks, and track which features are used most to help prioritize development.
Try Icenium with EQATEC Analytics today >>
Tags
Monitor integration
Asked by
Curt
Top achievements
Rank 1
Iron
Answers by
Soren
Telerik team
Curt
Top achievements
Rank 1
Iron
Share this question
or