Hi,
I tried to run a test program to call a DOT NET dll to run a codeunit that published on web service, but I got the following error message:
This message is for C/AL programmers: A call to XXX.XXX.XXX (dot net dll variable) failed with this message: The length of the string is 28, but it must be less than or equal to 20 characters. Value: NT AUTHORITY NETWORK SERVICE
I have a user id (NT AUTHORITY\NETWORK SERVICE) in SQL server, but I am not sure of whether there are any relations on this.
Does anyone have ideas on this?
Thanks.
0
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
There is USER ID "NT AUTHORITY\NETWORK SERVICE" in the SQL database.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
I found the problem. We can't use the Default Credentials.
ws.UseDefaultCredentials = true; // The code will use default ID "NT AUTHORITY\NETWORK SERVICE"
Changed the codes to:
ws.Credentials = new NetworkCredential("XX", "XXXX", "XXXX"); //User ID, Password, Domain.