none
ClickOnce setup.exe fails on Windows 7 only

    Question

  • Hi All,

    Since working on a new Windows 10 PC with Visual Studio 2017 Community, my ClickOnce apps are no longer being installed on Windows 7 PCs. They work just fine on Windows 10

    The Error that it gives is the following:

    URLDownloadToCacheFile failed with HRESULT '-2146697208'

    Error: An error occurred trying to download 'https://www.sitename.com/MYAPP.application'. (Not the real URL)

    Various posts suggest it could be a few things such as the URL from Dev to Server etc. but this has always worked previously and is not being forwarded.

    Running the .application link directly works so it must be something in the setup.exe generated by ClickOnce.

    I am targeting the correct 4.5.2 Framework which works in Win 7

    What I did find strange is that looking through the "Prerequisites" in VS2017 I noticed that my "Windows Installer 4.5" and it's predecessor 3.1 is no longer listed for ticking. I'm not sure why they are missing or where I can find them in order to readd them into the list.

    I'm also unsure whether my Signing of the assembly with SHA256RSA Authenticode Cert could be breaking it (As I have been warned it will on Windows XP) although this is doubtful as it has more to do with the earlier versions of .NET 4.5.1 and older.

    Is there anything I can do to check what the issue is? and where I can restore my Windows Installers back into my Prerequisites list?

    Kind Regards,

    R144N

    Wednesday, February 7, 2018 10:28 AM

All replies

  • Hi R144N,

    >>URLDownloadToCacheFile failed with HRESULT '-2146697208'

    From the this document, you can get this message about this error:

    If a user has set Internet Explorer Advanced Security option "Warn if changing between secure and not secure mode" on the deployment target computer, and if the setup URL of the ClickOnce application being installed is redirected from a non-secure to a secure site (or vice-versa), the installation will fail because the Internet Explorer warning interrupts it.

    To resolve this, you can do one of the following:

    - Clear the security option.
    - Make sure that the setup URL is not redirected in such a way that changes security modes.
    - Remove the redirection completely and point to the actual setup URL.

    Also please refer to the following documents for this issue:

    URLDownloadToCacheFile Failed

    Installation of a ClickOnce application failing with an error pointing to a wrong deployment URL.

    Regards,

    Frankie


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, February 8, 2018 7:20 AM
    Moderator
  • Hi Frankie. Thanks for responding. I have indeed already tried all those prior to posting. There is no redirection (it is a direct hard coded HTTPS link in Clickonce) and they are not using IE but Chrome and Firefox. Also as mentioned it works perfectly fine in Windows 10 - it's only Windows 7 that has the issue which is why I thought it may be related to Windows Installer not being included in the Prerequisites list. Kind Regards, R144N
    Thursday, February 8, 2018 9:41 AM
  • Hi R144N,

    As far as I know, Windows 7 has the .Net Framework 3.5 version by default, and as you said, your project just has issue in Win7, I'm afraid it is because of the low version of the .Net Framework, please check it in this situation.

    Regards,

    Frankie


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, February 9, 2018 7:09 AM
    Moderator
  • Thanks Frankie. But again I did mention in my original post I was using.NET 4.5.2 Regards, R144N
    Friday, February 9, 2018 7:44 AM
  • Hi R144N,

    In general, my first reply is the solution for this general error, but it seems can not solve your problem, also as you said, it occurred only in Win7, I'm not sure the real reason, I suggest you contact Microsoft to solve it.

    Regards,

    Frankie


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, February 12, 2018 8:20 AM
    Moderator