AX Web Service

Hi all

I am trying to create an application in c# to createListCustomer method in DynamicsWeb Service.

CustomerService cservice = new CustomerService();

DocumentContext context = new DocumentContext();

context.MessageId = Guid.NewGuid().ToString();

context.DestinationEndpoint = “AifEndPoint”;

context.SourceEndpoint = “AifLocalEndPoint”;

context.SourceEndpointUser = Environment.ExpandEnvironmentVariables(“ehdbadmin.local\Test%”);

AxdCustomer testcust = new AxdCustomer();

testcust.CustTable = new AxdEntity_CustTable[1];

testcust.CustTable[0] = new AxdEntity_CustTable();

testcust.CustTable[0].CustGroup = “CUS”;

testcust.CustTable[0].Name = “Geronoid”;

cservice.Credentials = new System.Net.NetworkCredential(“Test”, “eighth1lls”,“ehdbadmin”);

cservice.Url = “http://localhost/DynamicsWebService/CustomerService.asmx”;

cservice.Discover();

EntityKey[] ek = null;

ek = cservice.createListCustomer(context, testcust);

bu t iam getting error as cannot logon to AXAPTA.

System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: Server was unable to process request. —> System.ApplicationException: You cannot log on to Microsoft Dynamics AX… Error details: . Check the Web server event viewer for more information, or contact your Administrator. at Microsoft.Dynamics.IntegrationFramework.WebService.IntegrationProcessor.SubmitMessage(String aifMessage) at Microsoft.Dynamics.IntegrationFramework.WebService.IntegrationProcessor.ProcessRequest(DocumentContext documentContext, String[] parameterTypes) at Microsoft.Dynamics.IntegrationFramework.WebService.CustomerService.createListCustomer(DocumentContext DocumentContext, AxdCustomer Customer) — End of inner exception stack trace — at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at customerone.CustomerService.createListCustomer(DocumentContext DocumentContext, AxdCustomer Customer) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ax\14c2ec6e\55fda366\App_WebReferences.3yjovm-l.0.cs:line 309 at _Default.Page_Load(Object sender, EventArgs e) in e:\ax\Default.aspx.cs:line 33

Did you find the solution for the same?? I have the same problem if ny one have solution please to know me. Thanks