J
Jens Jensen
Hello,
I use the code below to zip files to a single .zip destination. I get the
expected result when i work on my developement machine (WinXP sp.2).
When i deploy the web application which host the code on win2k3 , it only
works for a single file.
I gave the modify right to "Noetwork Service" on the folder i'm writing to.
It does not help.
Can someone tell me what i'm doing wrong?
Thanks
JJ
Code below:
protected void ZipWithExternalBatch(string input_file)
{
try
{
System.Diagnostics.Process job = new System.Diagnostics.Process();
job .StartInfo.FileName = "pkzip.exe";
job .StartInfo.Arguments = "-add " +
ConfigurationManager.AppSettings["TargetZipFile"].ToString()+ " " +
Server.MapPath(input_file);
job .StartInfo.UseShellExecute = false;
job .StartInfo.RedirectStandardOutput = true;
job .Start();
job .StandardOutput.ReadToEnd();
job.WaitForExit();
catch (Exception ex)
{
AppLog.Write(ex);
}
I use the code below to zip files to a single .zip destination. I get the
expected result when i work on my developement machine (WinXP sp.2).
When i deploy the web application which host the code on win2k3 , it only
works for a single file.
I gave the modify right to "Noetwork Service" on the folder i'm writing to.
It does not help.
Can someone tell me what i'm doing wrong?
Thanks
JJ
Code below:
protected void ZipWithExternalBatch(string input_file)
{
try
{
System.Diagnostics.Process job = new System.Diagnostics.Process();
job .StartInfo.FileName = "pkzip.exe";
job .StartInfo.Arguments = "-add " +
ConfigurationManager.AppSettings["TargetZipFile"].ToString()+ " " +
Server.MapPath(input_file);
job .StartInfo.UseShellExecute = false;
job .StartInfo.RedirectStandardOutput = true;
job .Start();
job .StandardOutput.ReadToEnd();
job.WaitForExit();
catch (Exception ex)
{
AppLog.Write(ex);
}