Clickonce: error of downloading application file for Install Mode and Settings: This application is available online only

Carlos 0 Reputation points
2025-04-02T01:58:19.32+00:00

Hi

I have the following Windows forms application which is used to publish by ClickOnce technology.

When I publish the application with "Install Mode and Settings: This application is available online only". The setup.exe is generated in publish folder.

The content of publish folder is hosted to the web server which belongs to the Finance area.

I downloaded setup.exe from the browser and then I clicked it and I got the following message: Error: An error occurred trying to download hhttps://www.example.com/myAPP/App.application

I also have the information the information of URLDownloadToCacheFile failed wi HRESULT '-2146697208'

This error happened in a PC from Accouting Area. This area has its own network topology/firewall/waf/antivirus and its own Active Directory policies

Even though, I executed in cmd:

curl -o /dev/null -s -w "%{http_code}\n" -k https://www.example.com/myAPP/App.application

It returns 200

curl -o "C:\Users\john\AppData\Local\Apps\2.0" https://www.example.com/myAPP/App.application

It saves the file.

The execution of setup.exe works well in a PC from Finance Area. This area has its own network and its own Active Directory policies

The execution of setup.exe works also well at my home where there's no restriction

If the application is published as "Install Mode and Settings: This application is available offline as well", the execution of setup.exe works well for both areas and my home.

I could conclude that the deployment is not working because of policies/permissions in the Accounting Area.

Questions:

Why is there a downloading error for 'This application is available online only' mode?

How does clickonce setup.exe perform the downloading of https://www.example.com/myAPP/App.application? This is for understanding its process?

.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,215 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Minxin Yu 13,501 Reputation points Microsoft External Staff
    2025-04-02T03:12:16.25+00:00

    Hi,

    You can get the install process through the install.log file.
    Launching Application.E.g.

    URLDownloadToCacheFile failed with HRESULT '-xxxxxxxx '. Error: An error occurred trying to download 'https://www.example.com/myAPP/App.application/WindowsFormsApp1.application'.

    Clickonce calls API URLDownloadToCacheFile from urlmon.dll.

    HRESULT '-2146697208':
    0x800c0008 (INET_E_DOWNLOAD_FAILURE)

    Best regards,

    Minxin Yu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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.


  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.