8

我们使用从文件路径安装的 ClickOnce 部署我们的应用程序。对于 24 个版本,它一直运行良好 - 现在,在版本 25 上,一旦应用程序安装并启动,我会收到以下错误:

替代文字

如果我在同一台机器上测试以前的部署,它就可以工作。

我什至可以从哪里开始寻找导致此错误的原因?我已经检查了 Windows 事件日志 - 没有。

编辑:我注意到在显示对话框时,在我的临时文件夹中生成了一个临时 xml 文件“WER561D.tmp.WERInternalMetadata.xml”。这是内容(它可能包含对那些比我更有知识的人有帮助的线索):

<?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>

另一个关键点是我通过 Visual Studio 发布,没有进行手动清单编辑。

4

6 回答 6

9

我想我已经确定了问题所在,尽管我不知道它是如何发生的。将当前项目文件与工作的版本进行比较,除其他更改外,还显示了这些差异:

由此:

<GenerateManifests>true</GenerateManifests>

对此:

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

如果我删除 TargetZone 和 ApplicationManifest,并将 GenerateManifests 设置为 false - 它可以工作。

于 2010-02-10T20:54:16.240 回答
2

您是否将应用程序从完全信任更改为部分信任?这就是它的样子。Intranet 区域是部分信任安全的一部分。查看项目属性页面的安全选项卡。

其次,在“图标和清单”的项目属性页的应用程序选项卡中——清单字段的值是什么?它是在没有清单的情况下创建应用程序吗?尝试将其设置为“使用默认设置嵌入清单”,看看是否有帮助。

于 2010-05-06T05:56:21.710 回答
1

您可以查看ClickOnce 文档的ClickOnce 部署疑难解答部分

于 2010-02-10T16:14:01.797 回答
1

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

于 2010-05-05T18:04:05.133 回答
0

它看起来像是在检查新版本时崩溃了,因为你说它是在更新后发生的

很难说,因为窗口错误报告的东西似乎从来没有提供有用的信息,但我敢打赌你会在那里有好运。我通常会。

另外,我知道这不太可能,因为它引用了 system.security 您是否更改了任何内容,此版本的网络文件夹上的权限是否相同,您是否添加了任何安全要求?

于 2010-02-10T18:46:32.897 回答
-1

我们对我们的应用程序做了一个小改动,但我们不知道,它阻止了应用程序的运行。经过大量时间尝试调试 ClickOnce 问题后,我最终尝试自行运行应用程序并发现了问题。

在这种情况下,错误消息具有误导性。

于 2013-12-13T13:28:04.227 回答