[英]Server Certificate Error on publish, .Net core 5.0, IIS server
I am trying to publish my .net core 5.0 application to our IIS Server.我正在尝试将我的 .net 核心 5.0 应用程序发布到我们的 IIS 服务器。 Every time I do I keep getting the following error:
每次我这样做时,我都会收到以下错误:
Severity Code Description Project File Line Suppression State Error Web deployment task failed.
严重性代码 描述 项目文件行抑制 State 错误 Web 部署任务失败。 (Connected to the remote computer ("myServer") 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: https://go.microsoft.com/fwlink/?LinkId=221672#ERROR_CERTIFICATE_VALIDATION_FAILED. )
(使用指定进程(“Web 管理服务”)连接到远程计算机(“myServer”),但无法验证服务器的证书。如果您信任服务器,请再次连接并允许不受信任的证书。了解更多信息: https: //go.microsoft.com/fwlink/?LinkId=221672#ERROR_CERTIFICATE_VALIDATION_FAILED。 )
I found this post over the same issue.我在同一个问题上找到了这篇文章。 No matter what configuration I use in my publish profile though it does not seem to work.
无论我在发布配置文件中使用什么配置,尽管它似乎都不起作用。 I am a bit confused that the publish profile I imported does not contain PropertyGroup information or anything like that.
我有点困惑,我导入的发布配置文件不包含 PropertyGroup 信息或类似的信息。 Just the publishProfile tag with relevant information.
只是带有相关信息的 publishProfile 标签。
PublishSettings:发布设置:
Here are my publish settings.这是我的发布设置。 What do I need to add in order to get my publishing of the app to ignore the server cert?
为了让我的应用程序发布忽略服务器证书,我需要添加什么? Again I just want to say I tried adding the AllowUntrustedCertificate and multitude of other suggestions from that other post.
我只想说我尝试添加AllowUntrustedCertificate和其他帖子中的许多其他建议。 Is that setting supposed to go inside the publishProfile information or just right after it within the PublishData?
该设置应该是发布配置文件信息中的 go 还是 PublishData 中的设置? Either way nothing I do works.
无论哪种方式,我所做的都不起作用。
<?xml version="1.0" encoding="utf-8"?>
<publishData>
<publishProfile
publishUrl="https://MYSERVER:8172/msdeploy.axd"
msdeploySite="ToolController"
destinationAppUrl="http://myWebSite"
mySQLDBConnectionString=""
SQLServerDBConnectionString=""
profileName="Default Settings"
publishMethod="MSDeploy"
userName="myUserName" />
</publishData>
I am also using Visual Studio 2019 in case that helps at all.我也在使用 Visual Studio 2019,以防万一。
Okay so I am not sure why but using the normal method I typically do.好的,所以我不知道为什么,但使用我通常使用的正常方法。 By going to the IIS server -> right clicking the site -> Deploy -> Configure Web Deploy Publishing was not working at all.
通过转到 IIS 服务器 -> 右键单击站点 -> 部署 -> 配置 Web 部署发布根本不起作用。
Instead I opted to use the visual studio option of generating the publish file by doing Web Server (IIS) -> filling in the relevant info.相反,我选择使用 Visual Studio 选项通过执行 Web 服务器 (IIS) -> 填写相关信息来生成发布文件。 I then added the
然后我添加了
<AllowUntrustedCertificate>True</AllowUntrustedCertificate>
and everything worked fine.一切正常。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.