VS2017 RC Web部署-ERROR_CERTIFICATE_VALIDATION_FAILED

问题描述:

首先,我将ASP.NET Core项目升级到1.1.0.那一点都不顺利.现在,当它起作用时,我将无法部署它!

First, I upgraded my ASP.NET Core project to 1.1.0. That wasn't smooth at all. Now, when it works, I can't deploy it!

我将其部署到IIS(Windows Server 2012 R2),但出现错误提示

I deploy it to IIS (Windows Server 2012 R2) and I get the error saying

无法验证证书... ERROR_CERTIFICATE_VALIDATION_FAILED!

can't validate the certificate ... ERROR_CERTIFICATE_VALIDATION_FAILED!

我将此添加到了我的发布资料中:

I added this to my publishing profile:

<AllowUntrustedCertificate>True</AllowUntrustedCertificate>

<AllowUntrustedCertificate>True</AllowUntrustedCertificate>

但是在 VS2017 RC 中不起作用.那么,我现在该如何部署? 为什么你们从一开始就不提供它?这是必不可少的操作!

but that doesn't work in VS2017 RC. So, how can I deploy now? Why you guys do not provide it from a start? This is an essential operation!

当您使用错误的凭据和/或存储的密码时,也会出现此问题.要检查这一点,请将以下行添加到pubxml文件中:

The issue also appears when you are using wrong credentials: and\or stored password. To check this add into the pubxml file the following line:

<UseMsdeployExe>True</UseMsdeployExe>

这将从VSMSDeploy切换到MSDeploy-它使您更加冗长且出现错误. 如果您存储密码,只需删除存储在.pubxml文件附近的.pubxml.user文件,然后在发布"设置中再次添加密码即可.

this will switch from VSMSDeploy to MSDeploy - it got you more verbose with errors. If you store your password just remove the .pubxml.user file stored near .pubxml file and in Publish setting add the password once more.