الأحد، 14 ديسمبر 2014

ax 2012 user is not authorized for this port

ItemServiceClient Service = new ItemServiceClient()
 //********* Add the following to your code *********
Service.ClientCredentials.Windows.ClientCredential.Domain = "domain";
Service.ClientCredentials.Windows.ClientCredential.UserName = "username";
Service.ClientCredentials.Windows.ClientCredential.Password = "password";
Service.Open();
.
.
.
.
 CallContext ctx = new CallContext() { Company = "dat" };
  ctx.MessageId = Guid.NewGuid().ToString();
  ctx.LogonAsUser = String.Format(@"domain\username");

ليست هناك تعليقات:

إرسال تعليق