ClickOnce application not showing anything after launching - c#

I have publish ClickOnce application in file network. After installing application and there is created shortcut.
When I launch application nothing happens, there is glimpse of process in task manager and nothing happens.
But some of my other ClickOnce application works fine.
Only that application does nothing.
I have no idea what is happening, no error, nothing. How can I handle this problem?

Click once application gets installed locally in this path -
c:\users\username\AppData\Local\Apps\2.0\obfuscatedfoldername\obfuscatedfoldername
You can go to this path - by typing in run command: %appdata%\..\Local\Apps\2.0
Delete the contents of this folder and re-open the click once to re-install it.
Check if the application gets freshly installed.
Try opening from that location directly.
If the application has logs, check it
If not check the event log for clues.

Related

ClickOnce Application Won't Open

I'm having an issue where if I open the .appref-ms file - it will open the ClickOnce dialog box... Then close. The application won't load - just the ClickOnce popup.
However, if I navigate into Local > Apps > 2.0 ... To the actual .exe file - this opens just fine.
Worth also noting that it is only bugging out like this on some devices. I.e. on my machine, opening the .appref-ms file opens the ClickOnce dialog, does the update (if applicable) and then opens the app just fine. Yet one of our customers called to raise the issue.
I've tried to uninstall and reinstall the application.
I've tried clearing out the stuff in Apps > 2.0 ...
Not really sure how else I can debug this?
Thanks.
The problem is the new update to Windows Defender.
I've had to disable Windows Defender for the time being until there's a patch to this problem.
Other people have already figured out the link between the update and ClickOnce apps.
https://social.msdn.microsoft.com/Forums/en-US/954ad3f0-a718-4443-86fd-49877abd130f/after-a-clickonce-application-update-application-wont-start

ClickOnce application requires network connection to start even with update check disabled

I have a ClickOnce application that:
Is available offline (installed) - Properties->Publish->This application is available offline...
Is told never to check for updates (I do them myself) - Properties->Publish->Updates->Untick The application should check for updates.
I have published the application and it is installed on about 60 of our PCs. I use a batch script to run the .appref-ms file on startup (have also tried this by running the .application too but with the same result).
I have noticed that sometimes on startup the application fails to start (I guess it's beating the network to the punch and starting before we have internet).
I have confirmed this by trying the run the application on a PC with no network and get the same error:
Application download did not succeed. Check your network connection, or contact your system administrator or network service providor.
Looking in the log file this is because ClickOnce is trying to download the .application file from my server rather than running the application locally.
I have double checked the .application and it is missing the subscription element which I believe disabled automatic updates.
Anyone have any ideas what is going on here?
Thanks in advance

ClickOnce windows application will not start

I have created a windows application using c# VS express 2012. The app works great in the VS environment. I have published the application using VS(ClickOnce) to the Desktop as an offline application, which does not check for updates. The app is not signed and security is disabled. The application seems to install fine when I run the setup.exe file. However, when I try to run the program from the start menu nothing happens. In the task manager, a process for the application appears for a few seconds then just goes away. The app window doesn't show and there aren't any indications of an error. If I navigate directly to the .exe of the app (%userprofile%\appdata\local\apps\2.0\%random id%......) and run it that way, it starts up and appears to function as designed. I've done some research and found that certain drivers and software (if installed) will cause this behavior (i.e. Kensington Mouse driver and Provencia software(?)). I've checked and I do not have either of these installed. Any help with this will be much appreciated.
Thanks in advance.

UnauthorizedAccessException when running application from CLRProfiler

I have an application that I am attempting to profile with CLRProfiler, written in .NET 4.0 and WPF running on the .NET Framework 4 Client Profile. The application loads a data file shortly after startup, the location to which is in app.config (so it is not selected interactively when the program is running). When the application is launched from Visual Studio or Windows Explorer, everything works fine.
When launching the application from CLRProfiler, however, the application crashes with an UnauthorizedAccessException attempting to load the file.
Attempting to fix the issue, I gave Full Control permissions to said file to myself, Domain Users, and Everyone yet the issue continues. When monitoring Task Manager, the short-lived process shows up has having been launched under my user ID.
Does anyone know how to resolve this issue with CLRProfiler?
Ultimately, this turned out to be a combination of two problems:
Not running as administrator.
The data file referenced above had a path specified in a configuration file, but the path was relative. When CLRProfiler launched the application, the working directory remained that of the profiler instead of being switched to the application under analysis. Since I was running unprivileged, the failure to open the data file was actually manifested as an UnauthorizedException because the application did not have permissions to root around in the folder where the profiler was installed.
After correcting both of these (the first by running as administrator the second by changing the config file to use an absolute path), the issues disappeared.

drag drop no longer working once application gets installed

I have an application that has drag and drop functionality to import images and video's. While developing, and testing through Visual Studio this has never given any problems.
After installing through a set up project, everything in the application works fine, except the drag and drop, which seems to be doing nothing. Are there any security settings that need to be set through an installer, or something of that nature that could be preventing drag and drop after installation ?
Yes, your drag+drop will not be permitted if your program runs with elevated permissions. It is called User Interface Privilege Isolation, Vista UIPI for short. It is complementary to UAC and controlled by the uiAccess attribute in the manifest entry that you'd use to elevate your process. As well as a certificate and a proper install location.
Realistically: don't elevate your program. It is a security hole when restricted programs can get their objects dropped in your privileged program. UIPI tries to prevent that.
But debug your program first.
Build a debug version of your application, build your installer with the output. You can either include the .pdb files in the installer or copy them to the install location after you install.
Run the installed application, and then in Visual Studio, go to Debug --> Attach to Process. Select the process from the list, and click the "Attach" button. Add breakpoints, etc, and debug as normal.
If you don't run into the problem on your build machine, you can also run a remote debugging session to debug the application on a different computer, but this requires a little more setup.

Categories

Resources