WCF Configuration

This question has suggested answer(s)

Hi,

We have an AX 2012 installation and we are receiving this error when trying to "Refresh" the WCF Configuration through the AX Config Util:

An error occurred while regenerating WCF configurations: Unable to connect to a Microsoft Dynamics AX WCF Service.  Ensure that the Microsoft Dynamics AX AOS has fully started and that the requested WCF service in available.  See the Exception message below for details: > Metadata contains a reference that cannot be resolved:  http://servername:8102/DynamicsAX/Services/metadata"

Please Help.

Thank you,

All Replies
  • Please confirm this modelstore is fully compiled and CIL is also compiled without errors.

    After having it compiled without errors, please do a restart of the AOS allowing it to pick up any new or changed assemblies.

    Then finally you can try to refresh the WCF configuration.

    Tommy Skaue | Dynamics AX Developer from Norway | http://yetanotherdynamicsaxblog.blogspot.no/ | www.axdata.no

  • HI,

    After the CIL compiled successfully i am receiving the below error:

    The CIL generator found errors and could not save the new assembly.

    Any clue.?

    thank you,

  • It could throw due to a incomplete and insufficient X++ compilation. You can try open the CIL compilation log and investigate further, or you could do a full compilation just to be sure. If there are many developers on this particular AOT, you might need to do a full compile just to make sure everything is covered. In R2 that can take several hours to compile.

    Read more here:

    axwonders.blogspot.no/.../solving-error-cil-generator-found.html

    (also check the comments below article)

    Tommy Skaue | Dynamics AX Developer from Norway | http://yetanotherdynamicsaxblog.blogspot.no/ | www.axdata.no

  • Hi,

    I did all the steps mentioned above and still having the same error. the description of the CIL errors is different than the link that you sent. below is the description error:

    CIL generation: Error 1. Class: DemoDataSources, Method: InsertDemoDataSources, Exception: System.NullReferenceException: Object reference not set to an instance of an object.

    Thanks,

  • Is there more than one AOS into the same server?

    Can you verify if the inbound ports are opened? (System Admin > Setup > Services and application integration framework.

    Start the ports which are not started.

    Dont forget to mark this as answer!

    Francisco Silva | | http://fsilvajunior.blogspot.com.br

    This posting is provided "AS IS" with no warranties, and confers no rights.

  • Yes, two AOS into the same server. the first is working perfectly.

    most of the ports has not started, once i try to click on "retry activate" same error occurs:

    The CIL generator found errors and could not save the new assembly.

  • Have you compiled the entire AOT as Tommy said?

    After to compile the AOT restart the AOS and try to refresh the WCF using the AX Configuration Utility.

    Dont forget to mark this as answer!

    Francisco Silva | | http://fsilvajunior.blogspot.com.br

    This posting is provided "AS IS" with no warranties, and confers no rights.

  • Yes i compiled the AOT and i refreshed the WCF and this error occurs:

    an error occurred while regenerating WCF configuration: unable to connect to a Microsoft dynamics AX WCF service. ensure that the Microsoft dynamics AX AOS has fully started and that the requested WCF service is available. see the exception below:

    > metadata contain a reference that cannot be resolved: "http://servername:8102/dynamicsax/services/metadataservice.

  • I had the exact same situation here with 2 AOS and 2 SSRS on the same machine... I was able to fix it by modifiing the ax32serv.exe.config file of the AOS with the faulty metadata reference.... Actually, the ports specified were the same in both .config file :\... so I simply add +1 to those ports:

    <?xml version="1.0" encoding="utf-8"?>

    <configuration>

     <appSettings>

       <add key="ServicePort" value="8202" />

       <add key="WsdlPort" value="8102" />

       <add key="ODataQueryPageSize" value="1000" />

     </appSettings>

     <runtime>

     

    All is fine by now! :)

     

    Oh yeah, and though the the client configurations AND server configurations were perfectly set with the right ports for both AOS instances, I still was having the stupid invalid and unreachable error : http://[servername]:8102/DynamicsAx/Services/MetadataService