Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

WCF Configuration

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: WCF Configuration

    Tks Francisco, resolvi com sua dica.

  • kc82 Profile Picture
    kc82 on at
    RE: WCF Configuration

    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.

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: WCF Configuration

    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

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: WCF Configuration

    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.

  • fsilva-jr Profile Picture
    fsilva-jr 20 on at
    RE: WCF Configuration

    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
    Community Member Microsoft Employee on at
    RE: WCF Configuration

    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.

  • Suggested answer
    fsilva-jr Profile Picture
    fsilva-jr 20 on at
    RE: WCF Configuration

    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
    Community Member Microsoft Employee on at
    RE: WCF Configuration

    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,

  • skaue Profile Picture
    skaue on at
    RE: WCF Configuration

    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
    Community Member Microsoft Employee on at
    RE: WCF Configuration

    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,

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,711 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans