简体   繁体   English

Process.Start(对象)不起作用

[英]Process.Start(object) not working

I am developing one application which creates PDF. 我正在开发一个创建PDF的应用程序。 I am using Process.Start(startInfo) to create PDF. 我正在使用Process.Start(startInfo)创建PDF。 Now when I run this application locally, it is working fine and creates PDF but when I deploy it on Development server it is not creating PDF. 现在,当我在本地运行此应用程序时,它可以正常工作并创建PDF,但是当我在开发服务器上部署它时,它并没有创建PDF。

I made it very simple to Process.Start("IExplore.exe"), however still it not working on Development server. 我使Process.Start(“ IExplore.exe”)非常简单,但是仍然无法在Development Server上运行。

Please let me know if any other thing that I have to do it so start working? 请让我知道是否需要做其他事情,以便开始工作?

You're probably having this issue because on your local machine you're running under your account, which has permissions to run the executable. 您可能会遇到此问题,因为在您的本地计算机上,您以您的帐户运行,该帐户具有运行可执行文件的权限。 When deployed to the dev server, it's probably running under the NETWORK SERVICE account, which probably doesn't have permissions to run the executable. 部署到开发服务器时,它可能在NETWORK SERVICE帐户下运行,该帐户可能没有运行可执行文件的权限。 You need to look into using impersonation. 您需要研究使用模拟。

I gave a detailed answer on this here: 我在这里给出了详细的答案:

Invoke or call C# console app from C# web service? 从C#Web服务调用或调用C#控制台应用程序?

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

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