通过客户端ASP.NET应用程序打开notepad.exe [英] Opening a notepad.exe through client side ASP.NET application

查看:192
本文介绍了通过客户端ASP.NET应用程序打开notepad.exe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

需要知道从asp.net应用程序打开一个exe.It在开发机器上通过进程工作正常,但如果我在Web服务器上托管相同的时候我点击打开exe的功能(Notepad.exe)它在Web服务器中打开而不是在用户计算机中。有没有办法打开它的用户端。



谢谢,



Siva



我尝试过:



尝试使用Process.Start但它在服务器机器中打开

Need to know about opening a exe from asp.net application.It works fine in development machine through "Process",But if i host the same in web server when i click the function for opening exe (Notepad.exe) it opens in the web server not in user machine. Is there any way to open it user side.

Thanks,

Siva

What I have tried:

tried using Process.Start but it opens in server machine

推荐答案

所有ASP.NET代码都在服务器上运行,因此在服务器上打开记事本是有道理的。您的服务器将HTML / CSS / JavaScript返回给客户端。但是,出于明显的安全原因,JavaScript无法在客户端计算机上运行应用程序。所以,你不能在这里做你想做的事。
All of your ASP.NET code runs on the server, so it makes sense that it opens notepad on your server. Your server returns HTML/CSS/JavaScript to the client. However, JavaScript can't run applications on the client computer, for obvious security reasons. So, you cannot do what you want here.


引用:

它在Web服务器中打开而不是在用户机器上。

it opens in the web server not in user machine.



因为ASP在服务器上运行。

由于一个名为security的傻事,webapp无法在客户端运行任何东西。 />
如果一个webapp能够做这样的事情,任何网站都可以将你的PC变成一个僵尸。


Because ASP runs on server.
A webapp can't run anything on client side because of a silly thing named security.
If a webapp was able to do such things, any website would be able to turn your PC to a zombie.


这篇关于通过客户端ASP.NET应用程序打开notepad.exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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