1

I am attempting to troubleshoot a ClickOnce VSTO Deployment and I'm getting the following error:

************** Exception Text **************
System.TimeoutException: The application could not be downloaded because a connection to the network could not be established. Ensure that you can connect to the network, and try again.
   at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.DownloadAddIn(TimeSpan timeout)
   at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()

I've tried looking up the solution online in several places and have yet to find anything definitive. This occurs for only one VSTO package out of a set of packages, all the rest of the packages work correctly.

Things I have tried or considered:

-This being a proxy issue: I don't believe so, because other packages work correctly and I'm running this on a work computer, where those settings are managed and I can't control them.

-I have attempted to log this using ClickOnce's built in logging functionality, but no error was logged. ERROR DETAILS No errors were detected during this operation.

-I have attempted to use Fiddler to trace the requests being made to the server, but they all say HTTP 200 OK as the result. The error seems not to occur until after all of the requests have been made and returned.

-I have attempted to attach a debugger to the process, but the exception doesn't get thrown back to the debugger so it's difficult to see what's going on at the time of failure.

-I investigated if the firewall might also be an issue, but the machines I'm using also have this managed for me. One machine has the firewall turned on, and the VM I have has the firewall turned off.

Since it appears that the error is difficult to capture I have had difficulty narrowing down the cause, and most online solutions I've found either propose that its a proxy issue or modify some network protocol settings. These are things I'm reluctant to do on anything owned by work or a customer.

Any input at all would be appreciated. Thank you!

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
Coliwack
  • 11
  • 2
  • 14
  • Are there any additional resources I could explore to find more info about this issue? It's causing a significant amount of pain for customers. – Coliwack Sep 23 '22 at 13:52
  • How does one normally debug or troubleshoot VSTO Files – Coliwack Sep 26 '22 at 14:48
  • Have you seen [VSTO ClickOnce ends with "The application could not be downloaded because a connection to the network could not be established."](https://stackoverflow.com/questions/24629215/vsto-clickonce-ends-with-the-application-could-not-be-downloaded-because-a-conn)? Sounds like exactly your case. How do you sign the installer with a digital signature? Do you modify files after? – Eugene Astafiev Sep 28 '22 at 22:32
  • I don't modify files afterward. – Coliwack Apr 03 '23 at 13:09

1 Answers1

1

This error occurs because the ClickOnce manifest is not signed. The manifest must be signed with a certificate that is trusted by the computer. The certificate must be installed in the Trusted Root Certification Authorities store.

To resolve this issue, sign the manifest with a certificate that is trusted by the computer.

Tibic4
  • 3,709
  • 1
  • 13