Start Process Problem

GreatScott000GreatScott000 Member Posts: 40
edited 2014-06-22 in NAV Three Tier
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

  • JuhlJuhl Member Posts: 724
    Have you added the .NET 3.5 Feature of Server 2012.
    2009 use .NET 2.0 (a part of 3.5), and you are using 2.0 dotnet variable.
    Follow me on my blog juhl.blog
  • GreatScott000GreatScott000 Member Posts: 40
    Yes the .NET 3.5 is installed (and 4.0). The Codeunit this is in compiles without error. I tried to find a 4.0 version of the System.Diagnostics.Process class but could not find a 4.0 library for it.
  • JuhlJuhl Member Posts: 724
    I dont think 4.0 works in 2009.

    I have had some problems with 2009 and dotnet, solved by platform upgrading to latest R2 build. Maybe thats worth a try.
    Follow me on my blog juhl.blog
Sign In or Register to comment.