NAV2013 Web Service

sydaus
Member Posts: 10
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.
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
-
Looks like some code is using USERID and saving it into variable of length 20.0
-
kine wrote:Looks like some code is using USERID and saving it into variable of length 20.
There is USER ID "NT AUTHORITY\NETWORK SERVICE" in the SQL database.0 -
What about codeunit 1 code? The problem could be there (you can try it by creating some simple webservice doing nothing and call it. If there is still same error, then problem could be in CU1). And that your account is different could mean that delegation is not workng correctly or something similar.0
-
Hi,
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.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions