clickonce install fail with INET_E_INVALID_CERTIFICATE

Gal -1 1 Reputation point
2020-12-30T16:09:02.807+00:00

My click once setup.exe fails with the following error:
URLDownloadToCacheFile failed with HRESULT '-2146697191' Error: An error occurred trying to download 'https://galantha.net/appPublishGalanthasEncryptedNotes/GalsPassHolder.application'.

HRESULT '-2146697191' = 0x800C0019 which according to:
https://learn.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775145(v=vs.85)?redirectedfrom=MSDN INET_E_INVALID_CERTIFICATE 0x800C0019 The SSL certificate is invalid.

I hit a wall. The deployment is hosted here: https://galantha.net/appPublishGalanthasEncryptedNotes/publish.htm and as you can see, the ssl cert is just fine. I spent a few hours trying to chase this and failed. Any help would be appreciated.

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,826 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,367 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Daniel Zhang-MSFT 9,611 Reputation points
    2020-12-31T02:07:40.947+00:00

    Hi Gal1-5388,
    I dowloaded the application from the url you provided and it worked fine.
    According to the error information, it looks like your SSL certificate isn't setup correctly for the url you are trying to access.
    So you need to sort out the certificate to fix it.
    To make ClickOnce work over an SSL connection, make sure that the certificate is up-to-date, and that the certificate data matches the site data.
    And you can also try the link as plain "http" to check if it work.
    Here some useful links you can refer to.
    HTTPS and ClickOnce Deployment Not Working
    Server and Client Configuration Issues in ClickOnce Deployments
    Certificate Expiration in ClickOnce Deployment
    Best Regards,
    Daniel Zhang


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments