【问题标题】:ClickOnce Deployment Error: Application improperly formatted... (website install)ClickOnce 部署错误:应用程序格式不正确...(网站安装)
【发布时间】:2015-02-05 20:26:06
【问题描述】:

我正在尝试使用 ClickOnce 部署程序。如果我尝试“从 CD 安装”版本,它工作正常。如果我尝试在“从网站安装”版本中部署它,如果我尝试运行它,我会收到以下错误:

无法继续。应用程序格式不正确。联系 应用程序供应商寻求帮助。

详细的错误是:

PLATFORM VERSION INFO
    Windows             : 6.1.7601.65536 (Win32NT)
    Common Language Runtime     : 4.0.30319.18444
    System.Deployment.dll       : 4.0.30319.34244 built by: FX452RTMGDR
    clr.dll             : 4.0.30319.18444 built by: FX451RTMGDR
    dfdll.dll           : 4.0.30319.34244 built by: FX452RTMGDR
    dfshim.dll          : 4.0.41209.0 (Main.041209-0000)

SOURCES
    Deployment url          : https://mywebsite.com/HBAPackageConfig.application

ERROR SUMMARY
    Below is a summary of the errors, details of these errors are listed later in the log.
    * Activation of https://mywebsite.com/HBAPackageConfig.application resulted in exception. Following failure messages were detected:
        + Exception reading manifest from https://mywebsite.com/HBAPackageConfig.application: the manifest may not be valid or the file could not be opened.
        + For security reasons DTD is prohibited in this XML document. To enable DTD processing set the DtdProcessing property on XmlReaderSettings to Parse and pass the settings into XmlReader.Create method.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
    No transaction error was detected.

WARNINGS
    There were no warnings during this operation.

OPERATION PROGRESS STATUS
    * [2/5/2015 2:13:50 PM] : Activation of https://mywebsite.com/HBAPackageConfig.application has started.

ERROR DETAILS
    Following errors were detected during this operation.
    * [2/5/2015 2:13:51 PM] System.Deployment.Application.InvalidDeploymentException (ManifestParse)
        - Exception reading manifest from https://mywebsite.com/HBAPackageConfig.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
        - For security reasons DTD is prohibited in this XML document. To enable DTD processing set the DtdProcessing property on XmlReaderSettings to Parse and pass the settings into XmlReader.Create method.
        - Source: System.Xml
        - Stack trace:
            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.

我尝试在 Visual Studio 中对应用程序进行签名,但仍然收到此错误。 有没有人解决我为什么这不起作用?我在 Chrome 和 IE 中尝试过。

【问题讨论】:

    标签: deployment visual-studio-2013 web clickonce


    【解决方案1】:

    您可能需要允许访问安装文件夹。 ClickOnce 会打开到安装文件夹的新连接。因此,即使您有权访问该文件夹,新连接也无法访问组件,例如清单。

    在下面的示例中,为了简洁起见,MyInstallPath 被授予开放访问权限:

      <runtime>
        <location path="MyInstallPath">
        <system.web>
          <authorization>
            <allow users="*" />
          </authorization>
        </system.web>
        </location>
      </runtime>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-08-13
      • 1970-01-01
      • 1970-01-01
      • 2019-12-05
      • 2010-11-24
      • 1970-01-01
      • 2018-01-02
      • 1970-01-01
      相关资源
      最近更新 更多