Authentication failes when compiling through C/AL

naff
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:
After running this code I get the following text in the log file.
Log file:
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?
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?
0
Best Answer
-
You need to set the property RunOnClient=Yes in the Process variable. Otherwise the dev client will be started on the server machine with the NST user.
If you want it to run on the server you must make sure you start the client with a user that has the necessary permissions or vice versa.5
Answers
-
Hi.
Dunno if it is this but,
If you use 'synchronizeschemachanges=force' shouldn't you specify:
'navservername=xxxx,'+
'navserverinstance=yyyy,'+
'navservermanagementport=9999,'
0 -
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.0 -
You need to set the property RunOnClient=Yes in the Process variable. Otherwise the dev client will be started on the server machine with the NST user.
If you want it to run on the server you must make sure you start the client with a user that has the necessary permissions or vice versa.5 -
Thank you vaprog. That resolved my problem.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