gpt4 book ai didi

msbuild - 一键发布绕过证书验证

转载 作者:行者123 更新时间:2023-12-04 12:51:46 25 4
gpt4 key购买 nike

我正在使用 VS2015 Update 1 尝试一键发布 aspnet 5 vNext MVC 站点。我要发布到的服务器没有真正的证书,因此出现错误:

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.DNX.Publishing.targets(386,5): Error : Error Code: ERROR_CERTIFICATE_VALIDATION_FAILED

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.DNX.Publishing.targets(386,5): Error : More Information: Connected to the remote computer ("REDACTED") using the specified process ("Web Management Service"), but could not verify the server's certificate. If you trust the server, connect again and allow untrusted certificates. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_CERTIFICATE_VALIDATION_FAILED.

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.DNX.Publishing.targets(386,5): Error : Error: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.DNX.Publishing.targets(386,5): Error : Error: The remote certificate is invalid according to the validation procedure.

根据(相当旧的)链接,我发现我可以通过手动运行 msbuild 命令并传递 -allowUntrusted 开关轻松地让它工作。但是,我找不到 UI 对话框设置、*.pubxml 中的 XML 标记,也找不到 *publish.ps1 文件中使此行为在视觉中起作用的好地方工作室。

如何让一键发布忽略我服务器的无效证书?

最佳答案

*One Click pub.xml文件

<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
...
<AllowUntrustedCertificate>True</AllowUntrustedCertificate>
...

关于msbuild - 一键发布绕过证书验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34726885/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com