visual-studio | hosting | aspnet-core

Fix: Web deploy - could not verify the server certificate

Fix for "Web deployment task failed. (Connected to the remote computer ("xxx") 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.

Abhith Rajan
Abhith RajanApril 06, 2018 · 1 min read · Last Updated:

Today when I tried to deploy my new ASP.NET CORE 2 app to SmarterASP.NET, the deployment failed with a message

Web deployment task failed. (Connected to the remote computer (“xxxxxxxxx”) 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.

I got the publish profile from the SmarterASP.NET control panel and when I opened the PublishSettings using VS Code, it had AllowUntrustedCertificate=“True” which I imported to the project but when I checked the Publish Profile under my project ( Project > Properties > xxx.pubxml), there was no entry of AllowUntrustedCertificate.

So, in order to fix the issue, inside PropertyGroup just added

1<AllowUntrustedCertificate>True</AllowUntrustedCertificate>

That solved the issue with web deploy.

This page is open source. Noticed a typo? Or something unclear?
Improve this page on GitHub


Abhith Rajan

Written byAbhith Rajan
Abhith Rajan is a software engineer by day and a full-stack developer by night. He's coding for almost a decade now. He codes 🧑‍💻, write ✍️, learn 📖 and advocate 👍.
Connect

Is this page helpful?

Related ArticlesView All

Related VideosView All

What’s new in Visual Studio 2022 for testing

Exploring Source Generation for Logging

Optimizing msbuild (C#/.NET/C++) build performance with Visual Studio 2022

Related Tools & ServicesView All

mxtoolbox.com

MX Lookup Tool - MxToolbox

Check your DNS MX Records online
flurl.dev

Flurl

Flurl is a modern, fluent, asynchronous, testable, portable, buzzword-laden URL builder and HTTP client library for .NET.