Score:0

Where is ClickOnce setup.exe obtaining the application's URL when the app is published to a website?

us flag
Tim

The following error occurs after the user has clicked on the RUN button on publish.htm in order to install prerequisites; that user action launches setup.exe and after setup.exe has installed the prerequisites it attempts to launch the application.

Launching Application. URLDownloadToCacheFile failed with HRESULT '-2146697211' Error: An error occurred trying to download 'https://MYDEVPC/apps/Test/TestApp.application'.

Where exactly is setup.exe finding the application's URL and can that value be edited? The URL it has is from my development PC not from the production server, because I've followed these steps:

  1. Build the application on a development PC
  2. Sign the ClickOnce manifest and sign the assembly
  3. Publish application to a local IIS server on the development PC.
  4. Zip the published folder up and copy it to folder on the IIS production server and extract it.

If that scenario is not possible, how does a desktop application that is developed remotely, off-site, get published to a customer's intranet IIS server using VisualStudio and ClickOnce?

NOTE: A further issue, setup.exe attempts to launch the application after installing prerequisites but if you're passing parameters to the application on the query string as follows in publish.htm:

    <A HREF="TestApp.application?param1=foo&param2=bar">launch</A>

the application is launched by setup.exe without those parameters.

Is it possible to make setup.exe do nothing more than install prerequisites while also preserving the ability to pass parameters to the application on the query string?

P.S. There's no problem launching the application with query-string parameters from publish.htm when prerequisites are present on the user's machine. Clicking on the launch HREF opens TestApp.application and the parameters are successfully passed.

in flag
If you take a look in your project file with a text editor, do you see that URL in there somewhere?
us flag
Tim
It is in the **InstallUrl**value. I can try to put the production server's URL and see what happens.
us flag
Tim
OK, the answer was simple enough -- just make the production server the installation folder! And I can test for missing parameters inside the program itself. But where setup.exe is getting it (or keeping it) is still a mystery. But the (remote) developer would need to know the installation folder URL, and that would require coordination with the customer. Unless there's some way to edit that value post-publish.
in flag
When Setup.exe is generated, the publish path gets included along with bootstrap data, it is then signed. (at least that is the simplified explanation)
us flag
Tim
So it would be impossible to edit afterwards, right? The signature prevents "tampering"?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.