0

In my website, I tried to open a windows application (.exe) upon a button click. But it showing "Access is denied".

Stack trace:

[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

Button click event:

    Process p = new Process();
    p.StartInfo.FileName = Request.MapPath("~/App/App1.exe");
    p.Start();
Lundin
  • 195,001
  • 40
  • 254
  • 396
user2772568
  • 75
  • 2
  • 8

1 Answers1

0

Hope the following links already have an answer. Reference:
1.Which permissions are required to enable process.start via asp.net application?
2. Access is denied at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)

Community
  • 1
  • 1
Bala
  • 618
  • 5
  • 21