views:

28

answers:

2

Tried to create a ClickOnce install. Inside internal network.

It runs once after Setup (automatically). Then when run from menu item it does not run. Closer examination in Task manager reveals its in there as a "process" (not application), but not visible. If you update ("publish") the app again it will run once from the menu shortcut, but not again (displaying the same behavior) in task manager.

Something to do with security most likely. Its in there as a trusted app, no certs. Not sure how to debug this one.

A: 

My only ideas:

  1. If installed for all users, try running under an account with Administrator privileges.
  2. Try installing and running while logged in to an account with Administrator privileges.
  3. Try deploying with a trust certificate as described here.

This will at least allow you to narrow down the likelihood of whether the issue is indeed security related.

Justin Pinkley
Thanks. Running it once from an admin account worked. Then I went back to non-admin account and it started working. You have to love this stuff.
Dean Kaplan
A: 

If it worked once you installed under admin account and then returned to non-admin, I would ask if there is something your application does only once, the first time it runs. For example, my application creates files in a cache folder in LocalApplicationData, but only the first time the user runs the application. If you have something like this, it may require admin privileges, and hence it works the first time, but doesn't cause a problem after that because it has already run once. The only relation your problem has to do with ClickOnce is the fact that that's what you use to deploy it. C/O does not require administrative privileges to install a ClickOnce application. If your app is running and failing, that's a separate problem from it installing or not installing.

RobinDotNet
Thanks for your input. It turned out to be an error I was making in program and that the configuration that was coming up was different then the one in the IDE testing. It was a cross thread blowup that did not produce an easily traceable error. Thanks again. ClickOnce still great.
Dean Kaplan