Hi,
I made a small Windows forms app that I published with no problem as a disk install using clickonce.
However when I tried to make that app available as an online only launch, I ran into problems.
Namely I get a 'Cannot download the application. The application is missing required files. Contact applicatio vendor for assistance (sic!)" message.
I notice something strange in the log : the url of the download start is correct (servername/foldername/appname.application) but the one in the error is not (server/appname/appname.application.
Does anyone know if that's the problem and how to resolve it
Thanks,
MM
OPERATION PROGRESS STATUS
* [13/04/2006 5:26:30 PM] : Activation of http://orion/myWebFolder/myApp.application has started.
ERROR DETAILS
Following errors were detected during this operation.
* [13/04/2006 5:27:12 PM] System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
- Downloading http://orion/myApp/myApp.application did not succeed.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
at System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
at System.Deployment.Application.FileDownloader.Download(SubscriptionState subState)
at System.Deployment.Application.DownloadManager.DownloadManifestAsRawFile(Uri& sourceUri, String targetPath, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirect(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
at System.Deployment.Application.DownloadManager.FollowDeploymentProviderUri(SubscriptionStore subStore, AssemblyManifest& deployment, Uri& sourceUri, TempFile& tempFile, IDownloadNotification notification, DownloadOptions options)
at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
--- Inner Exception ---
System.Net.WebException
- The remote server returned an error: (404) Not Found.
- Source: System
- Stack trace:
at System.Net.HttpWebRequest.GetResponse()
at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.

Clickonce online problem : Cannot download the application
Sinu Ramachandran
Sameer,
Thank you for the answer, I actually had tried to modify the deployment provider, but after I do so I still get an error message :
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of http://myServer/myFolder/myApp.application resulted in exception. Following failure messages were detected:
+ Exception reading manifest from http://myServer/myFolder/myApp.application: the manifest may not be valid or the file could not be opened.
+ Manifest XML signature is not valid.
+ The digital signature of the object did not verify.
The truth is I'm completely confused with this. First of all, there are two manifests every time I deploy, one called myApp, the other called myApp_version_number. They look identical (contain the same deployment provider etc..). I tried modifying one or both with the correct deployment provider, but when i do so I get the invalid manifest error, and If I don't do anything, it's attempting to download from an incorrect directory...
Any clue as to what I should do
Regards,
Pramod Yadav
"Cannot Start Application. Cannot download the application. The application is missing required files. Contact application vendor for assistance."
Microsoft are working on cross browser support for ClickOnce - if you're interested read more here.
A patch for Firefox that will enable it to run ClickOnce properly is available here.
Areej
Sameer,
Good to know I can ignore the <appname>_version one. That's one point clarified. Thank you.
For the deployment itself though I had already tried setting the Installation url explicitely to the same path as the deployment one in VS (although on the screen it says to specify this only if different than deployment). Unfortunately it doesn't work.
I point to my local IIS subfolder (Local IIS/Default WebSite/myFolder) which translates into a http://localhost/myFolder in the Installation url field, but once deployement is finished, when I check the manifest the deloyment provider is set to http://myServerName/myApp/myApp.application .
I tried changing localhost to myServername explicitely in the installation Url but it gives the same result. Somehow Clickonce actively changes the installation url from myserver/myfolder/myApp.application to myserver/myApp/myApp.application.
I can't find mage.exe or magegui.exe on my machine, does it come with VS or is it a separate download (found info about what they do on MSDN but no download link). But I'd rather deploy from VS Express anyway.
Any clue as to why VS is changing the install url and how to avoid this problem
Thank you,
MM
AJTessin
Check the deploymentProvider element in the .application file. To location it points to is where ClickOnce is downloading the application from, check to make sure it's correct.
This msdn link (http://msdn2.microsoft.com/en-us/library/ms228996.aspx) has more info on deployment provider.
Regards,
Sameer
Anantha Kancherla
Ignore the <appname>_version.application file, that's created for backup purpose in case you need to do a server side rollback.
ClickOnce manifests must always be signed so in this case if you modify the manifest by hand you need to re-sign it. You can use mage.exe (cmd line) or mageui.exe (gui tool) to sign the deployment manifest after changing it.
But backing up a bit, if you're using Visual Studio to publish the application use the Project -> Properties -> Publish page to change the "Installation URL". If you plan on putting this app on server X make sure the Installation URL points to server X. Once you update and publish again Visual Studio will do the necessary signing, this should just work for you then without any hand editing of manifest.
Regards,
Sameer
Saka69
Found the problem...
In the 'update' options on the publish UI I had specified that the app should check for updates prior to running, and the update url was an incorrect one.
It seems in such a case VS is 'smart' enough to use the update url as a deployment provider instead of the, well, deployment one.
It is strange though that it is possible to specify a deployment url and an update url that are different and yet have the tool ignore one. Maybe when the 'check for updates before app runs' option is selected, the tool should enforce that the deployment and update URLs are the same.
I still have some problems with clickonce but that particular one is solved.
Thanks to the contributors,
MM