No valid document identified in the entity key - exception

I successfully activated an integration port for a standard SalesOrderRead service using http adapter in AX 2012. To consume this service I created a C# Console Application project in Visual Studio 2012(for this I referred the walkthrough given on msdn, here’s the link http://msdn.microsoft.com/en-us/library/hh496418.aspx).

Now when I run the VS 2010 project, an error is popped stating, “No valid document identified in the entity key”. I have checked the web site configurations and also the access permissions in IIS manger, all of them are as required.

Please suggest a solution for the exception.

Thanks in advance.

Snehal

I just had this issue in AX 2009. Check to make sure that your company is set correctly in the CallContext that you are passing in to the read() method.