Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > ClickOnce Post Deployment failure
 

ClickOnce Post Deployment failure

There are a number of computers in a remote location that frequentlyhave to re-install any clickonce applications. The users in question have local profiles and I am unable to identify anything unique about them other than their physical location.

Symptoms:
User logs into computer and the icons for the click once applications are missing (Default Application icon instead)
When user click icon, the click once application is installed (not updated)
In the users Local Settings/Apps/2.0 folder there is a new randomly named folder for each time they have had to reinstall the applications
This does not happen everytime and they can receive updates without issue between failures.

These users are connected using a VPN to the main office. (We have other locations connecting via VPN without any issues)
We have set up a clickonce deployment server in their lab and pointed all their ClickOnce Applications to the local server without fixing the issue (though theinstall time has been greatly reduced.)

Any help that can be provided would be greatly appreciated.
Adrient  Monday, April 06, 2009 11:18 PM
Can you have all of them uninstall the application, then delete the \apps\2.0 folder (assuming there are no other clickonce apps installed), then reinstall, pointing at the local server? The version on the local server -- are you publishing updates to that server?

When you say the icons for the clickonce apps are missing, are you talking about in the start menu?

RobinS.
GoldMail.com
Check out my blog at http://robindotnet.wordpress.com
RobinDotNet  Monday, April 06, 2009 11:21 PM

When I say the icons are missing, they are missing from the start menu and any desktop shortcut. The update routine does not recognize that the application has been installed previously and so does an initial install instead of an update.

All updates are being pushed to their local server using file replication services now with a local DNS alias as the Install directory and Update Directory (it is configured that way throughout the company yet only 1 location is having difficulties.

I will have a user uninstall all the clickonce programs, then delete the apps\2.0 folder then install the apps from the local server. It may take a bit to see if that works as this problem does not follow a predictable pattern that I have seen.

I am open to other suggestions in the mean time.

Adrient  Tuesday, April 07, 2009 2:42 PM
I've seen this before. We had this problem once. It happened to us when the user was installing from IE and it was not in protected mode. It did not have enough privileges, and didn't seem to recognize the user's profile, or give access to the click once folders already there. So it added a new folder and put the files there, and the shortcuts had no icons. Same thing you're seeing.

We were actually trying to run an msi that would run a custom action to invoke the application file and install the application, so we could put the msi on a download site that did not support ClickOnce. But it would never open IE in protected mode, and it exhibited this problem, so we abandoned the effort.

So my guess is this has something to do with privileges from running across VPN. It doesn't recognize the user as the 'owner' of the click once application.

RobinS.
GoldMail.com
Check out my blog at http://robindotnet.wordpress.com
RobinDotNet  Tuesday, April 07, 2009 9:24 PM
We are surrently in the middle of testing a deployment senerio that removes the VPN from the equation. We have set up a clickonce deployment server local the the effected users. They have orders to let me know if their clickonce applications fail again. Hopefully this will solve the issue.

(This is Adrient I logged in from the wrong account)
  • Unmarked As Answer byAdrient Monday, April 13, 2009 2:06 PM
  • Marked As Answer byAdrient Monday, April 13, 2009 2:03 PM
  • Edited byAdrien_t Wednesday, April 22, 2009 2:56 PMClarification
  •  
Adrien_t  Wednesday, April 08, 2009 5:35 PM
This morning I got the phone call. Theicons had reverted to the default application icon and the application installed fresh when the user tried to open the application. The applications were installed from the localdeployment server after a complete uninstall and reboot (so NO VPN). I am open to additional ideas or steps to fix this issue as it is getting to be very annoying to me and has been very annoying to the users.
Adrient  Monday, April 13, 2009 2:08 PM

Adrient,

Do the users have administrative accounts?

If you set up a new account on the same machine and have them try it, does THAT work?

This sounds like some kind of permission problem; it's definitely weird.

Have you tried doing "mage -cc" in a command level to clear out the cache of click once apps?

RobinS.
GoldMail.com


Check out my blog at http://robindotnet.wordpress.com
RobinDotNet  Monday, April 13, 2009 5:27 PM
The users are using administrative accounts and the problem affects multiple accounts on the same computers (Same issue no matter who is signed onto any of the affected computers) The accounts are all domain accounts and other users outside of that location are not experiencing any issues. I have not done a "mage -cc" I have completely deleated the /Apps/2.0/ directory and rebooted the pc without resolving the issue.
Adrient  Monday, April 13, 2009 5:30 PM
I would try deleting the apps\2.0 folders again (each user has his own) and run the "mage -cc" command.

What version of .Net are you targeting?

RobinS.
GoldMail.com
Check out my blog at http://robindotnet.wordpress.com
RobinDotNet  Monday, April 13, 2009 5:43 PM
Most of the apps are 3.5 framework.A couple are 2.0. The crazy part of this is that the apps install and run fine for a undetermined amount of time (somewhere between a day and 2 weeks) then lose themselves, reinstall, and work fine for a period of time. Crazy.
Adrient  Monday, April 13, 2009 5:45 PM
Adrient,

more q's:

Are the apps online, or online&offline?
How many apps are there?
Is it one or more specific apps always having the problem, or is it completely random and all of them at one time or another, or do all of them go buggy at once?
If it is specific ones, do they have anything in common, like .Net framework version?
Are you deploying the .Net 3.5 Framework as a prerequisite?
Have you installed SP-1 for .Net 3.5?
What does the application do, if that's not confidential?
Are the apps deployed with http or ftp or via a file share?

RobinS.
GoldMail.com

Check out my blog at http://robindotnet.wordpress.com
RobinDotNet  Monday, April 13, 2009 9:07 PM

More A's:

The apps are all ofline (Install to local machine)
There are up to 12 available with users running various combinations of them.
All the applications fail at once. The Clickonce Cache appears to get ignored and all the applications install to the newest cache directory.
The 3.5 SP1 is Prerequisite for the 3.5 Apps, 2.0 for the 2.0 apps
The applications are all deployed via http
The applications each do different tasks:
1 - Address book

2- Import data from remote database

3- Input data into a database ( a couple of different apps do this in different ways)

etc.

They all do contact the same local database that other Installed applications access without issue.

My primary suspect resides in the area of the Clickonce Cache files. I am trying to discover how those directories are named and how a clickonce application knows what the name of their cache directory is. Surprisingly this is not readily available information.

Adrient  Monday, April 13, 2009 9:15 PM


Ok, this is good. Do any of the applications, and I mean *ANY* of them have the same assembly names, i.e. the exe file? ANY of them?

Are you creating desktop shortcuts, if so, how, and is that what the users are using to run the app, or are you not creating desktop shortcuts and they are using the start menu?

RobinS.
GoldMail.com


Check out my blog at http://robindotnet.wordpress.com
RobinDotNet  Monday, April 13, 2009 10:07 PM
Most, if not all, of the applications are using a common class library we created in house ELI_Data.DLL which provides information to the applications based on the user's IP address (so we know which database/webserver/etc is local to the user)

Desktop shortcuts are only being created programatically in the 3.5 framework by selecting the option of creating a desktop icon in the deployment constructon (Visual Studios). The applications were all deployed via Visual Studios.

In this troubled location there is a program called Diskeeper that is running a realtime defrag in the background that no other location is using. I have disabled it on a couple troubled computer to see if it has any effect.
Adrient  Monday, April 13, 2009 10:12 PM
a-HA!(was a musical group from the 80's. And now on with our show...)

That dll is used by several of the applications?
Do they all use the same version?
Is the code for it included in every project, or are you including the dll itself?
Is the dll created in its own project?
Are you strongly naming it and signing it?

ClickOnce will cache dll's that it thinks are the same, but really only recognizes them if they are strongly named/signed. If you deploy the same dll with several apps, whether it be DirectX or one of your own, if it is strongly named/signed, it will put it in a folder, and use the same dll for all of the applications. Maybe not having it signed is causing a problem, because an app will replace it, and another app can't find it, or something like that.

If you look in the apps\2.0\weirdfoldername\weirdfoldername\ you will see a folder for each assembly included in your project. If you're deploying the same dll with multiple apps, and not signing it, maybe it's confusing ClickOnce.

Can you put it in its own solution and build it, and try signing it/strongly naming it, then including it in each of the other apps and see how it works? Or something along those lines?

RobinS.
GoldMail.com
Check out my blog at http://robindotnet.wordpress.com
RobinDotNet  Monday, April 13, 2009 10:33 PM
The DLL is included as a project reference in each of the independant applications, so a version is pushed out with each application.
The DLL is created in it's own project but included in the release of each application.
The DLL is not strongly named.
The different versions of the DLL are compatible (same method signatures)
I don't know ifthe DLLis the issue as it is only this location with the problem, none of my other locations are having any issues.
Adrient  Tuesday, April 14, 2009 2:16 PM
Upon further investigation there is a couple DLL's in use that are strongly named that Clickonce has broken out into their own folders. These are all the same version used across the applications. The DLL we created is not strongly names and each application has a unique copy of it within their executable folder. Clickonce treats each unsigned DLL as a seperate library and each application hasit's unique copy loaded into it's application space. They are not shared between applications.
Adrient  Tuesday, April 14, 2009 8:16 PM
Interesting twist in the story line.

One of the users I am monitoring for this issue had their icons dissappear this morning. A second user's icons had not dissappeared. The second user had roobooted their system last night while the first had not, they had only logged off. In a wonderful stroke of genius, The first user had not re-installed the clickonce programs. The first user rebooted their system and their icons came back and the programs did not have to reinstall.

Does this add any insight to the problem or is it just a wild and crazy coincidence?
Adrient  Friday, April 17, 2009 3:47 PM
Yesterday the icons disappeared again. The users reinstalled the applications before I could check anything. They did not reboot this time.

I apprecite RobinDotNet's help with this issue. Is there someone from Microsoft who can get involved and may have some code knowledge on why this is happening?
Adrient  Wednesday, April 22, 2009 2:52 PM
The creative juices may be flowing a bit better today. I noticed that the affected computers are having issues unloading the profile and specifically before many of the Clickonce resets, the eventlog holds a message about difficulty unloading the classes section which is where the clickonce configuration records reside. I am running UPHClean on one of the PCs to see if there might be more than a coincidental link between the issues.
Adrient  Wednesday, April 22, 2009 5:01 PM


Good find. Please post back and let us know if you're having better success. I've never seen this problem before, except in the cases I mentioned previously.

Good luck.
RobinS.
ClickOnce blog: http://robindotnet.wordpress.com

RobinDotNet  Wednesday, April 22, 2009 9:13 PM
UPHClean has cleared up some of the profile problems while some are still occurring. However, the icons dissappeared again. I am working on tracking down what is keeping the classes portion of the User's registry tied up. Once I get that figured out, I should have a solution to the problem. (The path to the ClickOnce Cache is stored in the classes section of the User Registry when it cannot load properly, it creates a new one, loosing the path to the icon file)
Adrient  Friday, May 01, 2009 10:15 PM

I'm going to see if I can find an answer for you; researching.

RobinDotNet


Click here to visit my ClickOnce blog!
RobinDotNet  Sunday, May 03, 2009 12:57 AM

I asked one of the MSFT guys involved with ClickOnce and he said this:

It looks like they have found the root cause which is that the registry portion of the user profile cannot be unloaded during logoff. In the case that registry metadata section of the clickonce store is missing, clickonce will not be able to locate application hence icons. However, the shortcut will stay put and double-clicking it will cause reinstall.

They are still investigating when and why this could happen and if there is a way to avoid it.

When I hear something back, I'll post it here. If you don't hear anything for a couple of weeks, post a reply of "Bump" so it comes across my e-mail, and I'll ping them again.

RobinDotNet
Click here to visit my ClickOnce blog!
RobinDotNet  Tuesday, May 05, 2009 8:45 PM
Jumping in a little late.
Could you provide the details of your event log where you are seeing the message around unloading the classes section.
Also what OS are you experiencing this issue on?

Thanks
Saurabh

This posting is provided "AS IS" with no warranties, and confers no rights.
Saurabh Bhatia MSFT  Tuesday, May 12, 2009 8:03 PM
The exact profile error I am still seeing with UPHClean 1.6 running is event ID 1524:

Windows cannot unload your classes registry file - it is still in use by other applications or services. The file will be unloaded when it is no longer in use.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.


The event is logged when the user signs out in the evening and in the morning they get the problem with clickonce. Occasionally I am also getting an error with UPHClean faulting just before this error. Though the problem was occuring before UPHClean was installed. I have still been unable to track down the cause of the profile error.

We are running all Windows XP machines.

Adrient  Tuesday, May 12, 2009 10:08 PM
Robin,

Wondering if you have heard anything back from MSFT. We are still having the problem despite anything we have tried.
Adrient  Friday, May 29, 2009 5:31 PM

I contacted Saurabh, who has chimed in above. I'll ping him and ask him if he has time to check your response and see if he has any other ideas.

RobinDotNet


Click here to visit my ClickOnce blog!
RobinDotNet  Monday, June 08, 2009 1:45 AM

I have this same issue. If I can help with testing or debugging, please let me know. Any news from MSFT?

DaleI  Friday, June 26, 2009 3:10 PM
Unfortunately, No. What is on this thread is everything I have been able to figure out and get from MSFT
Adrient  Friday, June 26, 2009 4:40 PM
This issue continues. 1 User I am looking at right now has had to reinstall the clickonce programs 23 times in the last 3 months. Would post a screenshot of their directory but it won't let me paste into this field.
Adrient  Thursday, July 16, 2009 4:07 PM
Unfortunately its still hard to say what might be causing the core issue. In order to track this better and get more information it would be useful if you could create a bug for this at the connect site: http://connect.microsoft.com/

This will also allow you to add attachments and provide detailed repro steps etc.

Please let me know if you have any questions on how to do this.
Thanks
Saurabh

This posting is provided "AS IS" with no warranties, and confers no rights.
Saurabh Bhatia MSFT  Tuesday, July 21, 2009 5:30 PM

You can use google to search for other answers

Custom Search

More Threads

• How to start the application when a Checkbox is ticked?
• SDK - CertMgr.exe
• Custom action needs to know if upgrade or new install
• HOWTO : Partial Click Once Deployment
• Bug in "Detected Dependancies" does not update when you switch solution configurations
• Running Clickonce app from task scheduler and settings
• put the msi file in a different folder
• Setup and Deplyment Project, Installer class related questions
• configuring deployment project
• Class installer problem on x64 computers