Home > Uncategorized > 401 Not Authorized For MSDEPLOY‏ (msdeployAgentService)

401 Not Authorized For MSDEPLOY‏ (msdeployAgentService)

When you get this error from msdeploy:

“Error: The remote server returned an error: (401) Unauthorized.”

you need to give the remote user elevated rights to get authorization.

http://support.microsoft.com/kb/951016

http://blogs.msdn.com/b/vistacompatteam/archive/2006/09/22/766945.aspx

To disable UAC remote restrictions, follow these steps:

  1. Click Start, click Run, type regedit, and then press ENTER.
  2. Locate and then click the following registry subkey: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
  3. If the LocalAccountTokenFilterPolicy registry entry does not exist, follow these steps:
    1. On the Edit menu, point to New, and then click DWORD Value.
    2. Type LocalAccountTokenFilterPolicy, and then press ENTER.
  4. Right-click LocalAccountTokenFilterPolicy, and then click Modify.
  5. In the Value data box, type 1, and then click OK.
  6. Exit Registry Editor.
About these ads
Categories: Uncategorized
  1. David
    December 4, 2010 at 5:00 pm

    THANK YOU!

  2. May 4, 2011 at 5:55 pm

    muchas gracias

  3. Andrew
    October 12, 2011 at 3:18 am

    You are a god amongst men. I was trying to web deploy to Windows 7 with RemoteAgent and getting “An unsupported response was received. The response header ‘MSDeploy.Response’ was ‘V1′ but ‘v1′ was expected. The remote server returned an error: (401) Unauthorized.” and this fixed it. Thank you so so so much.

  4. Matthias
    January 2, 2012 at 12:23 pm

    thank you so much!
    Why didn’t I find this post 4 hours ago.

    • September 28, 2012 at 3:13 pm

      yes…i have same feeling..

      thx for posting this solve
      help me a lot!!

  5. Michael
    May 24, 2012 at 10:25 am

    you made my day !!!!
    Why is there no hint doing that in the documentations from Microsoft?

  6. November 23, 2012 at 6:49 pm

    This worked for me. I tried various combinations of msdeploy.adx, msdeployagentservice, http, https, windows auth, windows + iis auth, etc.

    My settings from VS2012 to a Windows 7 Server

    Publish Method: Web Deploy
    Service URL: http://IPOnLocalVPN/msdeployagentservice
    Site / Application: Default Web Service/myApp
    User Name: MachineName\Admin
    Password: blah

    Pretty agonizing that all of the MS documentation fails to mention this little key. I guess my naive question is this a fail in the documentation, or a workaround because I didn’t do something else? (Keeping in mind that I worked on this connection problem for about 7 hours as an IIS noob, and read ~20 different articles from different sources on Web Deploy and then error remediation).

    Blech.

  7. September 3, 2013 at 6:33 am

    GREAT!! thanks!

  8. October 3, 2013 at 4:30 pm

    Huge THANKS, Why didn’t I find this article 5 hours ago.

  9. Rich O
    October 23, 2013 at 2:17 pm

    I concur wholeheartedly with above acolades. I was blaming Netscaler for this. Much obliged

  10. TrickyMicky2
    November 5, 2013 at 11:09 am

    After reading various types of suggestions on this error on web, I stumbled on this page. After implementing the steps outline I was back to life.
    My problems arose when the certificate on web server/domain was changed

  11. sleeper
    January 29, 2014 at 7:50 pm

    This solved my problem on Server 2012R2 with Web Deploy 3.5 Thanks.

  12. February 12, 2014 at 3:24 pm

    HOLY FUCK, ty man!

  1. October 7, 2013 at 7:29 am
  2. October 7, 2014 at 2:00 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: