Spent quite a bit of time configuring web deploy on IIS 7.5. I've made sure that Web Deploy 3.5 was installed with all features, and that both the Web Management Service and Web Deployment Agent is running.
In Visual Studio I'm able to use the publishing wizard and validate my connection to the server. Additionally I can click on 'preview' on the last step to see a list of files. If I choose only one to publish it kicks off the process like normal and then hangs.
Web deployment task failed. (Web Deploy experienced a connection
problem with the server and had to terminate the connection.Learn more at:
http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_CONNECTION_TERMINATED.)
Using Wireshark here's the end of the conversation once I started the deploy
<HTML><HEAD><TITLE>Bad Request</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Bad Request - Request Too Long</h2>
<hr><p>HTTP Error 400. The size of the request headers is too long.</p>
</BODY></HTML>
The request header length that was sent was 18,846 characters.
I've also been trying everything in here with no luck. Visual Studio 2010 Web deployment task failed
Update: Here's the beginning of the request that was sent:
OST /MSDEPLOYAGENTSERVICE HTTP/1.1
MSDeploy.VersionMin: 7.1.600.0
MSDeploy.VersionMax: 9.0.1762.0
MSDeploy.RequestUICulture: en-US
MSDeploy.RequestCulture: en-US
Version: 9.0.0.0
MSDeploy.Method: Sync
MSDeploy.RequestId: 5686a2d6-a28a-4a0e-80bb-3c3c92369c85
MSDeploy.sid: 414bbf3d-22d7-413f-b235-f28c01face66
User-Agent: Unknown;sid=414bbf3d-22d7-413f-b235-f28c01face66;op=Sync
MSDeploy.PassId: 1
Content-Type: application/msdeploy
MSDeploy.ProviderOptions: H4sIAAAAAAAEA....
Update 2: Tried publishing in VS2013 and it worked like a charm..
Solved by changing the server to to https://myserver.com instead of http://myserver.com
来源:https://stackoverflow.com/questions/21246783/web-deploy-results-in-request-too-long-only-in-vs2012