作为脱机应用程序发布时,ClickOnce清单错误消息

时间:2011-06-16 13:50:31

标签: clickonce

我想通过Windows Forms部署一个ClickOnce项目。我已将其设置为在启动之前检查更新,没有安装的先决条件,也不需要修改安全设置。我将应用程序设置为脱机可用性。

我设置了IIS并发布了该应用程序。这成功了。

我使用ClickOnce将应用程序安装到承载应用程序文件的开发服务器上。这很好用于安装。它提出了关于不验证我点击的发布者信息的安全警告,然后我的应用程序出现了。

我从远程计算机浏览到ClickOnce应用程序的安装程序页面,然后单击“安装”按钮。弹出对话框窗口,显示“验证要求”,然后弹出错误,显示“无法继续此应用程序格式不正确”并提供详细信息(见下文)。当我在服务器本地安装时,我从未收到安全警告。

对我来说,奇怪的是,如果我选择应用程序在线以及离线,ClickOnce安装将会起作用并且应用程序将启动。为什么这不起作用?部署非常简单,只有EXE文件和exe.config文件。没有DLL文件或类似的东西。

我现在已经创建了一个干净的新项目并添加了所有内容,并通过ClickOnce部署获得了相同的结果。我不知道这是配置问题还是安全/访问问题。

我可以使用ClickOnce安装到托管文件的网络服务器。但是任何其他机器都无法安装。

我还设置了一个新用户帐户“clickonceuser”,并让他们完全控制Web服务器的目录。我将IIS设置为“clickonceuser”并点击测试按钮,验证用户和文件系统访问权限。

错误详情:

PLATFORM VERSION INFO
    Windows             : 6.1.7601.65536 (Win32NT)
    Common Language Runtime     : 4.0.30319.225
    System.Deployment.dll         : 4.0.30319.1 (RTMRel.030319-0100)
    clr.dll             : 4.0.30319.225 (RTMGDR.030319-2200)
    dfdll.dll             : 4.0.30319.1 (RTMRel.030319-0100)
    dfshim.dll             : 4.0.31106.0 (Main.031106-0000)

SOURCES
    Deployment url            : http://xxxxxxxxxxx/conveyormerlin/ConveyorMerlin.application

ERROR SUMMARY
    Below is a summary of the errors, details of these errors are listed later in the log.
    * Activation of http://xxxxxxxxxxx/conveyormerlin/ConveyorMerlin.application resulted in exception. Following failure messages were detected:
        + Exception reading manifest from http://xxxxxxxxxxx/conveyormerlin/ConveyorMerlin.application: the manifest may not be valid or the file could not be opened.
        + '>' is an unexpected token. The expected token is '"' or '''. Line 1, position 50.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
    No transaction error was detected.

WARNINGS
    There were no warnings during this operation.

OPERATION PROGRESS STATUS
    * [6/16/2011 9:42:04 AM] : Activation of http://xxxxxxxxxxx/conveyormerlin/ConveyorMerlin.application has started.

ERROR DETAILS
    Following errors were detected during this operation.
    * [6/16/2011 9:42:05 AM] System.Deployment.Application.InvalidDeploymentException (ManifestParse)
        - Exception reading manifest from http://xxxxxxxxxxx/conveyormerlin/ConveyorMerlin.application: the manifest may not be valid or the file could not be opened.
        - Source: System.Deployment
        - Stack trace:
            at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
            at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirectBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
            at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options)
            at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
            at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
        --- Inner Exception ---
        System.Xml.XmlException
        - '>' is an unexpected token. The expected token is '"' or '''. Line 1, position 50.
        - Source: System.Xml
        - Stack trace:
            at System.Xml.XmlTextReaderImpl.Throw(Exception e)
            at System.Xml.XmlTextReaderImpl.DtdParserProxy.System.Xml.IDtdParserAdapter.Throw(Exception e)
            at System.Xml.DtdParser.ParseExternalId(Token idTokenType, Token declType, String& publicId, String& systemId)
            at System.Xml.DtdParser.ParseInDocumentDtd(Boolean saveInternalSubset)
            at System.Xml.DtdParser.Parse(Boolean saveInternalSubset)
            at System.Xml.DtdParser.System.Xml.IDtdParser.ParseInternalDtd(IDtdParserAdapter adapter, Boolean saveInternalSubset)
            at System.Xml.XmlTextReaderImpl.ParseDtd()
            at System.Xml.XmlTextReaderImpl.ParseDoctypeDecl()
            at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
            at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read()
            at System.Xml.XmlCharCheckingReader.Read()
            at System.Xml.XsdValidatingReader.Read()
            at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)

COMPONENT STORE TRANSACTION DETAILS
    No transaction information is available.

1 个答案:

答案 0 :(得分:0)

这是DNS查询的问题(部署提供程序URL是一个没有查找我的主机名),因为我与部署不在同一个域中应用。我希望我知道一个解决方法,但现在我会处理。