开发者

401 on MS Web Deploy

First thing you should know is that this worked on Wednesday of last week and the VM has been has been rolled back to the Monday of last week.

I have the latest version of MS Web deploy setup on two machines. One is inside of our network and one is in the DMZ (external network). The internal one still works great but the server in the DMZ is not letting me 开发者_如何学Pythondeploy.

The normal procedure is to deploy from VS 2010 using web publish to http://SITENAME/MsDeployAgentService with a username and password of a local administrator of the target server. Now when I try that it just hangs for 2 minutes and says it could not connect to http://SITENAME/MsDeployAgentService. A packet sniffer (wireshark) tells me that they are talking but after authenticating all they say is

HTTP/1.1 200 OK

Transfer-Encoding: chunked

Server: Microsoft-HTTPAPI/2.0

MSDeploy.Response: v1

Date: Tue, 22 Mar 2011 22:46:33 GMT

B

...<results

B5

><trace eventLevel="Verbose" message="The HTTP connection (ID='5ccfecc6-0263-4e42-bc86-dbc4ee8df3d0', type ='GetTraceStatus') is being kept alive while the request is processed." />

B4

<trace eventLevel="Verbose" message="The HTTP connection (ID='5ccfecc6-0263-4e42-bc86-dbc4ee8df3d0', type ='GetTraceStatus') is being kept alive while the request is processed." />

A

</results>

0

So I decided to package up the project (I've tried multiple projects on the server, none work) and copy it to the c: of the server.

PROJECTNAME.deploy.cmd /T  
or 
PROJECTNAME.deploy.cmd /T /m:http://localhost/MsDeployAgentService /u:USERNAME /p:Password 

Work but

PROJECTNAME.deploy.cmd /T /m:http://devel.sitename.com/MsDeployAgentService /u:USERNAME /p:Password  
and
PROJECTNAME.deploy.cmd /T /m:http://localhost/MsDeployAgentService /u:USERNAME /p:Password /a:basic

Do not. The error I get is

Error: Remote agent (URL http://localhost/MsDeployAgentService) could not be contacted.  Make sure the remote agent service is installed and started on the target computer.
Error: An unsupported response was received. The response header 'MSDeploy.Response' was '' but 'v1' was expected.
Error: The remote server returned an error: (401) Unauthorized.
Error count: 1.

Any ideas on troubleshooting steps? The only thing that changed over the past week is that our network got a virus that shut down the corporation but it didn't infect the DMZ and I'm told that no rules where changed on our firewall. Fear that a setting got changed is why the VM was rolled back to Monday (8 days), a few days before the last time I know this worked.


That sounds like either the user does not have the correct IIS Management Permissions to the Site and/or application, or the user account that the Windows Management Service runs as (Local Service) does not have file system permissions to the folders where you're deploying to.

Below are some links to setup guides. I would make sure that the configuration is in fact correct, and that port 8172 is open on the firewall (for the management service).

  • Good guide that covers most of the setup
  • How to setup your project to use MSBuild to get more verbose error messages
  • Scott Gu's post on setting up Web Deploy in Visual Studio


In my case, I was using userPWD and changed it to Password and it worked. I got a hint from Event Viewer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜