Querying SmartAssembly web service

.NET obfuscator and automated error reporting

Querying SmartAssembly web service

Postby JDHnz » Mon May 21, 2012 4:21 am

Hi there,

We're putting the finishing touches on our winforms application as we get ready to release it, and I was wanting to have a little system tray app for myself that notified me when there were new error reports waiting to be downloaded from the web service, so that I am made aware of problems as soon as possible.

I have set up a copy of the web service files on our own server and got that all working fine. Exploring the asmx files, I suspect that it is Reporting.asmx?op=GetReportCount that I need to call to find out if there are any error reports waiting to be retrieved, but clicking on the Invoke button to test that call gives me an "Err Session timed out." message, so I suspect there is another call that I need to make before that. I guess that this is probably to Reporting.asmx?op=SecuredLogin, but I have no idea of the values to pass for the licenseID or password.

Am I taking the right approach to this, and if so, what are the details that I am missing? If it's not the right approach, how should I be trying to solve this problem?

I have managed to set up a schedule task to invoke "SmartAssembly.com /downloadnewreports" on a regular basis, so that I could just query the database for new error reports, but that means I have to have the virtual machine with my dev environment running for the reports to be downloaded, so I would much rather query the web service directly if possible.

Posts: 13
Joined: Mon Sep 01, 2008 2:09 am

Postby Chris.Allen » Mon May 21, 2012 3:09 pm

Have you tried using the SDK. It is the only supported way to customise interaction with the webservice.
Posts: 579
Joined: Thu Mar 12, 2009 3:17 pm

Postby JDHnz » Mon May 21, 2012 11:13 pm

Yes, the SDK is where I found how to retrieve new reports by invoking "SmartAssembly.com /downloadnewreports" (see the DownloadNewReportsClick() event handler in the Database SDK sample).

I could write my own web service to check for the presence of files in the configured ReportsFolder, but as they are encrypted reports I can't differentiate the exception reports from the feature usage reports, so I couldn't get a count of only the exception reports waiting on the server.

Is there really no other way of finding out if there are error reports waiting to be downloaded from the web service?
Posts: 13
Joined: Mon Sep 01, 2008 2:09 am

Postby james.billings » Wed Jun 13, 2012 3:14 pm


Chris is away on vacation right now so I thought I'd see if I could help - just to confirm, you're trying to get notified of new reports?

I'm not familiar with calling the URLs for the webservice via code, so I can't immediately help with the authentication error you got - are you using the custom web service or are your reports coming via our hosted one?

I think the easiest way is to use the SDK to download new reports as the Exception reports and Feature Usage ones go into separate tables as you already saw- but if that's not really useful you may want to look at the custom webservice (see here) and seeing if you can customise it to report back to your notifier somehow?
Posts: 1122
Joined: Wed Jun 16, 2010 10:10 am
Location: Red Gate

Postby JDHnz » Thu Jun 28, 2012 10:57 am

Hi James,

yes, that is correct. We are already running our own custom web server as you have suggested. Unfortunately, both the error and feature usage reports are saved as encrypted reports on the web server before they are downloaded by the SA client, so there doesn't seem to be a way for me to write my own addition to the web service to find out how many error reports there are waiting to be downloaded.

Most of the code in behind the custom web server is obfuscated of course, so it's not much help in working out what I need to call to get the information I need. I can see that there is a GetReportCount() web method on the ReportingService class behind the Reporting.asmx web service file, but it looks like it is checking details of an established session, which makes me suspect that a call to the SecuredLogin() web method on the same class is required, but that requires licenseID and password parameters for which I don't know the necessary values.
Posts: 13
Joined: Mon Sep 01, 2008 2:09 am

Return to SmartAssembly 6

Who is online

Users browsing this forum: No registered users and 0 guests