Red Gate forums :: View topic - Error reporting and feature usage from service application?
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SmartAssembly 6
SmartAssembly 6 forum

Error reporting and feature usage from service application?

Search in SmartAssembly 6 forum
Post new topic   Reply to topic
Jump to:  
Author Message
williamw



Joined: 02 Apr 2012
Posts: 8

PostPosted: Mon Apr 02, 2012 2:33 pm    Post subject: Error reporting and feature usage from service application? Reply with quote

As far as I can tell SA does not support error reporting or feature usage reporting from services or console apps. Are there any plans to add this capability?
Back to top
View user's profile Send private message
dom.smith



Joined: 03 Jun 2010
Posts: 94
Location: Cambridge, UK

PostPosted: Mon Apr 02, 2012 6:19 pm    Post subject: Reply with quote

Hi,

Automatic Error Reporting and Feature Usage Reporting do work with console applications and services.

In both cases, select the 'Automatic (without dialog box)' template. This ensures that errors and features are always reported. SmartAssembly does not try to open a dialog box to ask for the user's permission.

Obviously, because SmartAssembly cannot open a dialog box on the end-user's computer in these cases, you will need to ensure that you take account of any privacy implications.

Hope that helps,

Dom.
_________________
Dominic Smith,
Project Manager,
Red Gate Software.
Back to top
View user's profile Send private message
williamw



Joined: 02 Apr 2012
Posts: 8

PostPosted: Mon Apr 02, 2012 7:03 pm    Post subject: Reply with quote

Thanks--that's the piece I was missing. What is the best way to turn automatic reporting off or on programmatically after I get permission from the user during installation? Do I just build my own UnhandledExceptionHandler and UsageReporter classes that check for a saved setting, and point to those as the templates?
Back to top
View user's profile Send private message
dom.smith



Joined: 03 Jun 2010
Posts: 94
Location: Cambridge, UK

PostPosted: Tue Apr 03, 2012 12:19 pm    Post subject: Reply with quote

Hi,

For Automatic Error Reporting, yes, your solution is the best one: create a custom template using the UnhandledExceptionHandler and only report if some saved setting is set.

For Feature Usage Reporting, the best thing to do would be to set the registry key that the other templates provided by SmartAssembly would normally set when consent is given. That registry key is HKEY_CURRENT_USER\Software\[CompanyName]\[ApplicationName]\SmartAssemblyReportUsage Set the value to True if the user gives consent, or set it to False if the user does not consent. Use the Automatic template as normal. Features are not reported by the Automatic template if the value of this key is False. Note: this is not accurate. See the correction post below.

Best wishes,

Dom.
_________________
Dominic Smith,
Project Manager,
Red Gate Software.


Last edited by dom.smith on Tue Apr 03, 2012 2:35 pm; edited 1 time in total
Back to top
View user's profile Send private message
dom.smith



Joined: 03 Jun 2010
Posts: 94
Location: Cambridge, UK

PostPosted: Tue Apr 03, 2012 2:35 pm    Post subject: Reply with quote

Hi again,

The developers have just informed me that the Automatic template for Feature Usage Reporting doesn't in fact respect the registry key mentioned above. So your solution of using a custom template with the UsageReporter class is required.

Sorry for the confusion.

Dom.
_________________
Dominic Smith,
Project Manager,
Red Gate Software.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group