0

在我的网站中,我尝试通过单击按钮打开一个 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();
4

1 回答 1

0

希望以下链接已经有了答案。参考:
1 .通过asp.net应用开启process.start需要哪些权限?
2.在 System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) 拒绝访问

于 2013-09-12T12:33:05.313 回答