在我的网站中,我使用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