Quantcast
Channel: Martin Dráb's Activities
Viewing all articles
Browse latest Browse all 17532

Failed to login Microsoft Dynamics Ax in document service

$
0
0

Dear All

I have make a vendor Group document service and use in .net application,

when I used in .net application and going to create a vendor group 

then error occurred Failed to login Microsoft Dynamics Ax

and how to give Username and password in .net 

this is my .net code

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ConsoleApplication2.ServiceReference1;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{

VendorGroupServiceClient client = new VendorGroupServiceClient();

CallContext context = new CallContext();
context.Company = "EFST";
///context.do
context.LogonAsUser = "Administrator";

AxdVendorGroup document = new AxdVendorGroup();
document.VendGroup = new AxdEntity_VendGroup[1];
document.VendGroup[0] = new AxdEntity_VendGroup();
document.VendGroup[0].VendGroup = "Test";
document.VendGroup[0].Name = "TestGroup";

try
{
EntityKey[] entityKey = client.create(context, document);

Console.WriteLine("Done!");
}
catch (Exception e)
{
Console.WriteLine("Error:" + e.Message);
}

Console.ReadLine();
}
}
}

how to resolve it?

please.............


Viewing all articles
Browse latest Browse all 17532

Trending Articles