I've built my packages and read through this docs @ http://www.asp.net/web-forms/overview/deployment/web-deployment-in-the-enterprise/deploying-web-packages
And it seems to suggest that the problem should be relatively simple from here as the instructions clearly show ...
[project name].deploy.cmd [/T | /Y]
[/M:<computer name>]
[/A:<Basic | NTLM>]
[/U:<user name>]
[/P:<password>]
[/L]
[/G:<true | false>]
[Additional MSDeploy.exe flags]
.. so, no problem I thought I will give the command params like this ...
myproj.deploy.cmd /Y /M:test.foo.com /A:basic /U:<my user> /P:<my pass>
... where the user and pass are an admin account on my server.
For some reason though this results in a 401 ...
Error code: EEROR_USER_NOT_ADMIN
More Information: Connected to 'server' using the Web Deployment Agent Service but could not authorize. Make sure you are an administrator on 'server'
... well, I used my admin credentials, the same ones I used with VS for the one click deploy and they worked in VS so how come they aren't working on the command line when pushing the package?
...
EDIT:
I looked through the logs, checked out the ms deploy command it was generating and decided to skip the cmd file altogether and go straight to ms deploy myself.
I found the command it was generating and cleaned it up to something like this ...
msdeploy.exe
-source:package='..package.zip'
-dest:auto,computerName=test.foo.com,userName=<me>,password=<my pass>,authtype=basic,includeAcls=False
-verb:sync
-disableLink:AppPoolExtension
-disableLink:ContentExtension
-disableLink:CertificateExtension
Apparently my account when used in this context is not an admin (a total lie or perhaps I missed something).
here's what technet has to say on it: https://technet.microsoft.com/en-gb/library/dd569106(v=ws.10).aspx
which links to this: https://technet.microsoft.com/en-gb/library/dd569001(v=ws.10).aspx
which states ...
The Web Deployment Tool does not perform local impersonation. If you
provide values for the username and password provider settings but do
not specify the name of a remote computer for the computerName
setting, the credentials that you provide will have no effect.
does this mean because I am specifying a domain name and not a machine name the credentials I am specifying have been ignored?
If so ... how am I supposed to do this?
See Question&Answers more detail:
os