Options

Authentication failes when compiling through C/AL

naffnaff Member Posts: 32
Hi,

I try to compile an object via some code. But somehow I allways get an authentification error. The object compiles successfully, but the log file still shows me some error that I am not able to understand.

My Code:
OnRun()
ArgumentsText :=
  'servername="localhost",' +
  'database="Demo Database NAV (9-0)",' +
  'command=compileobjects,' +
  'filter="Type=Table;ID=50000",' +
  'synchronizeschemachanges=force,' +
  'logfile="C:\TEMP\log-7A5929A029B0456BBB7FD31CE7A0117C.txt",' +
  'id=,' +
  'ntauthentication=1';

Process := Process.Start('C:\Program Files (x86)\Microsoft Dynamics NAV\90\RoleTailored Client\finsql.exe', ArgumentsText);
Process.WaitForExit;

MESSAGE('done');

After running this code I get the following text in the log file.

Log file:
[31719426] Die Änderungen an der Tabelle konnten nicht verarbeitet werden, weil der aktuelle Benutzer von der Microsoft Dynamics NAV Server-Instanz nicht authentifiziert werden konnte.

Prüfen Sie Folgendes:
1. Der aktuelle Benutzer muss ein NAV-Benutzer in der Datenbank sein.
2. Microsoft Dynamics NAV Development Environment wird als Administrator ausgeführt. 
3. Der aktuelle Benutzer ist Administrator und die Benutzerkontensteuerung ist deaktiviert. -- Object: Table 50000 OM - Temporary Check Table

I start the code through the Development Environment. I am the only user in NAV and have SUPER permissions. I also have db_owner membership on this database. UAC is turned off.

Any ideas?

Best Answer

Answers

  • Options
    lhlDKlhlDK Member Posts: 11
    Hi.
    Dunno if it is this but,
    If you use 'synchronizeschemachanges=force' shouldn't you specify:
    'navservername=xxxx,'+
    'navserverinstance=yyyy,'+
    'navservermanagementport=9999,'
  • Options
    naffnaff Member Posts: 32
    edited 2016-01-04
    Thank you for your response.
    But this didn't solve the problem. Still getting the same message in the log file.

    EDIT:
    When I run the command directly through the console (not through c/al with process), then i do not get this weird error log.
  • Options
    naffnaff Member Posts: 32
    Thank you vaprog. That resolved my problem.
Sign In or Register to comment.