web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

WCF Configuration

(0) ShareShare
ReportReport
Posted on by

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,

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Tommy Skaue Profile Picture
    Moderator on at

    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.

  • Community Member Profile Picture
    on at

    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,

  • Tommy Skaue Profile Picture
    Moderator on at

    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)

  • Community Member Profile Picture
    on at

    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,

  • Suggested answer
    fsilva-jr Profile Picture
    20 on at

    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.

  • Community Member Profile Picture
    on at

    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.

  • fsilva-jr Profile Picture
    20 on at

    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.

  • Community Member Profile Picture
    on at

    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.

  • Suggested answer
    Community Member Profile Picture
    on at

    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

  • kc82 Profile Picture
    on at

    I've had this occur on a new configuration file - setting the incorrect value on the WDSL port.  Easily fixed by checking the ax32serv.exe.config and confirming the metadata service URL.  Then edit Connection > WDSL Port to the right value, by default it's 8101.  From experience, when doing a new installation of AOS, it pays to do a refresh configuration BEFORE you attempt the initialization check list.  That way you won't run into the WCF error down the line.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans