有什么方法可以使用jQuery(客户端)打开RDP连接窗口?使用jquery打开RDP连接窗口 - 客户端端
下面我jQuery代码给出,
$(function() {
$(".RDPLink1").live('click', function() {
var IPAddress = $(this).attr('id'); // ip or name of computer to connect
$.ajax({
type: 'post',
cache: false,
data: { strIPAddress: IPAddress },
url: '<%=Url.Action("OpenRDPWindow","Home") %>',
success: function (data) {
}
});
});
我叫首页控制器的方法,名字是OpenRDPWindow,像
public void OpenRDPWindow(string strIPAddress)
{
Process objProcess = new Process();
string exe = Environment.ExpandEnvironmentVariables(@"%SystemRoot%\system32\mstsc.exe");
if (exe != null)
{
objProcess.StartInfo.FileName = exe;
objProcess.StartInfo.Arguments = "/v " + strIPAddress; // ip or name of computer to connect
objProcess.Start();
}
}
其实我需要的是,当用户点击我的页面中的href链接,我们 需要打开基于IPAddress的RDP窗口...
在我的系统使用VS2010,它工作正常&它是开放的RDP基于ip地址
窗口,因为我写在服务器端(C#)代码
到我的系统...在IIS中部署项目后,用户单击href链接, RDP(mstsc.exe)在服务器计算机上运行(我部署了我的
应用程序)。但我需要打开用户计算机(客户端)的RDP窗口...
我如何解决这个使用jQuery或JavaScript? (或)有没有其他办法可以解决这个问题?
在此先感谢.... @@@
您的RDP正在打开,因为您的开发人员机器在调试时是服务器,但是当您将其部署到服务器时,它会在服务器上打开RDP,而不是触发它的用户。 – Rumplin 2012-07-05 09:59:16