Then then maybe you can help me solve the problem below:
**************************
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?
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);
}
************
John Timney (MVP) said:
Its you, or better described as " the page runs in the context of your
current user account " whihc is whatever account yourt logged in with
when you run the app through the server.
read about it here:
http://msdn2.microsoft.com/en-us/library/58wxa9w5.aspx
If you want to check it, heres a bit of code that will tell you who you
are:
one import
and 4 labels, stick this code in the page load event
lbl1.Text = "'" + User.Identity.Name + "'";
lbl2.Text = WindowsIdentity.GetCurrent().Name;
bool fred = ((WindowsIdentity)User.Identity).IsAnonymous;
lbl3.Text = fred.ToString();
lbl4.Text = Request.LogonUserIdentity.Name.ToString();
--
--
Regards
John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com