Monday, December 19, 2011

AX 2012 WCF Error: 'The specified client configuration does not contain valid WCF settings'

I hit the following error while working in AX 2012: 'The specified client configuration does not contain valid WCF settings' (Figure 1 below).  This seemed to happen all over the place when specfic actions were done. Didn't care or have enough time to pin point what.  The actions were pretty varied and seemed almost random.  Try running the On Hand Inventory report...

This error was only encountered in AX 2012.  It is because of an issue with a new feature in the AX configuration file that needs to be fixed through the configuration utility.  Do the following to fix the issue:
  1. Open the .axc where this issue was being seen in the Microsoft Dynamics AX Configuration Utility.
  2. Click on the 'Connection' tab
  3. Click on the 'Refresh' button and wait for the proces to complete.
  4. Click on the 'Configure Services' button'
  5. You will now see the info message in Figure 2. Click 'Ok'
  6. You will now see the info message in Figure 3. Click 'Yes'
  7. You will now see the info message in Figure 4. Wait for the process to finish.
  8. You will now see the info message in Figure 5. Click 'Ok'
  9. A new window for Microsoft Service Configuration Editor will appear (Figure 6 below).  You can close this screen.
  10. Save this configuration
  11. Open the config file and verify there is an XML section of the file (Figure 7 below).
  12. Replace the config file in all the user's desktop with the new one.
Figure 1 - The error at hand...
Figure 2 - Clicking 'Configure Services' will give this information. Click 'Ok'

Figure 3 - Clicking 'Ok' in Figure 2 gives this message. Click 'Yes'
Figure 4 - Clicking 'Yes' in Figure 3 will show this process window.  Wait for it to finish
Figure 5 - Once Figure 4's process is complete, this information is presented. Click 'Ok'
Figure 6 - This pops up at the end of the process.  Just close out of it.
Figure 7 - This is what opening the new .axc file looks like after running that process.

13 comments:

  1. Very Informative, but I’ve a issue, currently I’ve AX2009 and AX2012 both versions, when I created client version in my machine, try to open it throws error “Invalid configuration file”. This is due to Client accessing client application (AX32.exe for 2009 and AX32.exe for 2012), so I tried several times using “Open with” and selecting AX2012 client AX32.exe but still it throws error, do you have any solution for this.

    ReplyDelete
  2. I've seen similar things with other versions of AX (3.0, 4.0, and 2009). There are a few things we can check before jumping into the depths of the registry.

    First, are the different AX versions' AOSes on the same server? Do the AOS'es have different port numbers?

    ReplyDelete
    Replies
    1. HI DAX,
      I am having the same issue currently. I have AX 2009 and 2012 installed in same machine and both are accessing the AOS using same TCP/IP port. Whenever I try to access the AOS from visual studio, it throws the same error as mentioned in your post. Any suggestions?

      Delete
    2. I fixed the problem. I tried everything that are posted in this post but did not work. It helped me to point to the solution though. The solution that I tried is mentioned in Microsoft documentation site. http://msdn.microsoft.com/en-us/library/gg889291.aspx. I was having problem connecting to AOS from the visual studio for reporting purpose as it threw the same error as mentioned in this post. The solution is:

      "To create a configuration for Reporting Services, run the Microsoft Dynamics AX configuration utility as an administrator, and then click Manage > Save configuration as file, and give the configuration a name like Microsoft.Dynamics.AX.ReportConfiguration.axc. The file must be saved in the PrivateAssemblies folder in the Visual Studio IDE installation directory, like the following:

      C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies. "

      Delete
    3. Alok, That's pretty interesting. Thanks for sharing! I haven't run into that variation of getting this error.

      It's definitely why I like putting posts out there and getting everyone in the community to contribute to issue resolution. Hopefully your information will save someone a few hours of headaches.

      Delete
  3. Is this post fixing everyones issues? I know how to fix the issue so its just a matter of making sure it translates properly to text.

    If its missing something or does not help you go through the process perfectly, PLEASE let me know and I'll make sure this is addressed.

    This post is getting a lot of hits so I know people are reading this. I just want to make sure it doesn't suck and is the last post you have to search with the fabulous Bing for.

    ReplyDelete
  4. Hey there, it fixed my issues but showed less windows than what you said. anyhow, it worked wonderfully.

    ReplyDelete
  5. I couldn't understand "Figure 7 - This is what opening the new .axc file looks like after running that process."
    Also unable to achieve the below:
    "10.Save this configuration
    11.Open the config file and verify there is an XML section of the file (Figure 7 below).
    12.Replace the config file in all the user's desktop with the new one."
    After I click 'Configur services, click Ok, a note pad is getting opened, and nothing happens after that. I closed the note pad.
    AX Version : AX 2012R2
    Please help.

    ReplyDelete
    Replies
    1. Unknown,

      Sorry for the delay in getting back. I didn't notice this comment for some reason...

      Figure 7 is just a verification of the WCF configurations in the .axc file. If you do all the steps in the above, you open the .axc in txt editor and it doesn't look like Figure 7, you have something going on... It's just a little validation step I added to help in verification of the process.

      For steps 10-12, you should be able go to 'Manage' in the AX client config utility (top right of the form) and save the configuration as a .axc file. Remember that the file type 'axc' stands for 'AX Configuration'. (step 12) You can then propagate this new .axc to the users desktops.

      A notepad pops up and nothing happens? I've done this in AX 2012 R2 (fewer steps now) but have not seen this. Do you want to email a PSR (problem steps recorder) file of what you're seeing? I'm sure we can resolve it in a few minutes with that. Just let me know!

      Delete
  6. Hi DAX,

    When i try to regenerate the configuration which you mentioned in figure 3 i am getting the below error.
    "An error occurred while regenerating WCF configuration:
    Exception occurred on the metadata service on client or server.
    See exception details below:
    >The Server has rejected the client credentials.
    Could you please help me to resolve??
    Thanks in Advance

    ReplyDelete
  7. Malleswaran,
    I have not seen that error but we can break it down by typing out loud:
    -The error is being thrown when trying to regenerate the configuration.
    -The client creation application is attempting to talk with the AOS and get the information it needs put into the.axc (AX client) file.
    -The 'rejected the client credentials' makes me think its a permissions issue
    Potential solution: Are you generating the file using an admin account? If not, try this.
    Another troubleshooting step: To eliminate other variables, try logging directly onto the server where the .axc will link (AOS Server) and try to create the .axc like you did in the other server.

    ReplyDelete
  8. I followed all the steps but not resolved,
    I found the root cause, after followed the steps we need to create new configuration file,
    we need to open AX with new configuration file the issue resolved,
    I tried to open again with old configuration file again I got this error,
    so please delete old file and use new file and enjoy…

    ReplyDelete
  9. It's working!! Thx u very much..

    ReplyDelete