简体   繁体   中英

Process does not work on windows server

I need to start an .exe via my web application, it works on my local machine But it does not work on server.

I am using windows server 2008 R2 Enterprise and here is my code

ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = @"C:\hkLog\FirmwareUpdaterGUI.exe";
startInfo.WindowStyle = ProcessWindowStyle.Minimized;
startInfo.Arguments = list;
Process.Start(startInfo);

Thanks in advance,

This is probably due to the following

  1. By default, ASP.NET runs its worker process (Aspnet_wp.exe) which doesn't have permission to interact with desktop.

  2. By default, IIS Admin Service won't allow its application to interact with desktop.

You will need to change asp.net worker access to enable it to access the desktop as well as change IIS settings. Microsoft support

This is probably a permissions issue (based o the identity your app domain is running under). I recommend the following.

What you should see if your worker process attempting to access the executable path to launch it and failing. The failure will be detailed in the entry in process monitor. You can then determine what permissions you're missing.

Alternatively, you could move the executable to a path where you know the worker process identity has full permissions to test.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM