Click-once application doesn't start
I've having big problems with Click-Once deployment of my application.
The application appears to install correctly and adds an entry to the start menu, however it won't run: either from the Start menu or from the web page.
The application does seem to work correctly for my colleagues, but not for me (although it used to).
I can't see any event log entries, and the application isn't running in task manager.
How can I see what is going on? I've tried reinstalling .Net 2 framework, but that didn't help :-)
Best regards,
David
Odpovědi
Try running EXE directly from ClickOnce store location and see if that works.
To do this:
- navigate using explorer to clickonce store folder where application is installed.
- It's under a few levels of obfuscated folders so easiest thing is to search for <appname>.exe under "%userprofile%\local settings\Apps".
- Run <appname>.exeNote: Do this as a troubleshooting step only. For regular activation of ClickOnce apps use the start menu shortcut (or url to .application file) so that the right update and security checks are done.
If this direct activation of exe fails then looks like you have a general problem with launching managed apps on the machine not related to ClickOnce. If this is the case the general Windows Forms alias will be a better place to post the issue.
One additional thing to check - do you by any chance have Kensington Mouseworks software installed? We've seen problems with Winforms apps crashing when run on machines with this software installed. The mouse software has a bug that causes winforms app run from location greater than 128 chars in length to crash. This causes ClickOnce apps to crash. We are following up with Kensington Mouseworks to get this fixed.
If this is indeed the problem on your machine you will need to uninstall the Kensington Mouseworks software from Add/Remove Programs. It will prompt for reboot after which the minimal mouse drivers should get reinstalled automatically. Your mouse as well as ClickOnce apps should then work.
After uninstalling this software some extended mouse features and effects may not work but basic mouse functionality will be fine. I would recommend keeping the mouse software CD handy in case Windows is unable to auto-install the drivers from the web. We've seen a couple of people run into this issue and they both are able to use their mouse as well as run ClickOnce apps after uninstalling the software.
Regards,
Sameer- Označen jako odpověďRobinDotNetMVP, Moderátor9. července 2009 9:14
Všechny reakce
Do you see any ClickOnce error dialog? If "yes" what does it say in the log?
If "no" it is possible that app itself is silently crashing on your machine. You can retrieve older log from WinInet Cache, to see whether ClickOnce portion of the launch was succeded.
- I didn't get any error messages. Where is the log file written to?
Today my application is working, so I'm going to have to wait for it to stop working again to debug any further.
Thanks for your help,
David - Log is located in WinInet Cache, "\Documents and Settings\<UserName> \Local Settings\Temporary Internet Files" and starts with prefix "System_Deployment_Log".
- I'm getting the following log, which as you can see shows no errors. My first thought would be to suspect that the application is dying on startup, except that:
a) This problem is affecting all click-once deployments on my machines - even ones that used to work and haven't been updated.
b) The app runs fine locally.
Any help much appreciated!
---log---
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 : file:///C:/Documents%20and%20Settings/David.XXXXX/Desktop/Connect.appref-ms
Server : Microsoft-IIS/6.0
X-Powered-By : ASP.NET
Deployment Provider url : http://www.XXXX/YYYYY.application
ERROR SUMMARY
No errors were detected during this operation.
COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.
WARNINGS
There were no warnings during this operation.
OPERATION PROGRESS STATUS
* [24/02/2006 09:51:27] : Activation of C:\Documents and Settings\David.XXXXX\Desktop\YYY.appref-ms has started.
* [24/02/2006 09:51:27] : Performing necessary update check as specified by the deployment.
* [24/02/2006 09:51:29] : Activation of C:\Documents and Settings\David.XXXXX\Desktop\YYY..appref-ms succeeded.
ERROR DETAILS
No errors were detected during this operation.
COMPONENT STORE TRANSACTION DETAILS
No transaction information is available. - I would suspect either hosting process for semi trust is dying out or something to do with the apps in ClickOnce store location. You can cleanup the store suggested here - http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=160592&SiteID=1
Try running EXE directly from ClickOnce store location and see if that works.
To do this:
- navigate using explorer to clickonce store folder where application is installed.
- It's under a few levels of obfuscated folders so easiest thing is to search for <appname>.exe under "%userprofile%\local settings\Apps".
- Run <appname>.exeNote: Do this as a troubleshooting step only. For regular activation of ClickOnce apps use the start menu shortcut (or url to .application file) so that the right update and security checks are done.
If this direct activation of exe fails then looks like you have a general problem with launching managed apps on the machine not related to ClickOnce. If this is the case the general Windows Forms alias will be a better place to post the issue.
One additional thing to check - do you by any chance have Kensington Mouseworks software installed? We've seen problems with Winforms apps crashing when run on machines with this software installed. The mouse software has a bug that causes winforms app run from location greater than 128 chars in length to crash. This causes ClickOnce apps to crash. We are following up with Kensington Mouseworks to get this fixed.
If this is indeed the problem on your machine you will need to uninstall the Kensington Mouseworks software from Add/Remove Programs. It will prompt for reboot after which the minimal mouse drivers should get reinstalled automatically. Your mouse as well as ClickOnce apps should then work.
After uninstalling this software some extended mouse features and effects may not work but basic mouse functionality will be fine. I would recommend keeping the mouse software CD handy in case Windows is unable to auto-install the drivers from the web. We've seen a couple of people run into this issue and they both are able to use their mouse as well as run ClickOnce apps after uninstalling the software.
Regards,
Sameer- Označen jako odpověďRobinDotNetMVP, Moderátor9. července 2009 9:14
- I've tried uninstalling all click-once applications and then cleaning up with mage -cc as suggested. Unfortunately, no dice :-(
- I do have a Kensington mouse, so I've uninstalled the driver but that didn't work.
I tried running the application directly as you suggested, but it won't start, I think because it can't find the other assemblies the .exe depends on. If I copy all of the dependent assemblies into the same directory it fails to start, but doesn't give an error message so it looks like your paragraph:
"If this direct activation of exe fails then looks like you have a general problem with launching managed apps on the machine not related to ClickOnce. If this is the case the general Windows Forms alias will be a better place to post the issue."
may be the way to go for me.
Many thanks for your help. Easy test to see if the Kensington Software is causing problems is:
- Create a very simple HelloWorld.exe single binary app using VS
- Create a test folder that's longer than 128 chars in length
- Copy this exe to the test folder and try running it from thereThe exe will probably shutdown immediately on its own. If you run the same exe from shorter path it will work. If this is the behavior you're seeing then run exe under debugger and see if kmw_dll.dll is being loaded in the process. If so then Kensington Mouseworks is still present on the machine.
Can you confirm couple of things:
- You uninstalled Kensington Mouseworks from Add/Remove Programs right?
- Did you reboot after uninstall?Can you find kmw_dll.dll on your machine? If so try renaming it and see if that helps fix the problem.
Regards,
Sameer- Interesting - I tried the test you suggested and it looks as though the folder length is the problem.
I don't have Kensington Mouseworks as such - I just have a Kensington mouse driver that Windows Update pulled down for me one day. I removed this from Device Manager, because there isn't an entry for it in Add/Remove Programs. Now I've gone back to look and it looks like the driver got installed again.
I'm going to make sure I delete every single instance of kmw_sys.sys from the hard disk and try again. I'll let you know how I get on.
Many thanks for your help.
-
David - Hi,
Did someone solved this issue?
Im having the same problem and can't solve it
Thanks - It seems that no one is owning up to fixing this problem. It appears that the issue has been around since 2006 as according to the date on this post:
http://blogs.msdn.com/winformsue/archive/2006/05/22/604103.aspx
I just ran into this issue myself and spent the better part of the day ripping my hair out before I finally figured out (on my own) that it was the kensington software.
Personally, I have kensington mouseworks installed and it seems that the kmw_run.exe process was causing the problem. If I kill the kmw_run.exe from the task manager my click once / ado.net application will work just fine.
Someone on either side needs to fix this problem, either on the click-once / .net side or on the kensington side. At the moment it's a developer stalemate....which is pretty sucky if you ask me...especially considering that this issue is going on 2 years now....
grrrrrr...... - I was having a similar problem with my ClickOnce application:
- Working just fine in debug mode from Visual Studio,
- installing into the Start menu from the production URL just fine
- no errors or warnings in the System_Deployement_Log
- No Kensington mouse drivers
Here's how I realized the fix for my particular scenario:- My desktop tower had been running all weekend - I came in and resumed work from Friday
- So, out-of-the-blue today (Monday) I start experiencing some issues with my Vis. Studio, such as:
- Would not compile, even though compiled fine Friday
- Kept getting output messages like, "unable to copy file" or "Unable to write manifest"
- Restarted Visual Studio a time or two w/no luck
- Deleted my main project's MyProject/app.manifest file after reading a blog suggesting Vis. Studio would regenerate it.
- Ended up having to restart my Workstation before finding that Visual Studio would happily compile my project again
- Deployed a new version of my ClickOnce app to the production server
- HERE'S WHERE PROBLEMS START OCCURING - CANNOT LAUNCH APP EVEN THOUGH IT INSTALLED FINE
- Then it finally occurs to me to re-check my solution to find it has not recreated an app.manifest file.
- So, I resurrect my app.manifest file from my subversion repository (and then I go back to Visual Studio, show hidden files, right-click, include in project)
- Re-publish
- Prest-O!, We're back in action
Hope that helps somebody out there.
- Can't someone go into those idiot's mouse driver and increase whatever stupid 128 char buffer they are using to 1024 and be done with it??! I can't believe I can't use my mouse because they crash my debugger?? This is a really stupid bug to have. And two years is just rediculous!!
Does anyone know how to tweak KMW.exe? I would love to try to fix this this conflict. It sucks.
- I recommend you talk to Kensington; it's their mouse drivers. :-)
RobinDotNet
Click here to visit my ClickOnce blog! - Sameer:
We just ran into this issue with our own Setup application (which happened to be launched from a path about 140 characters long); thanks for helping us identify Kensington MouseWorks as the culprit.
nightst4r, giacomodolce:
I've blogged about how I patched the version of kmw_dll.dll I found on my co-worker’s computer at: http://code.logos.com/blog/2009/06/patching_a_crash_in_kensington_mouseworks.html.
Bradley

