I am deploying an WPF application in business environment (AD) using clickonce deployment. The application is develop with Visual Studio 2013 and based on .Net 4.5. The deployment targets Windows 7 machines only. The deployment Server uses IIS 7.5 and runs on Windows Server 2008 R2.
The deployment is configured that the applications checks for updates before the applications starts.
The deployment works at least the most of the time but I recently experiencing random issues on a few machines while installing an application update.
The user receives the following error message:
Application cannot be started. Contact the application publisher.
Cannot start the application. Contact the application vendor for assistance.
this error is document in MSDN, Troubleshooting Specific Errors in ClickOnce Deployments
These are generic error messages that occur when the application
cannot be started, and no other specific reason can be found.
I managed to gather a log file which covers this error:
PLATFORM VERSION INFO
Windows : 6.1.7601.65536 (Win32NT)
Common Language Runtime : 4.0.30319.18444
System.Deployment.dll : 4.0.30319.18408 built by: FX451RTMGREL
clr.dll : 4.0.30319.18444 built by: FX451RTMGDR
dfdll.dll : 4.0.30319.18408 built by: FX451RTMGREL
dfshim.dll : 4.0.41209.0 (Main.041209-0000)
SOURCES
Deployment url: file:///C:/Users/ADUSERNAME/AppData/Roaming/Microsoft/Windows/Start%20Menu/Programs/Supply%20Chain%20Services%20-%20Systems%20and%20Processes/APPLICATIONNAME/APPLICATIONNAME%20Suite.appref-ms%7C
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
Deployment Provider url: http://SERVERNAME:PORT/APPLICATIONNAME.application
Application url: http://SERVERNAME:PORT/Application%20Files/APPLICATIONNAME_1_0_3_9/APPLICATIONNAME.exe.manifest
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
IDENTITIES
Application Identity: APPLICATIONNAME.exe, Version=1.0.3.9, Culture=neutral, PublicKeyToken=XXXXXXXXXXXXXXXX, processorArchitecture=msil, type=win32
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of C:\Users\ADUSERNAME\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Supply Chain Services - Systems and Processes\APPLICATIONNAME\APPLICATIONNAME Suite.appref-ms| 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
* [08/09/2014 09:25:02] : Activation of C:\Users\ADUSERNAME\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Supply Chain Services - Systems and Processes\APPLICATIONNAME\APPLICATIONNAME Suite.appref-ms| has started.
* [08/09/2014 09:25:04] : Performing necessary update check as specified by the deployment.
* [08/09/2014 09:25:07] : Consuming new update.
* [08/09/2014 09:25:09] : Installation of the application has started.
* [08/09/2014 09:25:10] : Processing of application manifest has successfully completed.
* [08/09/2014 09:25:10] : Found compatible runtime version 4.0.30319.
* [08/09/2014 09:25:10] : Request of trust and detection of platform is complete.
* [08/09/2014 09:25:18] : Downloading of subscription dependencies is complete.
* [08/09/2014 09:25:18] : Commit of the downloaded application has started.
ERROR DETAILS
Following errors were detected during this operation.
* [08/09/2014 09:25:22] 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.IStore.Transact(IntPtr cOperation, StoreTransactionOperation[] rgOperations, UInt32[] rgDispositions, Int32[] rgResults)
at System.Deployment.Application.ComponentStore.SubmitStoreTransaction(StoreTransactionContext storeTxn, SubscriptionState subState)
at System.Deployment.Application.ComponentStore.CommitApplication(SubscriptionState subState, CommitApplicationParams commitParams)
at System.Deployment.Application.SubscriptionStore.CommitApplication(SubscriptionState& subState, CommitApplicationParams commitParams)
at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
at System.Deployment.Application.ApplicationActivator.ConsumeUpdatedDeployment(SubscriptionState& subState, ActivationDescription actDesc)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentUpdate(SubscriptionState& subState, String& errorPageUrl)
at System.Deployment.Application.ApplicationActivator.ProcessOrFollowShortcut(String shortcutFile, String& errorPageUrl, TempFile& deployFile)
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 [08/09/2014 09:25:22]
+ System.Deployment.Internal.Isolation.StoreOperationStageComponent
- Status: Installed
- HRESULT: 0x0
- Manifest: ZJHPL38T.V57.application
+ System.Deployment.Internal.Isolation.StoreOperationSetDeploymentMetadata
- Status: Set
- HRESULT: 0x0
+ System.Deployment.Internal.Isolation.StoreOperationStageComponent
- Status: Installed
- HRESULT: 0x0
- Manifest: APPLICATIONNAME.exe.manifest
+ System.Deployment.Internal.Isolation.StoreOperationStageComponentFile
- Status: Installed
- HRESULT: 0x0
- File: APPLICATIONNAME.exe.config
!!! Removed 550 Lines !!!
+ System.Deployment.Internal.Isolation.StoreOperationInstallDeployment
- Status: Installed
- HRESULT: 0x0
- AppId: http://SERVERNAME:PORT/APPLICATIONNAME.application#APPLICATIONNAME.application, Version=1.0.3.9, Culture=neutral, PublicKeyToken=e5b020d18338a5ca, processorArchitecture=msil
+ System.Deployment.Internal.Isolation.StoreOperationSetDeploymentMetadata
- Status: Set
- HRESULT: 0x0
+ System.Deployment.Internal.Isolation.StoreOperationUninstallDeployment
- Status: Uninstalled
- HRESULT: 0x0
- AppId: http://SERVERNAME:PORT/APPLICATIONNAME.application#APPLICATIONNAME.application, Version=1.0.3.3, Culture=neutral, PublicKeyToken=e5b020d18338a5ca, processorArchitecture=msil
+ System.Deployment.Internal.Isolation.StoreOperationSetDeploymentMetadata
- Status: Set
- HRESULT: 0x0
+ System.Deployment.Internal.Isolation.StoreTransactionOperationType (27)
- HRESULT: 0x8007001f
I also activated detailed logging (using this guide) for my test machine but I was not able to reproduce this error or recognize a pattern which causes the error.
The error affects only 5% to 10% percent of the users, uninstall & reinstall is a workaround but not a solution.
In Reply to Hans Passant:
The | is indeed a strange character, I have neither clue where it comes from nor what it stands for in this context. However the deployment url (including the | symbol) is always the same and it works in 90% of the cases. I don’t think that the | symbol is the cause of the problem. However, I will try to find out why the character is there and come back to you afterwards.
Uninstall/Reinstall solves the problem on client side (Same installer!). Therefore we can exclude a corrupted .Net/VS install.
Anti-malware (McAfee) could be a problem I will investigate as soon I manage to reproduce the error on one of my test machines.
The file path is 123 characters long; the file name has 21 characters. File path + file name = 144 characters
...\APPLICATIONNAME\APPLICATIONNAME Suite.appref-ms|
The .NET Framework normally screams bloody murder when it gets a filename like that. The System.IO.Path.CheckInvalidPathChars() method will throw a "Illegal characters in path" exception, the | character is not valid in a file or directory name. But that check isn't performed in the ClickOnce plumbing, it doesn't use the normal file handling code like the FileStream and Path classes.
That bad filename goes straight to the operating system. What happens next is fairly unguessable, but the file system flipping the bird on it like that is certainly not unexpected.
I have no reasonable guess how this got mangled, this just never goes wrong. A wild guess is that you have one machine around that has a corrupted file in the .NET Framework or VS install, given the frequency of this problem. Might be on the desktop of a particular dev. If the same installer produces a good install when it is run again then the problem is client side. Anti-malware is always suspect. The name is long, you could be a bit beyond MAX_PATH (259 chars) and tripping a buffer overflow bug.
Just wild guesses. But that's the problem. Good luck hunting it down.
This is often happen to my click once deployment when the apps is updating or installing
What i did was run the following
rundll32 %windir%\system32\dfshim.dll CleanOnlineAppCache
to clear the wpf cache and run the url again to install
you can give the user a bat file with the command and ask them to run it when they encountered problem installing/updating
I faced the same issue and the solution I followed is to uninstall the AntiVirus software.
Related
EDIT:
After reading an answer in the post provided by #Julian in the comments, I now have an edit to this question. How do I execute rundll32 %windir%\system32\dfshim.dll CleanOnlineAppCache when my application checks for an update and sees that there is an update to download (Don't know if this should be done before or after update downloads)?
ORIGINAL POST:
I'm trying to do post research on a bug that a user experienced.
The application is a wpf application that gets installed on the users computer. Normal use of the application is that they click an icon on their desktop which checks for updates and then downloads the newest version of the application if it exists.
Yesterday I deployed and they installed the application it ran correctly. I did a small superficial text edit and published a new version. They're desktop icon identified that a new version was published and downloaded the new version.
Today I was working on the app and the only major change I did was adding and implementing NLog and NLog.Config to the application using NuGet. I published locally and it worked. When I published to UAT and got them to execute the app from their desktop they got the following error [Pasted Bellow To Keep this more readable]. I asked them to try again and got the same error. Asked them to skip the update and got the same error.
Looking around most people on the internet suggested wiping the install and trying again. So I cleared their desktop icon and the apps folder in AppData/... and tried installing again from the published location. It worked. I did another trivial edit and the application saw the update and installed the newest version.
I don't like not knowing why a bug happens because it will come to bite me again and again. Also in UAT this is not so much an issue since I can wheel my chair over and do an uninstall and reinstall but when this gets deployed I won't have that luxury and if even skipping the update still breaks the application I'll loose a lot of "trust" in the application.
To summarize, was adding NLog to the application what caused the bug and if so how should have I gone about adding NLog to my application? I'll also accept "No, NLog wasn't the issue. Go look elsewhere for the source of the bug."
Bonus: In the future this has happened again but this time to my general user base. What would you do to recover from this? Note: Accessing/Remoting In a users computer is not an option.
PLATFORM VERSION INFO
Windows : 6.1.7601.65536 (Win32NT)
Common Language Runtime : 4.0.30319.42000
System.Deployment.dll : 4.8.3761.0 built by: NET48REL1
clr.dll : 4.8.3928.0 built by: NET48REL1
dfdll.dll : 4.8.3761.0 built by: NET48REL1
dfshim.dll : 4.0.41209.0 (Main.041209-0000)
SOURCES
Deployment url : file:///C:/Users/[path]/Tenant%20Analytics%20Tool%20-%201%20.appref-ms%7C
Deployment Provider url : file://catdtfnp02/Data$/Data_TDT/[another_path]/Tenant%20Tool%20Analytics%20Module.application
Application url : file://catdtfnp02/Data$/Data_TDT/[another_path]/Application%20Files/Tenant%20Tool%20Analytics%20Module_1_0_0_65/Tenant%20Tool%20Analytics%20Module.exe.manifest
IDENTITIES
Application Identity : Tenant Tool Analytics Module.exe, Version=1.0.0.65, Culture=neutral, PublicKeyToken=c48350b63a3c5924, processorArchitecture=x86, type=win32
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of C:\Users\[user name]\Desktop\Tenant Analytics Tool - 1 .appref-ms| 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
* [11/12/2019 3:48:58 PM] : Activation of C:\Users\[user name]\Desktop\Tenant Analytics Tool - 1 .appref-ms| has started.
* [11/12/2019 3:48:58 PM] : Performing necessary update check as specified by the deployment.
* [11/12/2019 3:48:58 PM] : Consuming new update.
* [11/12/2019 3:49:05 PM] : Installation of the application has started.
* [11/12/2019 3:49:05 PM] : Processing of application manifest has successfully completed.
* [11/12/2019 3:49:05 PM] : Found compatible runtime version 4.0.30319.
* [11/12/2019 3:49:05 PM] : Request of trust and detection of platform is complete.
ERROR DETAILS
Following errors were detected during this operation.
* [11/12/2019 3:49:05 PM] System.ArgumentException
- Value does not fall within the expected range.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Internal.Isolation.IStore.LockApplicationPath(UInt32 Flags, IDefinitionAppId ApId, IntPtr& Cookie)
at System.Deployment.Application.ComponentStore.LockApplicationPath(DefinitionAppId definitionAppId)
at System.Deployment.Application.SubscriptionStore.LockApplicationPath(DefinitionAppId definitionAppId)
at System.Deployment.Application.FileDownloader.PatchFiles(SubscriptionState subState)
at System.Deployment.Application.FileDownloader.Download(SubscriptionState subState, X509Certificate2 clientCertificate)
at System.Deployment.Application.DownloadManager.DownloadDependencies(SubscriptionState subState, AssemblyManifest deployManifest, AssemblyManifest appManifest, Uri sourceUriBase, String targetDirectory, String group, IDownloadNotification notification, DownloadOptions options)
at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
at System.Deployment.Application.ApplicationActivator.ConsumeUpdatedDeployment(SubscriptionState& subState, ActivationDescription actDesc)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentUpdate(SubscriptionState& subState, String& errorPageUrl)
at System.Deployment.Application.ApplicationActivator.ProcessOrFollowShortcut(String shortcutFile, String& errorPageUrl, TempFile& deployFile)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl, Uri& deploymentUri)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.
I am trying to publish clickonce wpf application to my website www.angryapps.co with the help of visual studio ftp publish method and it published application correctly at www.angryapps.co/gpacalculator.html" but when I click install the setup shows error "Cannot continue. The application is improperly formatted"
Error Summary
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of http://angryapps.co/GPACalculatorWPF.application resulted in exception. Following failure messages were detected:
+ The Deployment Provider specified in the manifest cannot be reached. Maybe due to network error and/or the deployment provider is not responding correctly.
+ Exception reading manifest from http://redirect.main-hosting.com/error404.php/2?domain=angryapps.co: the manifest may not be valid or the file could not be opened.
+ Parsing and DOM creation of the manifest resulted in error. Following parsing errors were noticed:
-HRESULT: 0x8007001f
Start line: 0
Start column: 0
Host file:
+ A device attached to the system is not functioning. (Exception from HRESULT: 0x8007001F)
This URL http://angryapps.co/GPACalculatorWPF.application is also reachable.
I'm using Worklight 6.2 server edition and I can't deploy a working runtime (of other environments) on my server.
I'm using webpshere liberty profile v8.5.5 and when I deploy the runtime via GUI it says success and on server.xml I can see the new configuration for the app.
However when I go to the worklightconsole I don't see my runtime to upload the app.
On messages.log there is a error regarding JMX connection.
The quoted error is
Failed to obtain JMX connection to access an MBean. There might be a JMX configuration error: No JMX connector is configured
I'm refering this because I've seen some post on SO saying that these issues might be connected. However I have the restConnector-1.0 on my WLP features.
Reference: No runtime on my Worklight 6.2 Console after installing analytics
On messages.log there is some other things that I found interesting, like the correct start of the runtime I've deployed
[11/12/14 5:50:45:177 CST] 00000012 com.worklight.server.bundle.project.JeeProjectActivator I FWLST0002I: ========= Project /HelloWorld started. The project WAR file version is 6.2.0.00.20140922-2259,running on server version 6.2.0.00.20140613-0730. [project HelloWorld]
and two erros while starting my server
[11/12/14 5:50:49:911 CST] 00000012 SystemErr R 24 WorklightPU WARN [Scheduled Executor-thread-1] openjpa.Runtime - An error occurred while registering a ClassTransformer with PersistenceUnitInfo: name 'WorklightPU', root URL [file:/opt/IBM/WebSphere/Liberty/usr/shared/resources/worklight/lib/worklight-jee-library.jar]. The error has been consumed. To see it, set your openjpa.Runtime log level to TRACE. Load-time class transformation will not be available.
Second error:
java.lang.RuntimeException: Timeout while waiting for the management service to start up
I don't know what these are but I think it might be related to my problem and this errors eventually appear when I start my server.
Does anyone have any tips for troubleshooting this issue?
Thanks in advance.
This is a known issue from Websphere.
There is a APAR to fix that, a workaround is to restart the server with the --clean option to force a refresh onto the shared libraries.
http://www-01.ibm.com/support/docview.wss?uid=swg1PI17830
I had an error during an in place upgrade of DNN 7. the error occured during the installation of the new providers from the install/providers folder. SPecifically i think it was during the rad editor provider upgrade.
here is the error:
2013-08-27 17:40:54,149 [WS048][Thread:6][FATAL]
DotNetNuke.Web.Common.Internal.DotNetNukeHttpApplication -
System.Web.HttpUnhandledException (0x80004005): Exception of type
'System.Web.HttpUnhandledException' was thrown. --->
ICSharpCode.SharpZipLib.ZipException: System.ApplicationException:
Unknown block type 7 at
ICSharpCode.SharpZipLib.Zip.Compression.Inflater.Decode() at
ICSharpCode.SharpZipLib.Zip.Compression.Inflater.Inflate(Byte[] buf,
System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
Boolean& completedSynchronously) 2013-08-27 17:42:59,589
[WS048][Thread:6][ERROR]
DotNetNuke.Common.Internal.ServicesRoutingManager - Unable to register
service routes System.Reflection.TargetInvocationException: Exception
has been thrown by the target of an invocation. --->
System.BadImageFormatException: Could not load file or assembly
'Newtonsoft.Json, Version=4.5.0.0, Culture=neutral,
PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The
module was expected to contain an assembly manifest.
Server stack trace: at
System.Net.Http.Formatting.JsonMediaTypeFormatter..ctor() at
System.Net.Http.Formatting.MediaTypeFormatterCollection.CreateDefaultFormatters()
at System.Web.Http.HttpConfiguration..ctor(HttpRouteCollection routes)
at System.Web.Http.GlobalConfiguration.<.cctor>b__0() at
System.Lazy`1.CreateValue()
This makes me think it was a blocked zip file, but I double checked to make sure the zip file was unblocked
Question: Does someone know where this error comes from? Or how can I figure out more specifically where it is comming from
thanks
EDIT #1
So I restored from a backup and tried again, I got the same error but at a different install/provider zip file. I am not sure what is causing this. This error seems to indicate the zip files are corrupted and are not downloaded/uploaded correctly.
EDIT #2
is there a chance that my ftp client is corrupting the zip files during upload? This has been going on for three days with well over a dozen different attempts to upgrade to various versions. I've never had this difficulty with a dnn upgrade ever and I've been using it for years.
It is definitely possible that you're getting corruption issues somewhere.
I would start by downloading the UPGRADE package again, extracting them using 7zip instead of Windows Compression, then try the upload. Maybe try a new FTP client, or see if you can RDP into the machine instead of FTP
I am trying to deploy a WPF Prism application using ClickOnce Deployment. I have followed the following steps (http://msdn.microsoft.com/en-us/library/gg405497(v=pandp.40).aspx)
Publishing an Initial Version of the Shell Application
Updating the Manifests to Include Dynamically Loaded Module Assemblies - I have used Mage to include the dynamically loaded modules.
and then tried to launch and install the application but it runs in to a generic error.
"Application cannot be started. Contact the applicaiton vendor"
I am not running any other applications. I am running in to this error everytime I try to install the application. Please find the details from the log below.
OPERATION PROGRESS STATUS
* [9/19/2011 4:22:20 PM] : Activation of http://localhost/ABCTools/ABCTools.Shell.application has started.
* [9/19/2011 4:22:20 PM] : Processing of deployment manifest has successfully completed.
ERROR DETAILS
Following errors were detected during this operation.
* [9/19/2011 4:22:20 PM] System.Runtime.InteropServices.COMException
- Insufficient system resources exist to complete the requested service. (Exception from HRESULT: 0x800705AA)
- Source: System.Deployment
You should verify whether the installation fails the same on a different computer. The exception you are getting is related to system corruption, possibly even of NGEN (in the .net framework).
http://www.wiki-errors.com/wiki-errors.php?wiki=0x800705AA
http://forums.asp.net/t/1502957.aspx/1