Philip Wallace
Philip Wallace

Reputation: 8025

How do I diagnose "Microsoft .NET ClickOnce Launch Utility has stopped working"?

We deploy our application using ClickOnce, installed from a file path. For 24 versions it has been working perfectly - now, on version 25 I get the following error once the application has installed and it launches:

alt text

If I test a previous deployment on the same machine, it works.

Where can I even begin to look to find the cause of this error? I already checked the windows event logs - nothing.

EDIT: I noticed that while the dialog is displayed, a temporary xml file 'WER561D.tmp.WERInternalMetadata.xml' is generated in my temp folder. Here is the contents (it might contain clues helpful to those more knowledgeable in this area than I):

<?xml version="1.0" encoding="UTF-16"?>
<WERReportMetadata>
    <OSVersionInformation>
        <WindowsNTVersion>6.1</WindowsNTVersion>
        <Build>7600 </Build>
        <Product>(0x4): Windows 7 Enterprise</Product>
        <Edition>Enterprise</Edition>
        <BuildString>7600.16385.x86fre.win7_rtm.090713-1255</BuildString>
        <Revision>1</Revision>
        <Flavor>Multiprocessor Free</Flavor>
        <Architecture>X86</Architecture>
        <LCID>1033</LCID>
    </OSVersionInformation>
    <ProblemSignatures>
        <EventType>CLR20r3</EventType>
        <Parameter0>applaunch.exe</Parameter0>
        <Parameter1>2.0.50727.4927</Parameter1>
        <Parameter2>4a275abe</Parameter2>
        <Parameter3>mscorlib</Parameter3>
        <Parameter4>2.0.0.0</Parameter4>
        <Parameter5>4a275af7</Parameter5>
        <Parameter6>4f3</Parameter6>
        <Parameter7>0</Parameter7>
        <Parameter8>System.Security.Security</Parameter8>
    </ProblemSignatures>
    <DynamicSignatures>
        <Parameter1>6.1.7600.2.0.0.256.4</Parameter1>
        <Parameter2>1033</Parameter2>
    </DynamicSignatures>
    <SystemInformation>
      -- removed for privacy reasons --
    </SystemInformation>
</WERReportMetadata>

Another key point is that I am publishing via Visual Studio, there is no manual manifest editing going on.

Upvotes: 8

Views: 17440

Answers (6)

Marcel Gosselin
Marcel Gosselin

Reputation: 4716

You can look at the Troubleshoot ClickOnce Deployments section of the ClickOnce documentation

Upvotes: 1

Graham Laight
Graham Laight

Reputation: 4840

We made a small change to our application which, unknown to us, stopped the application from running. After lots of time spent trying to debug ClickOnce issues, I eventually tried to run the application on its own and uncovered the problem.

In this case, the error message was misleading.

Upvotes: -1

RobinDotNet
RobinDotNet

Reputation: 11877

Did you change the application from Full Trust to Partial Trust? That's what it looks like. The Intranet zone is part of the partial-trust security. Look in the Security tab of your project property pages.

Second, in the Application tab of your project property pages of "Icon and manifest" -- what is the value of the manifest field? Is it Create Application Without a Manifest? Try setting it to "Embed manifest with default settings" and see if that helps.

Upvotes: 2

user333724
user333724

Reputation:

ClickOnce is only working properly when the application is TRUSTED APPLICATION (s. Properties->Security) and the manifest does NOT include any higher UAC security requirement like in following manfest file:

<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <assemblyIdentity version="1.0.0.0" name="MaxLine5651v1" type="win32" />
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="requireAdministrator"/>
      </requestedPrivileges>
    </security>
  </trustInfo>
</asmv1:assembly>

When you have a manifest requesting higher privileges, ClickOnce will NOT accept to publish your project.

I am also struggling in this regard. I need an application to access registry, log and firewall settings; and I want it to be online updatable. Unfortunately it does not work with ClickOnce. Any ideas are welcome.

--Gokhan

Upvotes: 1

Philip Wallace
Philip Wallace

Reputation: 8025

I think I have identified the problem, although I don't know how it happened. Comparing current project file with a version that worked showing, amongst other changes, these differences:

from this:

<GenerateManifests>true</GenerateManifests>

to this:

<GenerateManifests>false</GenerateManifests>
<TargetZone>LocalIntranet</TargetZone>
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>

If I remove TargetZone and ApplicationManifest, and set GenerateManifests to false - it works.

Upvotes: 9

Andrew
Andrew

Reputation: 8673

It looks like it is crashing when it goes to check for the new version, since you say it happends after the update

  • have you tried republishing and deleting the existing version, eg ApplicationFiles\App_1_0_0_1..25?
  • have you reported this to MS on the MSDN Forums for C1?
  • what changed in code (new references, etc?)

Hard to say, since Window Error Reporting stuff never seems to give useful information, but I bet you'd have good luck there. I usually do.

Also, and I know this is unlikely, since it references system.security did you change anything, are the perms the same on the network folder for this rev, and did you add any security demands?

Upvotes: 0

Related Questions