Process.start在IIS中不起作用 [英] Process.start is not working in IIS

查看:643
本文介绍了Process.start在IIS中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

64分

224帖子

Process.start在IIS中不起作用

Jun 20,2012 08:48 AM | LINK







可以帮我解决这个问题。在VS中运行时,process.start工作正常。但是,在IIS中部署后,我无法调用它,Process.start无法正常工作。



这是我的代码,



Process.Start(IExplore.exe,www.northwindtraders.com);



Plz帮我解决这个问题

64 Points
224 Posts
Process.start is not working in IIS
Jun 20, 2012 08:48 AM|LINK

Hi,

can any1 help me on this. while running in VS ,process.start is working fine.but,after deploying in IIS,i am not able to invoke that , Process.start is not working.

Here is my code,

Process.Start("IExplore.exe", "www.northwindtraders.com");

Plz help me on this

推荐答案

是的。



相信我在这个。



这只是你不明白发生了什么。

C#代码在服务器上执行而不是客户。所以当你执行

Yes it is.

Trust me on this.

It''s just that you don''t understand what is happening.
C# code is executed on the server, not the client. So when you execute
Process.Start("IExplore.exe", "www.northwindtraders.com");

您正在服务器上执行它,因此服务器是运行Internet Explorer实例的地方 - 而不是客户端。当你在开发中时,服务器和客户端都是同一台机器,所以它看起来很有效 - 但是当你部署到Web服务器时,突然你看不到Internet Explorer打开,因为它在服务器上是打开的(这可能是世界另一边的)并且可能让网络服务器管理人员烦恼不已。假设服务器安装的IE不是给定的 - 不太可能安装任何不必要的东西,这将排除IE。



你不能做你想要的,除非在非常具体的情况下。安全性不允许您从服务器执行cline机器上的应用程序(并且可能不是可能安装或不安装的特定应用程序)。并且在99%的情况下不会发生具体情况。

You are executing it on the server, so the server is where the instance of internet explorer is run - not the client. When you were in development, both the server and the client were the same machine, so it looked like it worked - but when you deployed to the web server, suddenly you can''t see Internet Explorer open because it is open on the server (which may be round the other side of the world) and is probably annoying the heck out of the Web server administration guy. Assuming the server has IE installed which is not a given - it is very unlikely that anything unnecessary is installed and that would exclude IE.

You cannot do what you want, except under very specific circumstances. Security will not allow you to execute applications (and certianly not specific applications which may or may not be installed) on a cline machine from the server. And the specific circumstances do not occur in 99% of circumstances.


这篇关于Process.start在IIS中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆