Reputation: 1161
In my website I am using System.Diagnostics.Process.Start to preview a particular file. It is working fine on the local server but, it throws ThreadAbortException on the online server when I try to preview the file.
The preview of the happens on button click of repeater. The code is given below:
if (e.CommandName == "Preview")
{
Button btn = (Button)e.CommandSource;
string filePath = Server.MapPath("~/Upload");
string _DownloadableProductFileName = filename;
System.Diagnostics.Process.Start(filePath + "\\" + _DownloadableProductFileName);
}
Upvotes: 0
Views: 726
Reputation: 6111
To use Process on the ASP.NET server you need to configure the application for Full Trust.
Are you sure you need to spawn this process server side? It seems you aren't using its output.
Upvotes: 1