2016-12-24 60 views
0

我在我的服務器上使用了c#.net應用程序,但每當我進行一些更改時都很痛苦,因此我想將我的應用程序更新到我的ftp,因此將其下載並正常使用(也可以從ftp更新)。從網上下載wpf應用程序ClickOnce

那麼我做了什麼是我的應用程序發佈到我的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. 
+0

你可以通過瀏覽器手動訪問http://ftp.siteaddress.extension.rs/Menadzment/Menadzment.application,還是返回404頁面(而不是開始下載文件)? – Sander

+0

無法編輯我以前的評論,但我打算說:你可以通過瀏覽器手動訪問http://siteaddress.rs/Menadzment/Menadzment.applicati,還是返回404頁面(而不是開始下載文件)? – Sander

+0

@Sander它確實下載它時,我去siteaddress.rs/Menadzment/Menadzment.application – Parpil

回答

0

確保文件的文件權限(http://siteaddress.rs/Menadzment/Menadzment.application和中的文件)被設置爲至少具有公共讀取訪問權限。您可以通過ssh(http://www.computerhope.com/unix/uchmod.htm)以chmod或圖形方式(例如,使用FileZilla。

確保所有文件都可以通過http免費從網上訪問。

還要確保安裝文件夾URL(在Visual Studio中)設置爲http://siteaddress.rs/Menadzment/

還要確保您的ClickOnce應用程序使用代碼簽名證書正確簽名。如果沒有它,ClickOnce應用程序將無法正常工作,並且激活錯誤會指向不正確的代碼。如果應用程序根本沒有簽名或文件在簽名後發生更改,則會發生這種情況。這些文件只能在簽名之前更改,否則您應更新其簽名信息。

+0

評論是不是擴展討論;這個對話已經[轉移到聊天](http://chat.stackoverflow.com/rooms/132215/discussion-on-answer-by-sander-downloading-wpf-application-from-web-clickonce)。 –