W
wakun
Hi there,
I have my webpage written in C# and I am going to run an external
program within the web page. I have my code like
using System;
using System.Diagnostics;
namespace NRP
{
public class RP:System.Web.UI.Page
{
public void tryit()
{
ProcessStartInfo Info = new ProcessStartInfo();
Info.FileName = "A.exe"; // here A.exe will create a new file
on server side
Info.WorkingDirectory = "D:\\temp";
Process Proc ;
try
{
Proc = Process.Start(Info);
}
catch(System.ComponentModel.Win32Exception eee)
{
// error here
return;
}
}
}
I test the code on the local IIS and it works. However, when I put the
code and the DLL on the webserver, it didn't work. I guess it is becase
I didn't set the path of the program properly, but I have no idea how
to set WorkingDirectory properly on server side while I didn't know the
exact path.
I have my webpage written in C# and I am going to run an external
program within the web page. I have my code like
using System;
using System.Diagnostics;
namespace NRP
{
public class RP:System.Web.UI.Page
{
public void tryit()
{
ProcessStartInfo Info = new ProcessStartInfo();
Info.FileName = "A.exe"; // here A.exe will create a new file
on server side
Info.WorkingDirectory = "D:\\temp";
Process Proc ;
try
{
Proc = Process.Start(Info);
}
catch(System.ComponentModel.Win32Exception eee)
{
// error here
return;
}
}
}
I test the code on the local IIS and it works. However, when I put the
code and the DLL on the webserver, it didn't work. I guess it is becase
I didn't set the path of the program properly, but I have no idea how
to set WorkingDirectory properly on server side while I didn't know the
exact path.