本文介绍了从Visual Studio 2015发布-允许不受信任的证书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要从Visual Studio 2015发布我的ASP.NET 5 MVC6项目。我已经从服务器导入了发布配置文件。连接成功验证,但是在发布项目时出现以下错误:

I am publishing my ASP.NET 5 MVC6 project from Visual Studio 2015. I have imported publish profile from my server. Connection validates successfully, however when I publish my project I have the following error:

ERROR_CERTIFICATE_VALIDATION_FAILED

ERROR_CERTIFICATE_VALIDATION_FAILED

没有选择允许发布不信任证书设置。

There is no option to allow untrusted certificates in publishing settings.

推荐答案

当前工具尚不支持允许不受信任的证书的选项。希望它会很快更新。但是,您可以手动设置它。

The option to allow untrusted certificates is not yet supported in the current tooling. Hopefully, this gets updated very soon. You can, however, set it manually.


  1. 打开发布配置文件( .pubxml )在文本编辑器的/ Properties / PublishProfiles内

  2. < PropertyGroup> 元素内,将AllowUntrustedCertificate设置为True(< AllowUntrustedCertificate> True< / AllowUntrustedCertificate> )或添加(如果不存在的话)

  3. 将UsePowerShell设置为False(< UsePowerShell> False< / UsePowerShell> )。

  1. Open the publish profile file (.pubxml) inside /Properties/PublishProfiles in a text editor
  2. Inside the <PropertyGroup> element, set AllowUntrustedCertificate to True (<AllowUntrustedCertificate>True</AllowUntrustedCertificate>) or add it if it doesn't exist
  3. Set UsePowerShell to False (<UsePowerShell>False</UsePowerShell>).

如果您。

You can get powershell to work if you update the module version in the .ps1 file.

另外,您也可以通过在本地信任服务器的证书来解决此问题。

As a side note, you can also get around this problem by "trusting" the server's certificate locally.

这篇关于从Visual Studio 2015发布-允许不受信任的证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 03:56