redman
redman

Reputation: 2165

IIS Web Deploy - ERROR_USER_NOT_ADMIN

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?

Upvotes: 11

Views: 5128

Answers (3)

Nikolay Kostov
Nikolay Kostov

Reputation: 16983

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>

Upvotes: 3

Tony L.
Tony L.

Reputation: 19486

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.

Upvotes: 3

JOAT
JOAT

Reputation: 188

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

Upvotes: 1

Related Questions