Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
787 views
in Technique[技术] by (71.8m points)

iis - Getting a 404 from WMSvc via MSDeploy.exe

From Windows 8 to Windows Server 2012 (IIS 8) with Web Management Services installed and working, I can use IIS Manager on W8 box to manage the remote server but I get a 404.7 from WMSvc when I execute the following command:

msdeploy.exe" -verb:dump -source:contentPath=c:InetPubwwwroot,computerName=https://uktnws01:8172/MsDeploy.axd,userName=corpadministrator,password=WMSvcIsCrap,authType=Basic -allowUntrusted

I've tried all sorts of combinations and parameters. I can telnet to that port, I know its open.

I'm just removing the Management Service feature from Windows and restarting. I will pour myself a scotch and make some snacks. In the meantime, if you have any ideas, please share.

Join my live blog below and follow the action.

Update 1

With Management Service removed, I now get

Error: Unable to connect to the remote server Error: No connection could be made because the target machine actively refused it 192.168.2.22:8172 Error count: 1.

Where the 2nd line is a new message! Woohoo.

Update 2

Okay, so things are going from bad to worse now. Since reinstalling, the remote IIS console will alert on the certificate and then say,

The server is not accepting remote connections.

But I think this is because I probably didn't re-enable Remote Management, on top of installing the damned thing.

Update 3

With Remote Management enabled, the remote IIS works again but the 404 has returned. Just in the interests of SEO, here's the full error:

Error Code: ERROR_DESTINATION_NOT_REACHABLE More Information: Could not connect to the remote computer ("uktnws01"). On the remote computer, make sure that Web Deploy is installed and that the required process ("Web Management Service") is started.  Learn more at http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE.
Error: The remote server returned an error: (404) Not Found.
Error count: 1.

Update 4

Tried the same command against another web server over a VPN to a client and that works a charm! Looks like IIS is fubar'ed on my absolutely spanking new 2012 build.

Update 5

I enabled failed request tracing for WMSvc and have seen that the 404.7 comes from the RequestFilteringModule module. 404.7 is 'File Extension Denied' according to the documentation.

http://www.iis.net/configreference/system.webserver/security/requestfiltering

Adding an explicit server rule for .axd files does not help though. Interesting to see this module though since it imposes restrictions on URL length and content sizes. Can you imagine troubleshooting this in an IIS hosted WCF app! Haha. I'm crying really.

Update 6

I'm removing Request Filtering which means removing ASP.NET and various other things also. They need a Reinstall Windows Features & Dependencies All In One Hit Because We Write Unreliable Software option.

Update 7

I reinstall everything and then some Aussie named Richard appears out of nowhere and totally explains that Web Deploy isn't actually a part of WMSvc as standard, even on IIS 8, and that I need to install Web Deploy.

So I do. Then I disable MsDepSvc which is the other part it installs (which I thought was the entirety of Web Deploy) because it sucks on port 80 and stops load balancers from seeing a downed IIS service.

And it works. I can go to bed.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

In case someone else is having the same issues than what I am having, I also got the same 404 error. The quickest way I found to check was to go on the server itself, and open up "https://<servername>:8172/MsDeploy.axd". Chrome & Firefox just showed a blank page, so I had to use the Network tab of the developer tools (F12) to see the actual 404 error message.

Somehow, while installing Web Deploy 3.0 from the Web Platform Installer, the IIS 7 Deployment Handler didn't get installed, even though the IIS Manager UI Module did. In my case, I downloaded the Web Deployment Tool Installation .msi from the following link: Web Deployment Tool Installation. Then I had to go back to IIS Admin Tool (Start -> Run -> inetmgr.exe) > {server name} > click on Management Service icon, and restart the management service before the MsDeploy.axd handler started working.

Enabling IIS Deployment Handler + Remote Agent Service

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...