如何从我的应用程序@Client侧打开命令提示符 [英] How to open command prompt from my application @Client side

查看:175
本文介绍了如何从我的应用程序@Client侧打开命令提示符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮我如何从客户端打开命令提示符。当我点击按钮就应该打开命令提示符。我想在我的电脑,它的工作在开发环境中,但是当部署在IIS中的不开放。

code:

  VAR的ProcessStartInfo =新的ProcessStartInfo
    {
        文件名=CMD
    };
    工艺过程=的Process.Start(的ProcessStartInfo);


解决方案

asp.net在服务器上运行。我怀疑你是在本地卡西尼运行,让您的服​​务器和桌面客户端桌面是一样的。你正在做的是在​​服务器上打开一个命令提示符 ;这是一个有趣的DDOS攻击面,如果你想它(即不这样做)。

简短的回答:您无法做到这一点。没有浏览器会(或应该......我会为IE津贴; P)允许这一点。客户端操作系统甚至不需要的支持的命令提示符下,也不是.NET;即使它没有,很少有浏览器会让你生成一个进程。

Please help me how to open command prompt from client side. When i click on the button it should open command prompt. I tried in my PC and it's working in the development environment but when deploy in IIS its not opening.

Code:

    var Processstartinfo = new ProcessStartInfo
    {           
        FileName = "cmd"
    };
    Process process = Process.Start(Processstartinfo);

解决方案

asp.net runs at the server. I suspect you are running in cassini locally, so your server desktop and client desktop are the same thing. What you are doing is opening a command prompt at the server; which is an interesting DDOS attack surface if you think about it (i.e. don't do that).

Short answer: you cannot do this. No browser would (or should... I'll make allowances for IE ;p) allow this. The client OS need not even support a command prompt, nor .NET; and even if it did, very few browsers will let you spawn a process.

这篇关于如何从我的应用程序@Client侧打开命令提示符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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