.net 网页调用服务器exe失败 好像调用不了 服务器那边没反应我的是独享主机可以自己配置请教一下该怎么解决 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 一般web结构不允许执行服务器上的exe,否则从客户端什么都能干了,有重大安全问题。你要达到什么样的目的,可以变通的,不要循一个思路走 我调用服务器CMD失败;代码: Process p = new Process(); p.StartInfo.FileName = "cmd"; p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardInput = true; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.RedirectStandardError = true; p.StartInfo.CreateNoWindow = true; p.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; p.Start(); string strOutput = null; p.StandardInput.WriteLine(xxx【xxx这里是个CMD命令 在服务器那边我运行没问题】); p.StandardInput.WriteLine("exit"); strOutput = p.StandardOutput.ReadToEnd(); Console.WriteLine(strOutput); p.WaitForExit(); p.Close(); 原来远程命令存在安全漏洞,如果服务器打.net2.0的补丁,web就会报错我原先做的一个程序和LZ类似,后来没找到解决方案,不了了之了关注一下 防止上传木马? asp.net 消息提醒功能 关于TAB控件的问题!!请指点一下,谢谢! DataGrid模板列頁腳聲明Label控件!!!!!!!!!!!! 上传视频,显示视频 asp.net 如何取得页面中动态生成文本框的值??? 网上商店购物车的实现,用什么控件最理想? 在VB.NET环境下的ASP.NET问题...在线等... 马上解决问马上散分!! 客户端的脚本?顺便散散分!!! 如何用div写首页的导航下拉菜单?在线等阿 WebControls.Table对象能否被序列化
Process p = new Process(); p.StartInfo.FileName = "cmd"; p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardInput = true; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.RedirectStandardError = true; p.StartInfo.CreateNoWindow = true; p.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; p.Start(); string strOutput = null; p.StandardInput.WriteLine(xxx【xxx这里是个CMD命令 在服务器那边我运行没问题】); p.StandardInput.WriteLine("exit"); strOutput = p.StandardOutput.ReadToEnd(); Console.WriteLine(strOutput); p.WaitForExit(); p.Close();
我原先做的一个程序和LZ类似,后来没找到解决方案,不了了之了
关注一下