【发布时间】:2012-07-07 06:08:01
【问题描述】:
在我的网站中,我使用 System.Diagnostics.Process.Start 来预览特定文件。它在本地服务器上工作正常,但是当我尝试预览文件时,它在在线服务器上抛出 ThreadAbortException。
在中继器的按钮单击时发生预览。代码如下:
if (e.CommandName == "Preview")
{
Button btn = (Button)e.CommandSource;
string filePath = Server.MapPath("~/Upload");
string _DownloadableProductFileName = filename;
System.Diagnostics.Process.Start(filePath + "\\" + _DownloadableProductFileName);
}
【问题讨论】:
-
请提供一些代码
-
还要检查 IIS 设置,可能是权限问题。
-
@Naren 请重新检查编辑代码
标签: c# asp.net system.diagnostics threadabortexception