AX 2012: Validate Settings Fails for Report Server Configuration

Published on Tuesday, July 9, 2013 in

Setting up AX 2012 Reporting involves installing SQL Reporting Services and registering that Reporting Services installation in AX. One of the issues we were having is that we were seeing some problems deploying reports. In order to troubleshoot we tried the Test-AxReportServerConfiguration cmdlet.


This cmdlet was telling us: the report server URL accessible: False Hmm. That’s odd. We’re pretty sure that all involved URLs (Report Server Manager & Report Server Service) were properly resolving and responding. When double checking the AX Report Server configuration within the AX Client we tried the validate settings button:


However, we stumbled upon the following error:


In words:  Exception has been thrown by the target of an invocation. The SQL Server Reporting Services server name RPRTAX1B.contoso.com does not exist or the Web service URL is not valid.

As it kept complaining about the URL I started to suspect what could be the root cause. From earlier experiences (Dynamics Ax 2012: Error Installing Enterprise Portal)  I know that not all AX components can properly handle host headers. Because this is how our SQL Reporting Services host header configuration looks like for the Report Server URL:


Jup, we got multiple entries. The reason is somehow historical and not relevant here. It seems that AX, when validating the settings, checks whether the Report Server URL matches with the first host header in the SQL Reporting Services configuration. So I went ahead, removed all entries but the good one, ok-ed and applied. After that I re-added them. This ensured the URL AX knows of was on top of the list. And jup, everything started working!

A colleague from the AX team showed me which code was performing this check. Here’s the offending code:

public boolean queryWMIForSharePointIntegratedMode(str serverName, str _serverUrl)


    boolean result = false;



        result = Microsoft.Dynamics.AX.Framework.Reporting.Shared.Proxy::QueryWMIForSharePointIntegratedMode(serverName, _serverUrl);


    catch (Exception::CLRError)


        // We must trap CLRError explicitly, to be able to retrieve the CLR exception later (using CLRInterop::getLastException() )


        result = false;


    return result;


And that’s how I come to part two. When creating Report Server configurations within AX, one might be wondering how to register a load balanced Reporting Services setup…

Here’s the configuration extract of the server name & URLs for such a configuration. Now how do we handle the fact that there’s 2 Servers and one (virtual) load balanced URL?


In a load balanced setup with 2 reporting servers you’ll typically have 3 configurations FOR EACH AOS instance:

  1. RSServerA(Default Configuration: unchecked)
    1. Server name: ServerA
    2. Report Manager URL: axreports.contoso.com/reports
    3. Web service URL: axreports.contoso.com/reportserver
  2. RSServer B (Default Configuration: unchecked)
    1. Server name: ServerA
    2. Report Manager URL: axreports.contoso.com/reports
    3. Web service URL: axreports.contoso.com/reportserver
  3. RSVirtualServer (the Load Balancer) (Default Configuration: checked)
    1. Server name: ServerA
    2. Report Manager URL: axreports.contoso.com/reports
    3. Web service URL: axreports.contoso.com/reportserver

Now the clue is in the server name: this is the name which is being used to contact the actual Windows server for certain information. Like in the code above, the server will be contacted over WMI to read the requested setting. If you were to enter “axreports.contoso.com” as a servername, you’ll be seeing all kinds of errors. For starters typically your load balancer only balances port 80 or 443, but WMI uses other ports. So these connections will fail. As far as I learned from my AX colleague, the AOS instance can use the load balancer configuration entry, and you can use the node configuration for your report deployments. In that way, the server name probably doesn’t matter that much on the load balancer configuration item.

I hope I don’t sound to cryptically, if you like any further explanation, feel free to comment.

Related Posts

4 Response to AX 2012: Validate Settings Fails for Report Server Configuration

20 September, 2013 14:50

cool, also work for "Invalid URI: The hostname could not be parsed."

03 December, 2013 03:40

Hi, I encounter nearly the same problem.. When i just start AX 2012 R2, the system take longer time than usual. Then, POP! Error msg "Exception has been thrown by the target of an invocation" appeared..
It happens randomly.. Realy frustating, because i have to close AX and wait for some minutes. Then, sometimes i can start AX again without problem
Any idea, whats goin wrong?

10 February, 2014 16:22

When using Load Balanced scenario, if entering the Windows servername as ReportServer, and load balanced name as ReportServerURL, and WebServiceURL then all Validates ok, but if using load balanced name as ReportServer name, as you suggested, then it fails with "SQL Server Reporintg Services server name does not exist" - but surely this is not a valid test - what if that server happens to be offline? What'll happen to reporting?

11 February, 2014 08:16

Darren, I'm not 100% sure.

For starters I would say: configure it that way and shut down your serverA. See what happens and learn from it :) My guess would be that reporting as it is would be unaffected. What I can imagine is that deploying new reports using AX utilities might fail. That's all I think.

Rendering reports inside AX UI should be just fine. But I cannot guarantee this. I'm not an AX expert, I only know some of the EP from an infrastructure point of view.

Add Your Comment