在我的網站中,我使用System.Diagnostics.Process.Start來預覽特定文件。它在本地服務器上工作正常,但是當我嘗試預覽該文件時,它會在聯機服務器上引發ThreadAbortException。System.Diagnostics.Process.Start在服務器上拋出threadbort異常
發生的按鈕點擊中繼器的預覽。
if (e.CommandName == "Preview")
{
Button btn = (Button)e.CommandSource;
string filePath = Server.MapPath("~/Upload");
string _DownloadableProductFileName = filename;
System.Diagnostics.Process.Start(filePath + "\\" + _DownloadableProductFileName);
}
請提供一些代碼 – Narendra 2012-07-07 06:36:47
同時檢查IIS設置,這可能是一些權限問題。 – Narendra 2012-07-07 06:39:08
@Naren請重新檢查編輯代碼 – user1509 2012-07-07 06:43:45