The target server is Windows 2008 R2. Fresh VM install, fully patched, .Net 4.0 installed. The IIS Rewrite Module 2 is installed.
If any site in IIS has more than one IP address restriction (i.e. location/system.webServer/security/ipSecurity with 2 or more add nodes), the MSDepSvc will crash immediately, even when "-whatif" is supplied.
With one test website, and this location node, which was created by adding IP address restrictions via the IIS Manager GUI:
<location path="test">
<system.webServer>
<security>
<ipSecurity allowUnlisted="false">
<add ipAddress="1.2.3.4" allowed="true" />
<add ipAddress="1.2.3.5" allowed="true" />
</ipSecurity>
</security>
</system.webServer>
</location>
This MSDeploy invocation will crash MSDepSvc:
"C:\program files\IIS\Microsoft Web Deploy V3\msdeploy" -verb:sync ^
-source:metakey=example.com,includeAcls=true ^
-enableLink:AppPoolExtension -disableLink:content ^
-dest:metakey=/LM/W3SVC/5,computername=TARGET2008R2,includeAcls=true ^
-whatif
In this case, the source server is Windows 2003 R2.
The output:
Verbose: Pre-authenticating to remote agent URL 'http://TARGET2008R2/MSDEPLOYAGENTSERVICE' as 'DOM\user_with_admin_privs'
Verbose: Performing synchronization pass #1.
Verbose: Pre-authenticating to remote agent URL 'http://TARGET2008R2/MSDEPLOYAGENTSERVICE' as 'DOM\user_with_admin_privs'
Warning: Retrying the sync because a socket error (10054) occurred.
Retrying operation 'Serialization' on object MSDeploy.metaKey (sourcePath). Attempt 1 of 25.
The target service crashes.
Removing either of the IP restrictions lets the process succeed.
A similar error occurs when creating a package on the Windows 2003 machine, copying it to the Windows 2008 R2 machine, and attempting to deploy it with msdeploy.exe.
Creating the package (on the Windows 2003 computer):
"C:\program files\IIS\Microsoft Web Deploy V3\msdeploy" -verb:sync ^
-source:metakey=example.com,includeAcls=true ^
-enableLink:AppPoolExtension -disableLink:content ^
-dest:package=testsite.zip,encryptPassword=abc
Attempting to deploy the package on the Windows 2008 R2 target machine:
"C:\program files\iis\Microsoft Web Deploy V3\msdeploy" -verb:sync ^
-source:package=testsite.zip,encryptPassword=abc -dest:auto -whatif
Generates this output:
Verbose: Performing synchronization pass #1.
Verbose: No backup was executed.
Then Windows tells me msdeploy crashed. The following are the entries in the application log:
Faulting application name: msdeploy.exe, version: 7.1.1631.0, time stamp: 0x5006ec62
Faulting module name: KERNELBASE.dll, version: 6.1.7601.17651, time stamp: 0x4e21213c
Exception code: 0x80000003
Fault offset: 0x0000000000033172
Faulting process id: 0xe44
Faulting application start time: 0x01cd8ca824e6ffe1
Faulting application path: C:\program files\iis\Microsoft Web Deploy V3\msdeploy.exe
Faulting module path: C:\Windows\system32\KERNELBASE.dll
Report Id: 630cf115-f89b-11e1-bde8-000c29662c21
And
Fault bucket , type 0
Event Name: APPCRASH
Response: Not available
Cab Id: 0
Problem signature:
P1: msdeploy.exe
P2: 7.1.1631.0
P3: 5006ec62
P4: KERNELBASE.dll
P5: 6.1.7601.17651
P6: 4e21213c
P7: 80000003
P8: 0000000000033172
P9:
P10:
Attached files:
These files may be available here:
C:\Users\myaccount\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_msdeploy.exe_4a97c7f2547a6a5988c1e66f043a7e937fbaea6_0f4c79e5
Analysis symbol:
Rechecking for solution: 0
Report Id: 630cf115-f89b-11e1-bde8-000c29662c21
Report Status: 0
And here are the contents of the .WER file:
Version=1
EventType=APPCRASH
EventTime=129914618078385430
ReportType=2
Consent=1
ReportIdentifier=630cf116-f89b-11e1-bde8-000c29662c21
IntegratorReportIdentifier=630cf115-f89b-11e1-bde8-000c29662c21
Response.type=4
Sig[0].Name=Application Name
Sig[0].Value=msdeploy.exe
Sig[1].Name=Application Version
Sig[1].Value=7.1.1631.0
Sig[2].Name=Application Timestamp
Sig[2].Value=5006ec62
Sig[3].Name=Fault Module Name
Sig[3].Value=KERNELBASE.dll
Sig[4].Name=Fault Module Version
Sig[4].Value=6.1.7601.17651
Sig[5].Name=Fault Module Timestamp
Sig[5].Value=4e21213c
Sig[6].Name=Exception Code
Sig[6].Value=80000003
Sig[7].Name=Exception Offset
Sig[7].Value=0000000000033172
DynamicSig[1].Name=OS Version
DynamicSig[1].Value=6.1.7601.2.1.0.1296.17
DynamicSig[2].Name=Locale ID
DynamicSig[2].Value=1033
DynamicSig[22].Name=Additional Information 1
DynamicSig[22].Value=621e
DynamicSig[23].Name=Additional Information 2
DynamicSig[23].Value=621e7b8fa85af2f50d8e465369aed89a
DynamicSig[24].Name=Additional Information 3
DynamicSig[24].Value=6d9b
DynamicSig[25].Name=Additional Information 4
DynamicSig[25].Value=6d9ba479bc8621967ddf6df431c81776
UI[2]=C:\program files\iis\Microsoft Web Deploy V3\msdeploy.exe
UI[3]=Web Deploy has stopped working
UI[4]=Windows can check online for a solution to the problem.
UI[5]=Check online for a solution and close the program
UI[6]=Check online for a solution later and close the program
UI[7]=Close the program
LoadedModule[0]=C:\program files\iis\Microsoft Web Deploy V3\msdeploy.exe
LoadedModule[1]=C:\Windows\SYSTEM32\ntdll.dll
LoadedModule[2]=C:\Windows\SYSTEM32\MSCOREE.DLL
LoadedModule[3]=C:\Windows\system32\KERNEL32.dll
LoadedModule[4]=C:\Windows\system32\KERNELBASE.dll
LoadedModule[5]=C:\Windows\system32\ADVAPI32.dll
LoadedModule[6]=C:\Windows\system32\msvcrt.dll
LoadedModule[7]=C:\Windows\SYSTEM32\sechost.dll
LoadedModule[8]=C:\Windows\system32\RPCRT4.dll
LoadedModule[9]=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscoreei.dll
LoadedModule[10]=C:\Windows\system32\SHLWAPI.dll
LoadedModule[11]=C:\Windows\system32\GDI32.dll
LoadedModule[12]=C:\Windows\system32\USER32.dll
LoadedModule[13]=C:\Windows\system32\LPK.dll
LoadedModule[14]=C:\Windows\system32\USP10.dll
LoadedModule[15]=C:\Windows\system32\IMM32.DLL
LoadedModule[16]=C:\Windows\system32\MSCTF.dll
LoadedModule[17]=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
LoadedModule[18]=C:\Windows\system32\MSVCR100_CLR0400.dll
LoadedModule[19]=C:\Windows\assembly\NativeImages_v4.0.30319_64\mscorlib\6087fce8f76d9af69af496cb10b7d1ee\mscorlib.ni.dll
LoadedModule[20]=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\nlssorting.dll
LoadedModule[21]=C:\Windows\system32\ole32.dll
LoadedModule[22]=C:\Windows\system32\CRYPTBASE.dll
LoadedModule[23]=C:\Windows\system32\CRYPTSP.dll
LoadedModule[24]=C:\Windows\system32\rsaenh.dll
LoadedModule[25]=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clrjit.dll
LoadedModule[26]=C:\Windows\system32\OLEAUT32.dll
LoadedModule[27]=C:\Windows\assembly\NativeImages_v4.0.30319_64\System\935aea6e7eae16674abdd96a68ec97af\System.ni.dll
LoadedModule[28]=C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Xml\28ca4f076264ab07f1d00a6c9623dc49\System.Xml.ni.dll
LoadedModule[29]=C:\Windows\assembly\GAC_MSIL\Microsoft.Web.Delegation\7.1.0.0__31bf3856ad364e35\Microsoft.Web.Delegation.dll
LoadedModule[30]=C:\Windows\assembly\GAC_MSIL\Microsoft.Web.Deployment\9.0.0.0__31bf3856ad364e35\Microsoft.Web.Deployment.dll
LoadedModule[31]=C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Configuration\6aea67f24827961ce1d48356715389d8\System.Configuration.ni.dll
LoadedModule[32]=C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Configuratio#\52792a7ce63196551c29f5201562c1ae\System.Configuration.Install.ni.dll
LoadedModule[33]=C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Core\b64f213e823a591607c45fac4997801e\System.Core.ni.dll
LoadedModule[34]=C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Web\be472c4f636fc5b8fc38476dbfe01358\System.Web.ni.dll
LoadedModule[35]=C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Data\0ec8effb7b9d03ae69d37922813bc880\System.Data.ni.dll
LoadedModule[36]=C:\Windows\Microsoft.Net\assembly\GAC_64\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll
LoadedModule[37]=C:\Windows\system32\WS2_32.dll
LoadedModule[38]=C:\Windows\system32\NSI.dll
LoadedModule[39]=C:\Windows\system32\CRYPT32.dll
LoadedModule[40]=C:\Windows\system32\MSASN1.dll
LoadedModule[41]=C:\Windows\system32\shell32.dll
LoadedModule[42]=C:\Windows\system32\profapi.dll
LoadedModule[43]=C:\Windows\system32\bcrypt.dll
LoadedModule[44]=C:\Windows\system32\version.dll
LoadedModule[45]=C:\Windows\system32\CLBCatQ.DLL
LoadedModule[46]=C:\Windows\system32\inetsrv\nativerd.dll
LoadedModule[47]=C:\Windows\system32\inetsrv\IISUTIL.dll
LoadedModule[48]=C:\Windows\system32\XmlLite.dll
LoadedModule[49]=C:\Windows\system32\ktmw32.dll
LoadedModule[50]=C:\Windows\system32\inetsrv\IISRES.DLL
LoadedModule[51]=C:\Windows\system32\mlang.dll
LoadedModule[52]=C:\Windows\system32\RpcRtRemote.dll
LoadedModule[53]=C:\Program Files\IIS\Microsoft Web Deploy V3\x64\axnative.dll
LoadedModule[54]=C:\Windows\system32\MPR.dll
LoadedModule[55]=C:\Windows\system32\HTTPAPI.dll
LoadedModule[56]=C:\Windows\system32\WSOCK32.dll
FriendlyEventName=Stopped working
ConsentKey=APPCRASH
AppName=Web Deploy
AppPath=C:\program files\iis\Microsoft Web Deploy V3\msdeploy.exe
I have spent many hours narrowing this down the minimum reproducible set.
You are welcome to contact me at the email address associated with this post.