我为EC2安装了一个新的AMI(http://aws.amazon.com/amis/Microsoft/5147732567196848),并在其上安装了Web部署2.1。
Web部署2.1服务正在以
的形式运行netstat -an
Web部署代理服务正在监听8172。
但是,当我尝试使用Project->右键单击>发布(通过Web部署)部署到此站点时,我收到以下错误消息
------ Build started: Project: Cir.Web, Configuration: Debug Any CPU ------
Cir.Web -> C:\Projects\CrazyInsaneRobot\Source\Cir.Web\bin\Cir.Web.dll
------ Publish started: Project: Cir.Web, Configuration: Debug Any CPU ------
Transformed Web.config using Web.Debug.config into obj\Debug\TransformWebConfig\transformed\Web.config.
Auto ConnectionString Transformed Views\Web.config into obj\Debug\CSAutoParameterize\transformed\Views\Web.config.
Auto ConnectionString Transformed obj\Debug\TransformWebConfig\transformed\Web.config into obj\Debug\CSAutoParameterize\transformed\Web.config.
Copying all files to temporary location below for package/publish:
obj\Debug\Package\PackageTmp.
Start Web Deploy Publish the Application/package to https://ec2-175-41-170-198.ap-southeast-1.compute.amazonaws.com:8172/msdeploy.axd?site=Default%20Web%20Site ...
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(3847,5): Warning : Retrying the sync because a socket error (10054) occurred.
Retrying operation 'Serialization' on object sitemanifest (sourcePath). Attempt 1 of 10.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(3847,5): Warning : Retrying the sync because a socket error (10054) occurred.
Retrying operation 'Serialization' on object sitemanifest (sourcePath). Attempt 2 of
...
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(3847,5): Warning : Retrying the sync because a socket error (10054) occurred.
Retrying operation 'Serialization' on object sitemanifest (sourcePath). Attempt 10 of 10.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(3847,5): Error : Web deployment task failed.(Could not complete the request to remote agent URL 'https://ec2-175-41-170-198.ap-southeast-1.compute.amazonaws.com:8172/msdeploy.axd?site=Default Web Site'.)
This error indicates that you cannot connect to the server. Make sure the service URL is correct, firewall and network settings on this computer and on the server computer are configured properly, and the appropriate services have been started on the server.
Error details:
Could not complete the request to remote agent URL 'https://ec2-175-41-170-198.ap-southeast-1.compute.amazonaws.com:8172/msdeploy.axd?site=Default Web Site'.
The underlying connection was closed: An unexpected error occurred on a send.
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
An existing connection was forcibly closed by the remote host
Publish failed to deploy.
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========
EC2实例上的防火墙已关闭。我的AWS防火墙设置是
这是推荐的设置。
其他说明/想法:
如果有人对如何调试这个有任何建议,我会非常感激!
答案 0 :(得分:33)
我直接联系Microsoft了解这个问题,他们立即给我答复。
来自MS家伙:
您的Web管理服务似乎无法联系。我之前在服务证书无效时已经看过了。你可以在你的服务器上运行附加的脚本吗?
这可以解决问题吗?
他所指的脚本是available here
答案 1 :(得分:6)
以错误的格式指定结束点时,也会发生此错误。
例如,在选择发布应用程序时,Visual Studio提供了端点格式的示例,例如https://RemoteServer:8172/MsDeploy.axd
原来它实际上想要没有http前缀,例如 0.0.0.0:8172/MsDeploy.axd
如果您在此之后收到有关证书的错误,则只需在发布屏幕中选中允许不受信任的证书框。
Agrahahah!
答案 2 :(得分:1)
Web部署安装程序安装Web部署时遇到了同样的问题。手动卸载并直接重新安装Web Deploy(不使用Web PI)后,它工作正常......
答案 3 :(得分:0)
对于包含许多原因的错误消息,一些非常有用的答案。我遇到了这个错误,结果发现用于目标服务器的“IIS网站/应用程序”名称是错误的。
因此,原因可能包括:
答案 4 :(得分:0)
当我尝试部署网站时遇到同样的错误。
在EventViewer(Windows日志/系统)中我有一个错误日志,无法创建Web管理服务的日志文件(“无法创建日志文件D:\ Logfiles \ WMSVC \ W3SVC1 \ u_ex131126.log确保日志记录目录正确,并且此计算机具有对该目录的写入权限。“。
我刚刚删除了日志文件夹的只读标志,所有工作都再次正常。