Trying to implement Web Services in Microsoft Dynamics AX 2009, we can obtain the following error if we have installed the .NET Framework 3.5 SP1 for Windows 7 and Windows Server 2008 R2:

Error
Could not load type
‘System.Data.Services.Providers.IDataServiceUpdateProvider’ from assembly PublicKeyToken=XXXXXXXXXX’.

 

This error has nothing to do with Dynamics AX, it’s a .NET Framework’ bug that can be resolved with the .NET Framework 3.5 SP1 Update:

After installing the update, the server must be restarted.

After that, we obtained another error:

image_thumb_64A9D777

Server Error in ‘/MicrosoftDynamicsAXAif50’ Application.
Security settings for this service require Windows Authentication but it is not enabled for the IIS application that hosts this service.

This time, the solution is in IIS:

    1. Check the Dynamics AX Site permissions in IIS:image_thumb_1_64A9D777

      Windows Authentication has to be Enabled, and important all the other types has to be Disabled:

      image_thumb_2_64A9D777

    2. If we have the permissions OK, and the Web Services doesn’t work yet, we have to open the “web.config” file of our Site:   image_thumb_4_4FB85504 image_thumb_6_4FB85504

       

      And change on it the “clientCredentialType”, replacing “Windows” per “Ntlm”

      Before:

    <system.serviceModel>
    <bindings>
    <basicHttpBinding>
    <binding name=”basicHttpBindingWindowsAuth”>
    <security mode=”TransportCredentialOnly”>
    <transport clientCredentialType=”Windows” />
    </security>
    </binding>
    </basicHttpBinding>
    </bindings>

    After:

    <system.serviceModel>
    <bindings>
    <basicHttpBinding>
    <binding name=”basicHttpBindingWindowsAuth”>
    <security mode=”TransportCredentialOnly”>
    <transport clientCredentialType=”Ntlm” />
    </security>
    </binding>
    </basicHttpBinding>
    </bindings>

    With this change made, the Web Services should work:

    image_thumb_3_4FB85504

    Bibliography:

    http://social.msdn.microsoft.com/Forums/en/wcf/thread/021babc6-2009-4ed9-81f4-ac48cc300c94?prof=required

    Thanks to my colleagues, Guillermo Bas and Sergio Carrillo for your great help with this issue!