尝试从网站打开exe应用程序时拒绝访问

时间:2013-09-12 12:20:13

标签: asp.net exe

在我的网站上,我尝试按下按钮打开一个Windows应用程序(.exe)。但它显示“访问被拒绝”。

堆栈追踪:

[Win32Exception (0x80004005): Access is denied]
   System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo) +614
   System.Diagnostics.Process.Start() +56
   ghs.btnTry_Click(Object sender, EventArgs e) in c:\inetpub\vhosts\ddrivestudio.com\httpdocs\tanishq\ghs.aspx.cs:19
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

按钮点击事件:

    Process p = new Process();
    p.StartInfo.FileName = Request.MapPath("~/App/App1.exe");
    p.Start();