I am having a problem with NAV 2009 SP1 code that works on Server 2008 R2 and doesn't work on Server 2012 SP1. I am trying to run a program (Jet's Autopilot.exe) from a .NET Process variable. The code is this:
Global Variables
Name DataType Subtype Length
ShellProcess DotNet 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.Diagnostics.Process
ShellStartInfo DotNet 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.Diagnostics.ProcessStartInfo
Procedure RunReport()
ShellProcess := ShellProcess.Process();
ShellProcess.StartInfo := ShellStartInfo.ProcessStartInfo(CommandLine, Arguments);
ShellProcess.Start();
ShellProcess.Dispose();
I get this error:
Microsoft Dynamics NAV
This message is for C/AL programmers: The call to member Start failed: Unknown error (0xfffffffe).
OK
As I said this code works on Server 2008 R2 but not Server 2012 SP1. It the same NAV executables on both servers (same client, they are just just transitioning to new server), I am using a copy of the NAV database. If I use the command line and arguments passed to the function in a CMD window (non-administrator) the command works when logged in as the service account.
I have done a Google search on the error and most of the pages relate this being a permissions error and being UAC related. I have tried the suggested fixes for that
StartInfo.Verb = 'runas'
and I get the same error.
I have granted the service account full control on all folders that it is accessing ("JetReports", "60\Service", input/output folders for the Jet Report).
Any suggestions?
Comments
2009 use .NET 2.0 (a part of 3.5), and you are using 2.0 dotnet variable.
I have had some problems with 2009 and dotnet, solved by platform upgrading to latest R2 build. Maybe thats worth a try.