首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >webdeploy的MsDeploy失败

webdeploy的MsDeploy失败
EN

Stack Overflow用户
提问于 2012-06-05 17:20:10
回答 3查看 13.1K关注 0票数 7

我正在尝试web部署。

因为我想能够重现这个,所以我使用了一个测试系统

Windows 2008 RC、IIs 7.5 + Deployment package I使用支持http://learn.iis.net/page.aspx/516/configure-the-web-deployment-handler/的tracing http://technet.microsoft.com/en-us/library/ff729439(v=ws.10).aspx配置部署

我创建了一个新的WCF服务应用程序,(未做任何更改)编译它并尝试部署

我得到以下响应(几分钟后)

代码语言:javascript
复制
------ Build started: Project: WcfService1, Configuration: Debug Any CPU ------
  WcfService1 -> C:\Development\BrandShield\Services\WcfService1\bin\WcfService1.dll
------ Publish started: Project: WcfService1, Configuration: Debug Any CPU ------
Transformed Web.config using Web.Debug.config into obj\Debug\TransformWebConfig\transformed\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 http://dev1:8172/msdeploy.axd/MSDEPLOYAGENTSERVICE ...
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 'http://dev1:8172/msdeploy.axd/MSDEPLOYAGENTSERVICE'.)
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 'http://dev1:8172/msdeploy.axd/MSDEPLOYAGENTSERVICE'.
The underlying connection was closed: An unexpected error occurred on a receive.
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 ==========

并且在dev1服务器端(根本)没有日志。

我尝试了许多变体,但这是最简单、最容易重现的。而且它正在失败。

有什么想法吗?

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2012-06-05 23:12:29

我找到问题了。

我没有使用"http://“dev1:8172/msdeploy.axd”,而是使用了dev1:8172/msdeploy.axd

这实际上与“msdeploy.axddev1:8172/https://”“相同,出于某种原因,它是部署代理侦听的地方。

从这里,你会得到一个新的错误:

代码语言:javascript
复制
Could not complete the request to remote agent URL 'https://dev1:8172/msdeploy.axd?site=Default web site'. 
The underlying connection was closed: 
Could not establish trust relationship for the SSL/TLS secure channel.
The remote certificate is invalid according to the validation procedure.

这是因为您没有SSL证书。

在“发布配置文件”窗口中,您需要选中“允许不受信任的证书”复选框

发布应该会成功。祝好运

票数 10
EN

Stack Overflow用户

发布于 2017-03-25 13:08:28

通过传递证书:

步骤1:

代码语言:javascript
复制
System.Net.HttpWebRequest req = (HttpWebRequest)WebRequest.Create(Url);
ServicePointManager.ServerCertificateValidationCallback = AcceptAllCertifications;

第2步:

代码语言:javascript
复制
public Boolean AcceptAllCertifications(Object sender, System.Security.Cryptography.X509Certificates.X509Certificate certification, System.Security.Cryptography.X509Certificates.X509Chain chain, System.Net.Security.SslPolicyErrors sslPolicyErrors)
{
    return true;
}
票数 0
EN

Stack Overflow用户

发布于 2020-03-10 03:13:50

在我的案例中,我在Azure SSL构建管道中遇到了这个问题,这是构建代理(on-prem机器)和Azure DevOps之间的DevOps /TLS版本不匹配。我不知道为什么会发生这种情况,但我遵循了这篇guide,详细介绍了如何在注册表中使用SCH_USE_STRONG_CRYPTO标志,以强制使用“强加密”(TLS1.2、TLS1.1和TLS1.0)。

在构建代理机器上,我使用.NET Framework4(x86/x64)的以下键更新了注册表:

代码语言:javascript
复制
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319]
"SchUseStrongCrypto"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319]
"SchUseStrongCrypto"=dword:00000001

我仍然不明白的是,为什么我从一开始就没有使用“强加密”,以及我实际使用的是什么?(SSL v.X?为什么?)

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/10894671

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档