User credential check in a NAV three tier environment

DHendriksen
Member Posts: 32
Hi all,
As you all probably know you can validate an user password by the following code:
IF recUser.GET(codUser) THEN BEGIN
recUser2."User ID" := recUser."User ID";
recUser2.VALIDATE(Password,txtPassword);
IF recUser2.Password <> recUser.Password THEN
ERROR('Password is incorrect')
ELSE
ERROR('User validated');
END;
But this procedure doesn’t work when you pass the user and password using the Dynamics NAV Web service. The result is that the password from the recUser is something like ~%$@&%!$#, and after validating the txtPassword it still shows me the password. So the encryption does not work.
Does anyone have any idea what's this all about, and is there a solution? Is it the three tier environment why the encryption does not work?
Thanks in advance.
Greetings,
Don
As you all probably know you can validate an user password by the following code:
IF recUser.GET(codUser) THEN BEGIN
recUser2."User ID" := recUser."User ID";
recUser2.VALIDATE(Password,txtPassword);
IF recUser2.Password <> recUser.Password THEN
ERROR('Password is incorrect')
ELSE
ERROR('User validated');
END;
But this procedure doesn’t work when you pass the user and password using the Dynamics NAV Web service. The result is that the password from the recUser is something like ~%$@&%!$#, and after validating the txtPassword it still shows me the password. So the encryption does not work.
Does anyone have any idea what's this all about, and is there a solution? Is it the three tier environment why the encryption does not work?
Thanks in advance.
Greetings,
Don
0
Comments
-
Because the Webservices are working only with windows authentication, isn't it better to use the standard windows authentication? Do you really ask user for password and validate it yourself?0
-
Because the (client) software runs on a terminal which is used by several employees we have chosen to not use Windows logon.
I guess that the finsql.exe can encrypt a password, and the Dynamics NAV server (where all request are processed from the Web service) can not encrypt a password. The reason for this thought is the only possibility to use Windows logon. Does anyone agree this?
Regards,
Don0 -
-
This method only works for on the Native DB and only for Database Logins.
To validate a SQL userid/pwd you could try to make an ADO connection using the specified credentials.Regards
Peter0
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