我分别用File System 和Http两种方式创建了一个web页面,该页面有个button控件,点击则用Process.Start("Notepad.exe")调用记事本.问题是当程序是File System方式时则可以正常运行并可以调用记事本,而在Http方式下运行后点击button没有反映.
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Diagnostics;public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        Process.Start("Notepad.exe");
    }
}
求教下这是为什么?
谢谢

解决方案 »

  1.   

    web形式??
    这样的话..不就是要求服务器运行Notepad.exe了吗??
    不行的吧...
      

  2.   

    楼上的,但是File System也是创建web页面啊,我觉的File System和Http只是形式的区别吧,不清楚啊,希望大家帮帮忙啊
      

  3.   

    to 楼上的,但是File System也是创建web页面啊,我觉的File System和Http只是形式的区别吧,
    不清楚啊,希望大家帮帮忙啊首先你要分清楚,是在服务器端打开notepad,还是在客户端打开notepad,如果是前者,你需要修改服务器端的IIS设置,首先允许执行,其次提高aspnet用户的权限。
    如果是后者,你上面的代码根本达不到你的要求,借助js来打开吧。
      

  4.   

    hhtp方事指虚拟目录下的,路径不对,把notepad.exe拷过来试试
      

  5.   

    谢谢Knight94,bufan2162,conan19771130.我提升了aspnet的权限,但不太清楚IIs的设置,我把那几个钩都钩上了,把执行权限也设置为:"脚本和可执行文件".但还是没反映.能说下具体的吗
    谢谢  还用就是js是什么?
    谢谢大家