IIS Web Deploy - ERROR_USER_NOT_ADMIN
Asked Answered
D

3

11

I have a server which is part of a domain. When I publish a web application from Visual Studio with a domain user everything is ok. But when I try to publish with a local machine user (not part of a domain) I get ERROR_USER_NOT_ADMIN. Both users are in Administrators group. I tried specifying user as username, .\username and machinename\username but it's not working. Is there anything else I should do to be able to publish with a local machine user?

Dug answered 19/11, 2013 at 6:47 Comment(0)
K
3

I received this error when I published with an incorrect password.

Not the best answer in the world but I post this to point out that an incorrect password does indeed return this exact error though you would never know it when you read the error message.

Karena answered 22/12, 2015 at 15:34 Comment(2)
I can confirm that the problem was this in my case. But i think Windows is reseting the password because every X time my password doesn´t work and I have to change it to the same I always use for this user.Outlier
Over and over I tried to fix this error, and it ended up being I needed double quotes around my password. Go figure.Agora
F
3

This error can also be received when deploying ASP.NET Core application with Visual Studio 2015. In order to fix the problem in this case, add the following lines in the .pubxml file:

<ADUsesOwinOrOpenIdConnect>False</ADUsesOwinOrOpenIdConnect>
<AuthType>NTLM</AuthType>
Frady answered 14/10, 2016 at 11:16 Comment(1)
Hi Nikolay, thanks you saved me a lot of time! Please consider to post this as separate question with your own answer as it can be very helpful for community. Thank you again!.Pohl
M
1

You can't do that, server you aim to publish in to needs an authorized domain account to allow access to your Visual Studio publishing service. Local accounts are specific to your local machine regardless whether they are administrator logins. They are just local admin login not domain admin logins.

Get your administrator to set up a domain user (don't use domain admin accounts this is a security risk) for publishing purposes or use your current domain user account

Mealworm answered 1/5, 2015 at 1:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.