Process.start无法打开pdf
我遇到了一个问题,需要紧急帮助。
我有一个 .Net 应用程序,在其中一个功能中,我需要打开 Adobe Reader (AcroRd32.exe)。我使用 Process.Start 方法来完成此操作。它在我的系统中完美运行,但在服务器上却不起作用。
System.Diagnostics.Process.Start("AcroRd32.exe");
我还尝试创建一个只有 Process.Start 语句的测试应用程序。那行得通!它会打开 AcroRd32.exe!但同样的语句在我的应用程序的函数中不起作用。 该函数从未遇到任何错误或异常,我可以看到 AcroRd32.exe 在任务管理器中运行。我尝试在 Process.Start 语句之前和之后放置通知,并且两者都被执行。
可能是什么问题?是因为我在函数中使用它吗?
I am stuck with a problem and need urgent help in it.
I have a .Net application where, in one of the functions, I need to open Adobe Reader (AcroRd32.exe). I do it using Process.Start method. It worked in my system perfectly but not on the server.
System.Diagnostics.Process.Start("AcroRd32.exe");
Also I tried creating a test application which just has the Process.Start
statement. That works! it opens AcroRd32.exe! But the same statement doesn't work inside a function of my application.
The function never experiences any error or exception and I can see AcroRd32.exe running in the task manager. I tried putting notifications before and after the Process.Start
statement and both are getting executed.
What might be the problem? is it because am using it inside a function?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我假设您的应用程序在服务器中与登录的用户帐户不同的用户帐户下运行。
I assume that your application is running under a different user account in the server than the one logged in.
正如丹尼尔指出的那样,这应该是一个安全问题。查看这些网站并了解问题是如何解决的: http://forums.asp.net/t /1159342.aspx
http://support.microsoft.com/kb/555134
This should be a security issue as Daniel Pointed out. Check out these websites and see how the issue was resolved: http://forums.asp.net/t/1159342.aspx
http://support.microsoft.com/kb/555134