Hi,
I have used customer service ,when i try to access the service operation getting the below error,
static void Main(string[] args)
{
ServiceReference1.CustomerServiceClient c1 = new ServiceReference1.CustomerServiceClient();
// ServiceReference1.CriteriaElement elem = new ServiceReference1.CriteriaElement();
ServiceReference1.QueryCriteria qr = new ServiceReference1.QueryCriteria();
CriteriaElement[] qe = { new CriteriaElement { } };
EntityKey[] entityKey = { new EntityKey { } };
qe[0].DataSourceName = "CustTable";
qe[0].FieldName = "AccountNum";
qe[0].Operator = Operator.Equal;
qe[0].Value1 = "xxxxxx";
qr.CriteriaElement = qe;
Bcn.Axapta axp;
axp = new Bcn.Axapta();
axp.Logon(null, null, null, null);
// c1.ChannelFactory.Credentials.UserName.UserName = "xxxxxt";
//c1.ChannelFactory.Credentials.UserName.Password = "xxxxxx";
entityKey = c1.findKeys(qr);------------------------>Getting error "You cannot log on to Microsoft Dynamics AX.. Error details: Failed to initialize Business connector.. Check the Web server event viewer for more information, or contact your Administrator."
if (null == entityKey)
{
}
else
{
c1.read(entityKey);
}
}