Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > ClickOnce error occurs when upgrading installed ClickOnce app
 

ClickOnce error occurs when upgrading installed ClickOnce app

I have a clickonce deployment package that will install fine, but after upgrading 2 or 3 times successfully, it will then fail to upgrade. The package could be exactly the same and the only difference is the version number of the manifest files that are generated.

To generate the manifests, I use mage.exe. Here is the error that I get (the error summary is bolded):

PLATFORM VERSION INFO
Windows : 5.1.2600.131072 (Win32NT)
Common Language Runtime : 2.0.50727.832
System.Deployment.dll : 2.0.50727.832 (QFE.050727-8300)
mscorwks.dll : 2.0.50727.832 (QFE.050727-8300)
dfdll.dll : 2.0.50727.42 (RTM.050727-4200)
dfshim.dll : 2.0.50727.42 (RTM.050727-4200)

SOURCES
Deployment url:
http://localhost/NovaPACS2/deploy/PacsViewer/PacsViewer.application
Server: Microsoft-IIS/5.1
X-Powered-By: ASP.NET

IDENTITIES
Deployment Identity: PacsViewer.app, Version=1.0.0.9, Culture=neutral, PublicKeyToken=29c68577548d5d00, processorArchitecture=msil

APPLICATION SUMMARY
* Online only application.
* Trust url parameter is set.
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of
http://localhost/NovaPACS2/deploy/PacsViewer/PacsViewer.application resulted in exception. Following failure messages were detected:
+ A device attached to the system is not functioning. (Exception from HRESULT: 0x8007001F)

COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.

WARNINGS
There were no warnings during this operation.

OPERATION PROGRESS STATUS
* [12/20/2007 10:00:43 AM] : Activation of
http://localhost/NovaPACS2/deploy/PacsViewer/PacsViewer.application has started.
* [12/20/2007 10:00:43 AM] : Processing of deployment manifest has successfully completed.

ERROR DETAILS
Following errors were detected during this operation.
* [12/20/2007 10:00:43 AM] System.Runtime.InteropServices.COMException
- A device attached to the system is not functioning. (Exception from HRESULT: 0x8007001F)
- Source: System.Deployment
- Stack trace:
at System.Deployment.Internal.Isolation.IStateManager.Scavenge(UInt32 Flags, UInt32& Disposition)
at System.Deployment.Application.ComponentStore.SubmitStoreTransaction(StoreTransactionContext storeTxn, SubscriptionState subState)
at System.Deployment.Application.ComponentStore.SetPendingDeployment(SubscriptionState subState, DefinitionIdentity deployId, DateTime checkTime)
at System.Deployment.Application.SubscriptionStore.SetLastCheckTimeToNow(SubscriptionState subState)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)

COMPONENT STORE TRANSACTION DETAILS
* Transaction at [12/20/2007 10:00:43 AM]
+ System.Deployment.Internal.Isolation.StoreOperationSetDeploymentMetadata
- Status: Set
- HRESULT: 0x0
+ System.Deployment.Internal.Isolation.StoreTransactionOperationType (27)
- HRESULT: 0x0

The problem can be fixed by deleting the user's 'Apps' directory where the clickonce data is stored, but once we begin using this deployment method at customer's sites, this will not be an acceptable process. I am wondering if anyone knows what may be causing this and how to fix it. I would be happy to postsample manifest files.

I forgot to mention that the application is 'not-installed', so the user has to go to the url everytime to launch the app.

Thanks,

jared

j_r3d  Thursday, December 20, 2007 5:06 PM

Apparently, our application was creating folders that were read only in the data directory (error also occurs if the folders/files are created in the app directory of the click-once app and are set to read only). The Click Once managementprocess that manages upgrades was unable to delete these folders because they were programatically marked as read-only.

(If you look at any file/folder in the data/app directory for the click once app, they will all appear to be read-only, but I think it is just inheriting that from a parent folder.)

To fix this problem, we changed our app to stop marking folders as read only when creating them.

Also, to clarify, this issue occured everytime on the 2 upgrade of the app because that is the first time the Click-Once management process will attempt to delete one of the old installs of the app.

j_r3d  Thursday, January 03, 2008 6:49 PM

Apparently, our application was creating folders that were read only in the data directory (error also occurs if the folders/files are created in the app directory of the click-once app and are set to read only). The Click Once managementprocess that manages upgrades was unable to delete these folders because they were programatically marked as read-only.

(If you look at any file/folder in the data/app directory for the click once app, they will all appear to be read-only, but I think it is just inheriting that from a parent folder.)

To fix this problem, we changed our app to stop marking folders as read only when creating them.

Also, to clarify, this issue occured everytime on the 2 upgrade of the app because that is the first time the Click-Once management process will attempt to delete one of the old installs of the app.

j_r3d  Thursday, January 03, 2008 6:49 PM
Hi J_3rd...

Do you remember how did you change the app to stop marking folders as RO? Was it though programming or options in click once?

Regards
Lukas H.  Thursday, August 13, 2009 3:56 PM

You can use google to search for other answers

Custom Search

More Threads

• Include big size file in Installation set
• How do I sign a CAB file?
• How to show license agreement in clickonce deployment?
• .net 3.51
• Cannot install application offline using Clickonce.
• .Net project Publishing Problem
• InfoPath Form MSI fails to Install
• Boostrapper for Net1.1. application and trust
• ClickOnce, signing manifests, and certification paths
• Manually run a ClickOnce update possible?