简体   繁体   English

发布时服务器证书错误,.Net core 5.0,IIS 服务器

[英]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.

相关问题 将 .NET CORE 5.0 API 发布到 IIS - Publish .NET CORE 5.0 API to IIS 当在 IIS 中发布 .net 核心 web 应用程序的示例项目时,出现 Z293C9EA246FF99875DC6F62A5601 内部服务器错误。 - When Publish sample project of .net core web app in IIS getting HTTP Error 500.19 Internal Server Error 使用IIS在服务器上发布ASP Net网站 - Publish asp net website on server using IIS Asp net core 在 azure 应用服务上发布 500 服务器错误 - Asp net core publish on azure app services 500 server error 在IIS上托管Net Core 2.0应用程序会出现内部服务器错误 - Hosting net core 2.0 app on iis gives internal server error 在 IIS 上启动 .NET Core Web API 时出错:“应用程序正在 IIS 进程内运行,但未配置为使用 IIS 服务器” - Error on starting .NET Core Web API on IIS: "Application is running inside IIS process but is not configured to use IIS server" 在TFS构建服务器上发布ASP网络核心 - publish asp net core on TFS build server 将 ASP.NET Core 5.0 部署到 Ubuntu 20.04 并收到 500 服务器错误和白屏 - Deployed ASP.NET Core 5.0 to Ubuntu 20.04 and am getting 500 server error and white screen 将 .NET Core Web API 部署到 IIS 服务器 - Deploying .NET Core Web API to IIS Server 如何在 .NET Core 5.0 API 中获取服务器 IP 或主机名 - How to get Server IP or HostName in .NET Core 5.0 API
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM