UWP FullTrust Process: Console Application returning System.IO Exceptions

0

So I have a UWP app which also opens and runs a console application as a Full Trust Process. The console application runs for a couple of seconds and then exits with the code 0xe0434352, which can mean basically anything.

Debugging in VS is impossible as I can't attach the debugger to my console app quickly enough before it exits, however a quick look in the Windows Event Viewer tells me the following:

Application: Nayax.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.UnauthorizedAccessException at System.IO.__Error.WinIOError(Int32, System.String) at System.IO.FileStream.Init(System.String, System.IO.FileMode, System.IO.FileAccess, Int32, Boolean, System.IO.FileShare, Int32, System.IO.FileOptions, SECURITY_ATTRIBUTES, System.String, Boolean, Boolean, Boolean) at System.IO.FileStream..ctor(System.String, System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare, Int32, System.IO.FileOptions, System.String, Boolean, Boolean, Boolean) at System.IO.StreamWriter.CreateFile(System.String, Boolean, Boolean) at System.IO.StreamWriter..ctor(System.String, Boolean, System.Text.Encoding, Int32, Boolean) at System.IO.StreamWriter..ctor(System.String, Boolean) at System.IO.File.AppendText(System.String) at com.bitmick.marshall.protocol.vmc_framework.init() at com.bitmick.marshall.protocol.vmc_framework.getInstance() at Win32.Program+vend_machine..ctor() at Win32.Program.Main(System.String[])

Now, when I run the console app directly, it works fine without any exceptions. Meaning that the errors must be related to my UWP app.

My question is: What does Full Trust actually mean? The errors I am getting look like permission errors which shouldn't be occurring in a Full Trust process, surely?

Full Trust Declaration

<Extensions xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10">
    <desktop:Extension Category="windows.fullTrustProcess" Executable="Nayax\Nayax.exe" />
</Extensions>

Running the Full Trust Process

if (ApiInformation.IsApiContractPresent("Windows.ApplicationModel.FullTrustAppContract", 1, 0))
{
      try
      {
         await FullTrustProcessLauncher.LaunchFullTrustProcessForCurrentAppAsync();
      }

      catch (Exception Ex)
      {
          Debug.WriteLine(Ex.ToString());
      }
}
c#
uwp
console-application
asked on Stack Overflow Jan 30, 2020 by Adam McMahon

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0