Options

User credential check in a NAV three tier environment

DHendriksenDHendriksen Member Posts: 32
edited 2011-07-02 in NAV Three Tier
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 ~%$@&amp;%!$#, 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

Comments

  • Options
    kinekine Member Posts: 12,562
    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?
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    DHendriksenDHendriksen Member Posts: 32
    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,
    Don
  • Options
    kinekine Member Posts: 12,562
    Yes, I think same...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    pdjpdj Member Posts: 643
    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
    Peter
Sign In or Register to comment.