SVC error when deploying AIF service to IIS

If you are viewing an IIS error page like this after having published Your AIF service to IIS, the svc extension is probably missing in IIS:



This is probably caused by WCF not being correctly installed or registered in IIS.
To fix this do the following:

  1. Open a command prompt
  2. run the following command %windir%\\framework\v3.0\WindowsCommunicationFoundation\servicemodelreg -i

If you are running a 64 bit OS, You will have to decide whether to run the above command from the “framework64” folder og just the “framework” folder. The easy way to determine this, is to find out whether Your application pool for AIF is running in 32 bit mode. If not you can run the command for the 64 bit version  – otherwise You will have to use the 32 bit version.

To find out whether yourt application pool runs in 64 bit mode do the following:



  1. Go to the application pool section in IIS
  2. right click Your application pool – in this case the “MicrosoftDynamicsAXAif50” pool and select advanced settings
  3. Search the property “Enable 32 bit applications”. A value equal to false means we are running in 64 bit mode and vice versa.

5 thoughts on “SVC error when deploying AIF service to IIS

  1. Vijay Solanki

    Hi Friend,

    My query is related to AIF webservices which i want to host on IIS of a different machine which is in the Same domain itself.
    I am able to run all the services in netTCP adapter which are the basic integration ports of dynamics ax 2012.
    But i am unable to run this services using HTTP adapter.

    I have deployed some standard AIF services onto the IIS of my IIS Server machine using HTTP adapter.

    It is allowing me to add service reference into the .net application but when i am going to run my application its giving me error in the AIF service method line itself.
    an error related to authentication that user is not authorized to view contents of this page or directory.I have tried with Ax administrator login.

    I have implemented the standard code which is available on msdn for calling and AIF web service using HTTP adapter.

    This is my code of Console application. I have added Sales Order Service as service reference which is deployed on iis.

    static void Main(string[] args)
    // Create the sales order objects
    // Service client
    ServiceReference1.SalesOrderServiceClient cl = new ServiceReference1.SalesOrderServiceClient();

    // Sales order object to receive response
    ServiceReference1.AxdSalesOrder resp;

    // Create the entity key list for the request
    ServiceReference1.EntityKey[] readRespKeys = new ServiceReference1.EntityKey[1];
    readRespKeys[0] = new ServiceReference1.EntityKey();
    readRespKeys[0].KeyData = new ServiceReference1.KeyField[1];
    readRespKeys[0].KeyData[0] = new ServiceReference1.KeyField();
    readRespKeys[0].KeyData[0].Field = “SalesId”;

    // Ask the user for a sales order ID
    Console.WriteLine(“Enter the sales order ID:”);
    // Add the result to the entity key value
    readRespKeys[0].KeyData[0].Value = Console.ReadLine();

    // Try to read the sales order
    resp =, readRespKeys);
    // Display the information from the first sales table
    Console.WriteLine(“For sales order: ” + resp.SalesTable[0].SalesId);
    Console.WriteLine(“Customer Account is: ” + resp.SalesTable[0].CustAccount);
    catch (Exception e)
    Console.WriteLine(“Exception: ” + e.Message);

    Please provide some needful help that i can come out of this problem as soon as possible, and also third party should be able to use my services so ho can i pass credentials, because users wont be our Dynamics Ax users.

    Thanks in advance….

    1. Torben M. Philippsen


      Autehnticating against AIF services can be quite troublesome but if You are able to narrow down the problem the actual problem might reveal itself….
      First of all, please confirm that You are able to browse the service from a browser. If the user executing the browser is a valid domain user and that user has been granted access to the service You should be able to browse it, without providing any credentials – please confirm.
      Assuming this works, please consider in what user context Your .net application is running. Is it running in the context of the same user or maybe a different user who doesn’t have access?
      The error description that You provided sounds like it is the OS returing the error – which means that the execting user doesn’t have the necessay rights to access the service. AIF validation has not been performed yet. Please confirm that windows Autentication has been enabled for the AIF website.

      REgarding allowing thirdparty users to access Your service… In generel this was quite a problem in AX2009, bencause AX doesn’t allow anonymous users. In AX2009 the way was to have each user added to the Active Directory and secondly in AX. This was/is quite a chellenge since more and more mobile devices are integrated in variuios business solutions. Fortunately this problem has been addressed in AX2012. A couple a days ago I read this article, which might come in handy for You:
      I haven’t had the pleasure of working with AX2012 yet but these new features sound very promissing.

      Let me know, if You think I can be of any more help.
      Regards, Torben

  2. Tyrone

    I personally want to know exactly why you named this blog, “SVC error when deploying AIF service to IIS Philippsen’s Blog”. Either way I personally loved the post!Thanks a lot-Steffen

    1. Torben M. Philippsen

      Hi Steffen!
      Do you think it should be named something else?
      the reason why I named it, as far as I recall, is that the problem was that IIS couldn’t host my wcf service (svc file extension).
      Thank You very much for your feedback.


Comments are closed.