Hi All,
I am experiencing weird hard behavior while trying to run msdeploy.exe through ASP.net web form.
What I am doing
Step1:
Installed x86_msdeploy_beta2.msi on windows server 2003 and manually started “Web Deployment Agent Service”.
Step2
Created asp.net webapp and published to same server with virtual directory named as migrationtool and created application pool for same with indentity which has administrator rights.
On archive button click event I am trying to execute the following code to run msdeploy.exe
Process msdeployprocess = new Process(); msdeployprocess.StartInfo.FileName = @"C:\Program Files\IIS\Microsoft Web Deploy\msdeploy.exe"; msdeployprocess.StartInfo.WorkingDirectory = @"C:\Program Files\IIS\Microsoft Web Deploy";
msdeployprocess.StartInfo.Arguments = "-verb:sync -source:metakey=/LM/w3svc/1/ROOT/virdirabc,computername=machine1.xxx.org-dest:archivedir=C:\archive\virdirabc -debug
" msdeployprocess.StartInfo.UseShellExecute = false; msdeployprocess.StartInfo.CreateNoWindow = true; msdeployprocess.StartInfo.RedirectStandardOutput = true; msdeployprocess.StartInfo.RedirectStandardError = true; msdeployprocess.Start(); msdeployprocess.WaitForExit(6000);//1min
What I am expecting
Archive virtual directory settings and content for a given virdirabc.
What it is doing
It is archiving only virtual directory settings and partial content(not copying entire content from source content directory to archive content directory). It is behaving very weird as it is copying child level items not root level items.
NOTE: If I run the same command through command line on same server then it is archiving all virtual directory settings as well as content.
F:\>msdeploy -verb:sync -source:metakey=/LM/w3svc/1/ROOT/virdirabc,computername=machine.xxx.org
-dest:archivedir=C:\archive\virdirabc–debug
Can any one try to reproduce the same? Am I missing some thing?
Thanks in advance for your help.
Anjee.