[英]System.Diagnostics.Process.Start Exception for different user
[英]System.Diagnostics.Process.Start throwing threadabort exception on server
在我的网站上,我正在使用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);
}
要在ASP.NET服务器上使用Process,您需要为完全信任配置应用程序。
您确定需要在此进程服务器端生成吗? 看来您没有使用它的输出。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.