I'm trying to use MSDeploy 3 RC to deploy a packaged web app to a remote Windows 2003/IIS 6 server. The deployment is controlled by a NAnt script running on a build server. The script loops through a set of 6 IIS sites on the target server and runs a sequence of MSDeploy calls for each. Essentially this is:
- Stop App Pool
- Deploy package with site-specific setParameters.xml file
- Start App Pool.
However the MSDeploy service on the remote server randomly crashes with the error below. It is very rare for all 6 sites to be successfully updated. The server is fully patched using Microsoft Update.
Application: MsDepSvc.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentException
Stack:
at System.Security.Principal.WindowsIdentity.CreateFromToken(IntPtr)
at System.Security.Principal.WindowsIdentity..ctor(IntPtr, System.String, Int32)
at System.Security.SecurityContext.CreateCopy() at System.Threading.ExecutionContext.CreateCopy()
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)