Web deploy works when I publish from visual studio but fails when I call msdeploy.exe. The failure is 401 unauthorized but both ways use the same iis account to login. Both ways go via WMSVC.
This is the web deploy command
msdeploy.exe -source:package='MyZip.Api.zip' -dest:auto,computerName='https://94.236.2.239/MSDeploy.axd?site=MySitei',userName=myusername,password=mypassowrd,authtype=basic,includeAcls=false -verb:sync -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -setParamFile:"MySetParameters.xml" -allowUntrusted
On the target server I can see two security log failure
The computer attempted to validate the credentials for an account.
Authentication Package: MICROSOFT_AUTHENTICATION_PACKAGE_V1_0 Logon Account: MyIISAccount Source Workstation: MyServer Error Code: 0xC0000064
The second error
An account failed to log on.
Subject: Security ID: IIS APPPOOL.NET v4.5 Account Name: .NET v4.5 Account Domain: IIS APPPOOL Logon ID: 0x52A7CD9
Logon Type: 8
Account For Which Logon Failed: Security ID: NULL SID Account Name: Myiisacount Account Domain: myserver
Failure Information: Failure Reason: Unknown user name or bad password. Status: 0xC000006D Sub Status: 0xC0000064
Process Information: Caller Process ID: 0x1900 Caller Process Name: C:\Windows\System32\inetsrv\w3wp.exe
Network Information: Workstation Name: myserver Source Network Address: myip Source Port: 50384
Detailed Authentication Information: Logon Process: Advapi
Authentication Package: Negotiate Transited Services: - Package Name (NTLM only): - Key Length: 0