[狀況]
在ASP.NET 執行 Process.Start(); 呼叫Windows應用程式時產生存取被拒的錯誤。

[發生錯誤的程式碼]
System.Diagnostics.Process.Start();

[錯誤訊息]
System.ComponentModel.Win32Exception: 存取被拒。
   at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at AcerPricing01ST.page.OP_buyingpricecalcMtn.OP_buyingpricecalcMtn.lbProcess_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\acerpricing01st\page\op_buyingpricecalc\op_buyingpricecalcmtn.aspx.cs:line 381"

[解決方法]
這是因為系統預設不允許從 IIS 執行 Windows應用程式,你可以從 : 
系統管理工具 > 服務 > 找到 IIS Admin > 內容 > 登入 > 勾選:允許服務與桌面互動 > 動新啟動 IIS Admin

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 felixhuang 的頭像
    felixhuang

    菲力貓的程式設計

    felixhuang 發表在 痞客邦 留言(0) 人氣()