从Web ClickOnce下载wpf应用程序

时间:2016-12-24 16:57:20

标签: wpf ftp clickonce

我在我的服务器上使用了c#.net应用程序,但是每当我做一些小改动就转移它很痛苦所以我想将我的应用程序更新到我的ftp并因此下载并正常使用(也启用更新)来自ftp)。

所以我做的是将我的应用程序发布到我的ftp ftp://ftp.siteaddress.extension.rs/public_html/siteaddress.rs/Menadzment/并将安装文件夹设置为http://siteaddress.rs/Menadzment/。问题是当我去siteaddress.rs/Menadzment/publish.htm并下载设置时,当我启动时它说Cannot download application. The application is missing required files.我尝试更改这些地址但我甚至无法下载,VS也发出警告,它无法找到文件在someotheraddress。这是我的问题。

  • 我可以在我的ftp上看到文件
  • 我可以通过siteaddress.rs/Menadzment/publish.htm
  • 下载文件
  • Visual studio说发布很顺利

以下是错误的详细信息:

PLATFORM VERSION INFO
    Windows             : 6.1.7600.0 (Win32NT)
    Common Language Runtime     : 4.0.30319.17929
    System.Deployment.dll       : 4.0.30319.17929 built by: FX45RTMREL
    clr.dll             : 4.0.30319.17929 built by: FX45RTMREL
    dfdll.dll           : 4.0.30319.17929 built by: FX45RTMREL
    dfshim.dll          : 4.0.41209.0 (Main.041209-0000)

SOURCES
    Deployment url          : http://siteaddress.rs/Menadzment/Menadzment.application
                        Server      : Apache
    Deployment Provider url     : http://ftp.siteaddress.extension.rs/Menadzment/Menadzment.application

ERROR SUMMARY
    Below is a summary of the errors, details of these errors are listed later in the log.
    * Activation of http://siteaddress.rs/Menadzment/Menadzment.application resulted in exception. Following failure messages were detected:
        + Downloading http://ftp.siteaddress.extension.rs/Menadzment/Menadzment.application did not succeed.
        + The remote server returned an error: (404) Not Found.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
    No transaction error was detected.

WARNINGS
    There were no warnings during this operation.

OPERATION PROGRESS STATUS
    * [24.12.2016 17:52:08] : Activation of http://siteaddress.rs/Menadzment/Menadzment.application has started.

ERROR DETAILS
    Following errors were detected during this operation.
    * [24.12.2016 17:52:08] System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
        - Downloading http://ftp.siteaddress.extension.rs/Menadzment/Menadzment.application did not succeed.
        - Source: System.Deployment
        - Stack trace:
            at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
            at System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
            at System.Deployment.Application.FileDownloader.Download(SubscriptionState subState)
            at System.Deployment.Application.DownloadManager.DownloadManifestAsRawFile(Uri& sourceUri, String targetPath, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
            at System.Deployment.Application.DownloadManager.DownloadManifest(Uri& sourceUri, String targetPath, IDownloadNotification notification, DownloadOptions options, ManifestType manifestType, ServerInformation& serverInformation)
            at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirect(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
            at System.Deployment.Application.DownloadManager.FollowDeploymentProviderUri(SubscriptionStore subStore, AssemblyManifest& deployment, Uri& sourceUri, TempFile& tempFile, IDownloadNotification notification, DownloadOptions options)
            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.Net.WebException
        - The remote server returned an error: (404) Not Found.
        - Source: System
        - Stack trace:
            at System.Net.HttpWebRequest.GetResponse()
            at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)

COMPONENT STORE TRANSACTION DETAILS
    No transaction information is available.

1 个答案:

答案 0 :(得分:0)

确保文件(http://siteaddress.rs/Menadzment/Menadzment.applicationhttp://siteaddress.rs/Menadzment/Application Folder/中的文件)的文件权限设置为至少具有公共读取访问权限。您可以使用chmod通过ssh(http://www.computerhope.com/unix/uchmod.htm)或以图形方式执行此操作,例如使用FileZilla。

确保可以通过http。

从网络上免费访问所有文件

还要确保您的安装文件夹URL(在visual studio中)设置为http://siteaddress.rs/Menadzment/

还要确保使用代码签名证书正确签署ClickOnce应用程序。 ClickOnce应用程序在没有它的情况下无法工作,并且激活错误确实指向错误的代码签名。如果应用程序根本没有签名或文件在签名后更改,则会发生这种情况。这些文件只应在签名之前更改,或者您应该更新其签名信息。