简体   繁体   English

进程在Windows Server上不起作用

[英]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. 我需要通过Web应用程序启动.exe,它在我的本地计算机上可用,但在服务器上不起作用。

I am using windows server 2008 R2 Enterprise and here is my code 我正在使用Windows Server 2008 R2 Enterprise,这是我的代码

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. 默认情况下,ASP.NET运行其工作进程(Aspnet_wp.exe),该工作进程没有与桌面进行交互的权限。

  2. By default, IIS Admin Service won't allow its application to interact with desktop. 默认情况下,IIS Admin Service不允许其应用程序与桌面进行交互。

You will need to change asp.net worker access to enable it to access the desktop as well as change IIS settings. 您将需要更改asp.net worker的访问权限,以使其能够访问桌面以及更改IIS设置。 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. 或者,您可以将可执行文件移动到您知道工作进程标识具有完全测试权限的路径。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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