0
votes

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

1

1 Answers

0
votes

NULL SID probably means that the computer couldn't locate the account at all (not that the password is bad). Double-check the account spelling and try to localize the account: if it's a local account on computer COMPUTERNAME try COMPUTERNAME\ACCOUNT and if it's a domain account (e.g. on domain CONTOSO), try CONTOSO\ACCOUNT or the FQDN format [email protected] for the contoso.com domain.

You may also want to try the -AuthType='NTLM' from the command prompt.