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:
- Build the application on a development PC
- Sign the ClickOnce manifest and sign the assembly
- Publish application to a local IIS server on the development PC.
- 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¶m2=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.