Share via


Cannot continue. The application is improperly formatted...

Question

Friday, May 9, 2008 3:55 PM

I am working with a ClickOnce application that is deployed on an intranet to around 750 remote users.  Just under 1% of the users (5 or 6) are receiving the following error when they click to start the application:

 

Cannot continue. The application is improperly formatted. Contact the application publisher for assistance.

 

I realize that this typically indicates either an invalid or corrupt manifest, but if that was the case I wouldn't expect that greater than 99% of the users have no issues.  Also, in an attempt to resolve the problem the application was redeployed with a new published version number to force a refresh of the application files; this did not resolve the issue for any of the affected users.

 

To me, even though the machines are all from the same image, this seems like it must be a client specific issue.  Given that the machines are remote, what steps can I take to troubleshoot this and what specific client settings would affect a ClickOnce deployed application?  Any suggestions are appreciated.

All replies (8)

Tuesday, May 13, 2008 4:31 PM âś…Answered

 

This is the root of your problem: >>The system cannot find the file specified

 

For some reason, that user on that machine can not get to the manifest file. Just for grins, create a different profile for him on the same machine, have him log into it and try it.

 

When you have that user try it on different machines, did he just run it under someone else's profile, or did you set up an account for him and have him log in under his own account and try it?'

 

It sounds to me like that one user does not have permissions to access the application file. That's my best guess.

 

RobinS.

GoldMail.com


Friday, May 9, 2008 6:58 PM

If those users deinstall and reinstall the application, does it work then?

 

RobinS.

GoldMail.com

 


Monday, May 12, 2008 6:24 PM

Thanks for the suggestion.  The deployment for this ClickOnce application is configured as "The application is available online only".  Since it is configured in this way the application does not show up within Add Remove Programs.  Given that, how can an end user uninstall the application?  Any guidance on this would be appreciated.


Monday, May 12, 2008 8:48 PM

As a follow-up to my prior post, since this application is being deployed as online only it is considered cached and therefore can't technically be uninstalled.  Using the .Net SDK command "mage -cc" will apparently clear the application cache which would approximate an uninstall, but since my users don't have the .Net SDK installed and are remote using mage isn't a good option.

 

I came across a blog (http://blogs.msdn.com/karstenj/archive/2006/08/09/693488.aspx) that explains the following command can be used in lieu of "mage cc"

 

rundll32 %windir%\system32\dfshim.dll CleanOnlineAppCache

 

I will be giving this a try on one of the affected users machine to see if after running the CleanOnlineAppCache command the application will run properly.


Tuesday, May 13, 2008 1:01 PM

Performing the CleanOnlineAppCache had no affect with this error; additionally, the "C:\Documents and Settings\username>\Local Settings\Apps\2.0" folder was manually cleaned out, this also had no affect on the error. 

 

The users experiencing the error are able to successfully use the ClickOnce application from a different machine and conversely other users can log onto the affected users machines and successfully use the ClickOnce application.  Following are the details of the error:

 

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://server_name/DPv2_Prod/DP_Client.application

 

ERROR SUMMARY
 Below is a summary of the errors, details of these errors are listed later in the log.
 * Activation of http://server_name/DPv2_Prod/DP_Client.application resulted in exception. Following failure messages were detected:
  + Exception reading manifest from http://server_name/DPv2_Prod/DP_Client.application: the manifest may not be valid or the file could not be opened.
  + Manifest XML signature is not valid.
  + The system cannot find the file specified.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
 No transaction error was detected.

 

WARNINGS
 There were no warnings during this operation.

 

OPERATION PROGRESS STATUS
 * [5/12/2008 6:03:22 PM] : Activation of http://server_name/DPv2_Prod/DP_Client.application has started.

 

ERROR DETAILS
 Following errors were detected during this operation.
 * [5/12/2008 6:03:36 PM] System.Deployment.Application.InvalidDeploymentException (ManifestParse)
  - Exception reading manifest from http://server_name/DPv2_Prod/DP_Client.application: the manifest may not be valid or the file could not be opened.
  - Source: System.Deployment
  - Stack trace:
   at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
   at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirectBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
   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.Deployment.Application.InvalidDeploymentException (SignatureValidation)
  - Manifest XML signature is not valid.
  - Source: System.Deployment
  - Stack trace:
   at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSignature(Stream s)
   at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)

   Inner Exception
  System.Security.Cryptography.CryptographicException
  - The system cannot find the file specified.

  - Source: System.Deployment
  - Stack trace:
   at System.Deployment.Internal.CodeSigning.SignedCmiManifest.VerifyPublicKeyToken()
   at System.Deployment.Internal.CodeSigning.SignedCmiManifest.Verify(CmiManifestVerifyFlags verifyFlags)
   at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSignature(Stream s)

 

COMPONENT STORE TRANSACTION DETAILS
 No transaction information is available.

 

 


Tuesday, May 13, 2008 4:44 PM

 Fred Mumble wrote:

Thanks for the suggestion.  The deployment for this ClickOnce application is configured as "The application is available online only".  Since it is configured in this way the application does not show up within Add Remove Programs.  Given that, how can an end user uninstall the application?  Any guidance on this would be appreciated.

 

You're right. I think the whole "online only" thing is odd, considering it installs the app anyway. The mage thing seems to have worked. You could also just delete the shortcut, and go into the folder where the deployments are and delete it yourself. You'll have to be careful, though, and only delete your own assemblies, unless the user hasn't run anybody else's ClickOnce applications.

 

Why use online-only?

 

Thanks,

RobinS.

GoldMail.com


Tuesday, August 2, 2011 2:22 PM

^^^^^^^^^^^^^^^^^^

 

 

Worked great! Thanks! Visit my username if you want to make some money on the side free.


Tuesday, August 28, 2012 3:55 PM

Awesome....

rundll32 %windir%\system32\dfshim.dll CleanOnlineAppCache

This worked for me.