Thursday, September 16, 2010

Clickonce deployment exception, System.ArgumentException - Value does not fall within the expected range. - Source: System.Deployment

Clickonce is one new features in .net framework 2.0 which make app deployment easy. Just right click you project, select the files and version. the framework will take care the auto updating and initial one-demand setup.

at one day, I get some problem like this.
  t4

or some user might get different error like this

RROR SUMMARY
    Below is a summary of the errors, details of these errors are listed later in the log.
    * Activation of http://appserver/app/Client/xxxx.application resulted in exception. Following failure messages were detected:
        + Value does not fall within the expected range.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
    No transaction error was detected.

WARNINGS
    There were no warnings during this operation.

OPERATION PROGRESS STATUS
    * [9/16/2010 8:51:30 AM] : Activation of http://appserver/app/Client/xxxx.application has started.
    * [9/16/2010 8:51:30 AM] : Processing of deployment manifest has successfully completed.

ERROR DETAILS
    Following errors were detected during this operation.
    * [9/16/2010 8:51:30 AM] System.ArgumentException
        - Value does not fall within the expected range.
        - Source: System.Deployment
        - Stack trace:
            at System.Deployment.Application.NativeMethods.CorLaunchApplication(UInt32 hostType, String applicationFullName, Int32 manifestPathsCount, String[] manifestPaths, Int32 activationDataCount, String[] activationData, PROCESS_INFORMATION processInformation)
            at System.Deployment.Application.ComponentStore.ActivateApplication(DefinitionAppId appId, String activationParameter, Boolean useActivationParameter)
            at System.Deployment.Application.SubscriptionStore.ActivateApplication(DefinitionAppId appId, String activationParameter, Boolean useActivationParameter)
            at System.Deployment.Application.ApplicationActivator.Activate(DefinitionAppId appId, AssemblyManifest appManifest, String activationParameter, Boolean useActivationParameter)
            at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
            at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)

COMPONENT STORE TRANSACTION DETAILS
    * Transaction at [9/16/2010 8:51:30 AM]
        + System.Deployment.Internal.Isolation.StoreOperationSetDeploymentMetadata
            - Status: Set
            - HRESULT: 0x0
        + System.Deployment.Internal.Isolation.StoreTransactionOperationType (27)
            - HRESULT: 0x0

When I run the cordbg and attach to the dfsvc.exe . the stack trace tells somthing different.  no signature
image

all these errors are caused by one fact that the filed downloaded by click once are “Broken”, either file is deleted or the signature is incorrect.( for example, you download the file from http://servera/, then next time same file is downloaded from the loadbalancer. http://loadbalancer/ or http://virtualIP/

Fix is easy. Go to the default once click app file location.
windows 7 will be C:\Users\[userid]\AppData\Local\Apps\2.0
xp or 2003 C:\Documents and Settings\[userid]\Local Settings\Apps\2.0

delete all those folders in that path.

try to install and run the app again, the issue will disappear.  It looks like the pre-determined state of click once is broken.

2 comments:

Alex Van den Bosch said...

Hi I have received the exact same error as described above, and have followed your suggestion but still get the same error


ERROR DETAILS
Following errors were detected during this operation.
* [2010/10/17 20:03:46] System.ArgumentException
- Value does not fall within the expected range.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.NativeMethods.CorLaunchApplication(UInt32 hostType, String applicationFullName, Int32 manifestPathsCount, String[] manifestPaths, Int32 activationDataCount, String[] activationData, PROCESS_INFORMATION processInformation)
at System.Deployment.Application.ComponentStore.ActivateApplication(DefinitionAppId appId, String activationParameter, Boolean useActivationParameter)
at System.Deployment.Application.SubscriptionStore.ActivateApplication(DefinitionAppId appId, String activationParameter, Boolean useActivationParameter)
at System.Deployment.Application.ApplicationActivator.Activate(DefinitionAppId appId, AssemblyManifest appManifest, String activationParameter, Boolean useActivationParameter)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)

Any other suggestions

androidyou said...

Hi Alex.

Could you also try uninstall all previous Version of the App you are installing if it exists. also those components been used by your app.


if it is caused by file inconsistency. you may install the process monitor to caputre the file io

 
Locations of visitors to this page