Error while Consuming Ax 2009 web service in external application

Hi,

I am trying to access Ax web service from external web application. while using the service I was getting error of authentication.

“You cannot log on to Microsoft Dynamics AX… Error details: You are not a recognized user of Microsoft Dynamics AX. Contact your system administrator for help… Check the Web server event viewer for more information, or contact your Administrator. Server stack trace: at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation,”

Still I was able to open Ax application.

then I tried to use admin user as per below

AxService.CustomerServiceClient request = new AxService.AxService.CustomerServiceClient();

request.ClientCredentials.Windows.ClientCredential.UserName = “xyz”;

request.ClientCredentials.Windows.ClientCredential.Password = “xyz”;

request.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation;

request.ClientCredentials.Windows.AllowNtlm = true;

customer.SenderId = “test”;

request.create(customer);

still I am getting error of request failed. see server log.

Please provide your valuable thoughts.

Thanks,

Mahek Shah

Hi,

The AX credentials that you are providing in your external application is not valid. Since you mentioned that it is AX web service, I assume you have published this and that you are able to access the WSDL.

To trouble shoot, you can try calling the WSDL from an application such as XMLSpy.

You need to do following seps in order to troubleshoo:

1)AX Web service WSDL is displayed in the browser?
2)Business connector(BC) should be installed.
3)BC account should be created in active directory.
4)BC account needs to be configured in AX
Administration->Setup->Security->System service accounts
5)AX web service application pool must be running as BC proxy account.

Let me know in case of any further issues.

Hi Mahek,

I will be very thankful to you if you will share the solution of the project you have made as I am also working on same type of project where I have to access AX Web Service from a external Web Application …

I am not getting any solution from any where ,so plz help me ASAP.

Actually the brief description of my project is , I want to transfer AX data to external system data base through web services.Also the data should be inserted into the database automatically after every fixed period of time.