Scheduling/Subscription Issues

If you are getting errors while using the Scheduling/Subscription feature, then please see the following trouble shooting steps:

For "Exception has been thrown by the target of invocation" error please jump to step 4

If you haven't done so, please add the following key under the <appSettings> section of Analyzer's web.config file found in Analyzer\web directory:

    <add key="SubscriptionServer" value="true" />

Also you might want to add the following key to specify which URL Analyzer agent should use to call (execute) Analyzer when it is time to process the report. Without specifying this value, Analyzer will simply use the URL from the first user who login to Analyzer as the default URL, this is fine normally. However in some deployments, the URL that user uses might not be the same (or might not be callable) from within the IIS server, in this case, please specify a URL that is callable from the IIS server.

    <add key="AnalyzerInternalUrl" value="http://csserverx64/Analyzer/"/>

Please note that the URL specified must end with "/" in order to work!
For example:

      Good URL  
      Bad URL

1. Go to Analyzer System Administration > Mail Server configuration. Please verify to see if all settings for the mail server is correct.

2. The error “The transport lost its connection to the sever” is caused by the email server’s inability to send Analyzer report as attachment, therefore you should get the same issue when you try to send Analyzer report as message with the “Send as attachment” option checked. So let's test this by open a report then select "Send Message" from the toolbar:

Check the "Send report as email attachment" checkbox, enter a valid email address, then click the Send icon on the toolbar to send the message:

If you are getting error at this point, then please uncheck the "Send report as email attachment" then try to send it again.

If you can't send message using either setting, then please go back to the Mail Server Configuration to verify you mail setting. Contact your IT department to find out what are the proper settings.

If you can send message while "Send report as email attachment" is unchecked, then this means that your email server is unable to send Analyzer report as attachment. Please check with your network IT department to see what is the best way or alternative ways to send the email with attachment (preferably using the standard SMTP port 25).

For example with Google Mail using its documented SMTP port ID 587 with SSL, it is unable to send Analyzer report as attachment, but it will work fine if the report is send as inline report. By switch Google mail SMTP port ID to 25 with SSL, then Google Mail Sever now can send both inline report or attachment.

3. If there is absolutely no other alternative that your IT can provide, then please add this key to your Analyzer’s Web.config file under the <appSettings>:
<add key=”MailReportOption” value=”true” />

What this key does is to allow you to send the scheduled report as inline report, but the drawback is that this only can send one sheet at a time.

4. If you are receiving the "Exception has been thrown by the target of invocation" error, then this normally indicates the account used to access the Analyzer system database has no privilege to create a SQL Server Agent job. Analyzer's scheduling/subscription feature utilize SQL Server Agent to execute the job for scheduled tasks. If you have setup your system using Windows Authorization, then please make sure the user accounts that access the database have the proper privilege to create a SQL Server Agent job. If you have setup your Analyzer system database using a SQL Account (preferred) then please make sure the account has enough privilege to create SQL Server Agent jobs:

If you feel uncomfortable to assign sysadmin privilege to this account then please see this Microsoft document on setting up SQL Server Agent Fixed Database Roles.

5. Another way to check if SQL Agent jobs has executed successfully is to verify it using the SQL Agent Job Activity Monitor in the Microsoft SQL Server Management Studio:

6. If you Analyzer site's application pool (AppPoo) recycles periodically (by default it does unless modified) then please change the following settings in IIS to ensure Analyzer restarts automatically after recycling.
First set Analyzer's AppPool application pool to be AlwaysRunning

Next set Analyzer site to pre-load

However for performance reasons Analyzer does not start running until a user login therefore please see document below to trigger the start up.

7. If you are still not receiving report (and/or no events in event log), then it could be that the schedule agent timed out during process of the report, please add the following key to Analyzer's Web.config. The value is in second, so the example below is 10 minutes, please adjust accordingly.
<add key="Subscription.OperationTimeout" value="600" />

If you are running Analyzer 3.0.2358 and up, please also add the following two keys to the Web.config file.

<add key="Subscription.MaxQueueSize" value="9999" />

    This key controls how many job records are allowed inside the JobQueue table. The subscription/scheduling engine checks the JobQueue table once every 60 seconds, if it finds more records than allowed by the Subscription.MaxQueueSize it then deletes the extra records. By default the value is 1 if this key is not specified which might have undesirable effects therefore if you are using the Subscription/Scheduling feature it is recommended to set the value to a large value like 9999. 

<add key="Subscription.PollingSize" value="1" />

    This key controls how many job records each subscription/scheduling engine takes from the JobQueue table. This is useful in a Load Balanced environment that each Analyzer has one subscription/scheduling engine looking at the JobQueue table. By default the value is set to 1 if the key is not define specifically.



Have more questions? Submit a request


Please sign in to leave a comment.