Downloading wpf application from web ClickOnce

814 Views Asked by At

I have c# .net application that i am using on my server but it was pain to transfer it whenever i make some little change so i want to update my application to my ftp and so download it and use normally (also enable update from ftp).

So what have i done is published my application to my ftp ftp://ftp.siteaddress.extension.rs/public_html/siteaddress.rs/Menadzment/ and set installation folder to http://siteaddress.rs/Menadzment/. Problem is when i go to siteaddress.rs/Menadzment/publish.htm and download setup, when i start it it says Cannot download application. The application is missing required files. I tried changing these addresses but then i can not even download and VS is also giving warning that it can not locate file at someotheraddress. What is my problem here.

  • I can see file on my ftp
  • I can download file via siteaddress.rs/Menadzment/publish.htm
  • Visual studio says that publishing went good

Here are details of error:

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

There are 1 best solutions below

1
On

Make sure that the file permissions of the files (http://siteaddress.rs/Menadzment/Menadzment.application and the files in http://siteaddress.rs/Menadzment/Application Folder/) are set to have at least public read access permission. You can do this with chmod via ssh(http://www.computerhope.com/unix/uchmod.htm) or graphically e.g. with the use of FileZilla.

Make sure all the files are freely accessible from the web via http.

Also make sure that your Installation Folder URL (in visual studio) is set to http://siteaddress.rs/Menadzment/.

Also make sure your ClickOnce application is signed correctly with a code Signing Certificate. The ClickOnce application won't work without it and an Activation Error does point to an incorrect codesign. This happens if the application is not signed at all or files are changed after signing them. The files should only change before signing them or you should update their signing information.