Ask a questionAsk a question
 

AnswerClickOnce Exception

  • Wednesday, December 07, 2005 7:21 PMgoogleit Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    We are getting an exception on every build of a ClickOnce deployment.  For example when we go from v1.0.0.1 to v1.0.0.2 via ClickOnce, some of the clients trying to download the ClickOnce Installation get the following error dialog:

    "Cannot start the application. Contact the application vendor for assistance."

    With the corresponding log file:

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

    SOURCES
     Deployment url   : http://webm001.fsafood.net/smartforms/FSASmartForms.application
          Server  : Microsoft-IIS/6.0
          X-Powered-By : ASP.NET

    IDENTITIES
     Deployment Identity  : FSASmartForms.application, Version=1.1.0.15, Culture=neutral, PublicKeyToken=14b17260ee9ee4c3, processorArchitecture=msil

    APPLICATION SUMMARY
     * Installable application.

    ERROR SUMMARY
     Below is a summary of the errors, details of these errors are listed later in the log.
     * Activation of http://webm001.fsafood.net/smartforms/FSASmartForms.application resulted in exception. Following failure messages were detected:
      + Exception occurred during store operation.
      + Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

    COMPONENT STORE TRANSACTION FAILURE SUMMARY
     No transaction error was detected.

    WARNINGS
     There were no warnings during this operation.

    OPERATION PROGRESS STATUS
     * [12/7/2005 10:43:49 AM] : Activation of http://webm001.fsafood.net/smartforms/FSASmartForms.application has started.
     * [12/7/2005 10:43:49 AM] : Processing of deployment manifest has successfully completed.

    ERROR DETAILS
     Following errors were detected during this operation.
     * [12/7/2005 10:43:50 AM] System.Deployment.Application.DeploymentException (ComponentStore)
      - Exception occurred during store operation.
      - Source: System.Deployment
      - Stack trace:
       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)
      --- Inner Exception ---
      System.UnauthorizedAccessException
      - Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
      - Source: System.Deployment
      - Stack trace:
       at System.Deployment.Internal.Isolation.IStore.Transact(IntPtr cOperation, StoreTransactionOperation[] rgOperations, UInt32[] rgDispositions, Int32[] rgResults)
       at System.Deployment.Internal.Isolation.Store.Transact(StoreTransactionOperation[] operations, UInt32[] rgDispositions, Int32[] rgResults)
       at System.Deployment.Application.ComponentStore.SubmitStoreTransaction(StoreTransactionContext storeTxn, SubscriptionState subState)

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

    The only workaround we have found so far is to delete the previous version applicatoin directory and re-install the ClickOnce.

    Any information on a solution would be much appreciated.

    John

Answers

  • Thursday, December 08, 2005 9:55 PMkanthb Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Let me try to give you the best possible support answer here..
    If I look at the log I see 
      System.UnauthorizedAccessException
      - Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) in System.Deployment.Internal.Isolation.StoreOperationSetDeploymentMetadata

    that means the ClickOnce deployment framework is not able to either write to file system / registry. Make sure the user has read/write access to

    File System : %system drive%\DOCUME~1\<user name>\LOCALS~1\Apps\2.0
    Registry      : HKEY_CURRENT_USER\Software\Classes\Software\Microsoft\Windows\CurrentVersion.

    I also see that you mentioned that it works some times for the same clients.

    One possible reason could be : An Anti Virus software running might be and holding the lock on the same file system location where clikconce is also trying to write. You can disable it and try to update, in case of a failure.

    Another thing you can try is to clean up the ClickOnce store using the supported tools.. Open the Visual Studio Command prompt and run mage -cc.
    This will clean all the online apps and any orphaned  applications from the store. This most likely guarantees that everything is strating from a clean state.
    This suggestion is not particularly relevant in your case.. but just another possible clean up measure in situations where store failures are recurring.

    You mentioned
    "
    The only workaround we have found so far is to delete the previous version applicatoin directory and re-install the ClickOnce.
    "
    But how are you deleting previos version of the app ?
    re-install the ClickOnce ? are you uninstalling and re-installing .Net redist ?

    In Theory, uninstalling and re-installing .Net redist  should not make any difference in your case. Also deteleting any version of the any app  manually from the store is not adviced..

    Just as a caution make sure the previous version of the app is not running while update is happening. Also Make sure the version of the application (manifest) is increased in every update

    -Sreekanth




All Replies

  • Thursday, December 08, 2005 9:55 PMkanthb Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Let me try to give you the best possible support answer here..
    If I look at the log I see 
      System.UnauthorizedAccessException
      - Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) in System.Deployment.Internal.Isolation.StoreOperationSetDeploymentMetadata

    that means the ClickOnce deployment framework is not able to either write to file system / registry. Make sure the user has read/write access to

    File System : %system drive%\DOCUME~1\<user name>\LOCALS~1\Apps\2.0
    Registry      : HKEY_CURRENT_USER\Software\Classes\Software\Microsoft\Windows\CurrentVersion.

    I also see that you mentioned that it works some times for the same clients.

    One possible reason could be : An Anti Virus software running might be and holding the lock on the same file system location where clikconce is also trying to write. You can disable it and try to update, in case of a failure.

    Another thing you can try is to clean up the ClickOnce store using the supported tools.. Open the Visual Studio Command prompt and run mage -cc.
    This will clean all the online apps and any orphaned  applications from the store. This most likely guarantees that everything is strating from a clean state.
    This suggestion is not particularly relevant in your case.. but just another possible clean up measure in situations where store failures are recurring.

    You mentioned
    "
    The only workaround we have found so far is to delete the previous version applicatoin directory and re-install the ClickOnce.
    "
    But how are you deleting previos version of the app ?
    re-install the ClickOnce ? are you uninstalling and re-installing .Net redist ?

    In Theory, uninstalling and re-installing .Net redist  should not make any difference in your case. Also deteleting any version of the any app  manually from the store is not adviced..

    Just as a caution make sure the previous version of the app is not running while update is happening. Also Make sure the version of the application (manifest) is increased in every update

    -Sreekanth




  • Tuesday, December 13, 2005 7:52 PMgoogleit Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Thanks Sreekanth.
    Fixed our problem.  Here was our situation.
    We late bind DLL's in our application (pulled from a db).  Turns out some of the DLL's were read-only.  This was causing our ClickOnce Exception.  We now ensure our DLL's aren't readonly and ClickOnce works great.

    Thanks for your response.

    John

  • Thursday, September 14, 2006 7:07 AMRathna Kumar Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    One of the solutions we found for this error is to delete the contents of the folder
    "C:\Documents and Settings\User\Local Settings\Apps\2.0".
    I am not sure that we can search and delete an individual file which will eliminate this problem.

    By deleting this folder we can install the application else we need to create a new user account on the PC and install the application.

    If anyone can suggest a better solution please update us.

    -Ratan
  • Saturday, October 20, 2007 10:20 PMMichal Rovnanik Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hi Rathna, thanks for your post. It helped me out of my three-day-suffering with deploying my application. Have a great day and thanks again.

  • Thursday, October 08, 2009 8:41 AMlouis siaw Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Fixed almost all my problems by installing dotNet 3.5.
  • Thursday, October 08, 2009 4:15 PMRobinDotNetMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Many problems can be fixed simply by upgrading to the most recent version of the .NET Framework. You might also install SP-1 for .NET 3.5 if you didn't install .NET 3.5 SP-1.

    In case you didn't realize it, the post you responded to is 3 years old...

    RobinDotNet
    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev