Question Status

Suggested Answer
GeorgeH asked a question on 2 Sep 2013 2:55 AM

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,

Reply
Suggested Answer
Tommy Skaue responded on 2 Sep 2013 3:42 AM

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

Reply
Suggested Answer
Francisco Silva responded on 18 Sep 2013 9:43 AM

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.

Reply
Suggested Answer
Gin responded on 20 Sep 2013 1:22 PM

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

Reply
Suggested Answer
Tommy Skaue responded on 2 Sep 2013 3:42 AM

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

Reply
GeorgeH responded on 14 Sep 2013 11:08 PM

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,

Reply
Tommy Skaue responded on 15 Sep 2013 3:03 AM

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

Reply
GeorgeH responded on 17 Sep 2013 9:14 AM

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,

Reply
Suggested Answer
Francisco Silva responded on 18 Sep 2013 9:43 AM

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.

Reply
GeorgeH responded on 18 Sep 2013 10:25 AM

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.

Reply
Francisco Silva responded on 18 Sep 2013 10:33 AM

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.

Reply
GeorgeH responded on 18 Sep 2013 10:46 AM

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.

Reply
Suggested Answer
Gin responded on 20 Sep 2013 1:22 PM

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

Reply
kc82 responded on 26 Jun 2014 5:16 PM

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.

Reply