Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6005753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:26:32+00:00 2026-05-23T01:26:32+00:00

I am trying to call an executable inside of a worker role I tried

  • 0

I am trying to call an executable inside of a worker role

I tried different executables:

1-program1.exe (C code compiled with visual studio, target: Win32)  
2-program2.exe (C# code, target: x86, this is a dummy program it only creates a text file)
3-program3.exe (C code compiled with visual studio, target: win32, this is a dummy program it only creates a text file)

My aim is to be able to run program1.exe.

Results:

1- no signs of success. It should generate some files for any successful run. No files were generated.
2- success. It creates the text file.
3- no signs of success. No file was generated.

So, I wanted to understand why program1.exe is not working but couldn’t find the reason. I understood that the problem is not specific to program1.exe. For any win32 application, it is problematic.

What can be the reason of this?

Here is the part of the code which deals with calling an external application:

var localStorage = RoleEnvironment.GetLocalResource("WorkerLocalStorage");

String workingDir = localStorage.RootPath + @"job";

var appRoot = Path.Combine(Environment.GetEnvironmentVariable("RoleRoot")
            + @"\", @"approot");
String workingDir = localStorage.RootPath + @"job";
String cmdline = "command1 command2";

ProcessStartInfo startinfo = new ProcessStartInfo();
startinfo.CreateNoWindow = false;
startinfo.UseShellExecute = true;
startinfo.FileName = Path.Combine(appRoot, @"program1.exe");
//startinfo.FileName = Path.Combine(appRoot, @"program2.exe");
//startinfo.FileName = Path.Combine(appRoot, @"program3.exe");
startinfo.Arguments = cmdline;
startinfo.WorkingDirectory = workingDir;

Process exeProcess = Process.Start(startinfo);
exeProcess.WaitForExit();

program2.exe works so, I do not have any problem with uploading the file to a blob. I couldn’t find the problem. Can it be related with passing commandline arguments? Do I need to specify additional things for a C coded executable?

By the way, all of the tests are successful in the emulator(i.e. the development environment)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T01:26:33+00:00Added an answer on May 23, 2026 at 1:26 am

    My gut reaction is that you should check that all the necessary dll’s for that win32 exe are available – especially dll’s like the Visual C++ redistributables – if any of those is missing and required then the application won’t successfully launch. Use dumplib or depends to see what is needed.

    Another thing that might cause problems would be if your exe doesn’t have necessary read/write access to one of the paths you are passing in.

    Other mechanisms that might help you debug this:

    • check the Windows event logs (using azure diagnostics) to see if anything any events are being recorded
    • in your c# code, check the exit code of your Process – plus also try intercepting the StandardError
    • in your C code, add additional logging to see if the test executables are somehow “crashing” somewhere along the way
    • as @Jason Haley suggests in his comment, try remote desktop’ing into your VM to see what is occurring.

    One final note – for optimal use of Azure, you should probably target 64-bit C compilation as the Azure VMs are all 64-bit.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to call native executables from java program. I have three exe
I'm trying to invoke some C++ code in case a trigger is called inside
I'm trying to call a program (function getNBDensities in the C executable measurementDensities_out )
When trying to call Close or Dispose on an SqlDataReader i get a timeout
I trying to call 2 functions in the same page to submit jquery-ajax at
I'm trying to call an Antlr task in my Ant build.xml as follows: <path
I'm trying to call a function after I load some XML into Actionscript, and
I am trying to call a shell script that sets a bunch of environment
I am trying to call a webservice using ssl. How do i get the
I'm trying to call a web service from Excel 2003 module. The way i've

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.