I'm trying to use msbuild/webdeploy with teamcity to deploy to IIS. However, I'm getting an ERROR_USER_UNAUTHORIZED error message and link pointing me to this page on iis.net.

I'm using the Web Management Service to do this and I can verify that the username and password exist (I can log into the server with that combination), the site exists and the the user has IIS manager permissions:

Image showing manager permissions

So what am I missing out?

Edit: New screenshot to answer @dirt:

enter image description here


Right there in your screen shot: "The server is configured to accept connections only from accounts with Windows credentials.".

Main level IIS Manager > Management Services > Allow both Windows and IIS Credentials

Reference: http://www.iis.net/learn/manage/remote-administration/configuring-remote-administration-and-feature-delegation-in-iis-7

Also make sure you have added the user to both the Server level IIS Manager Users and the Site level IIS Manager Permissions:

Server level: Server level

Site level: Site level

And finally check this page: http://www.iis.net/learn/publish/troubleshooting-web-deploy/web-deploy-error-codes

Diagnosis - This error code can surface because of a number of different reasons. It typically indicates an authentication or authorization problem, and can happen because of any of thee following reasons:
User does not exist
User does not have IIS Manager access to site if connecting using Web Management Service
Site does not exist
Password is incorrect
Resolution - If connecting using the Web Management Service:
Verify that the username and password are correct
Verify that the site exists
Verify that the user has IIS Manager Permissions to the site's scope
Resolution - If connecting using the Remote Agent Service:
Verify that the username and password are correct
Verify that the user account you specified is a member of the Administrators group on the remote computer. NOTE: If you are not using the built-in administrator, create a new group called the "MSDepSvcUsers" group and add your new administrator to that group.
Verify that the site exists

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.