I need people's opinion on how to update a Cli

2019-02-11 02:23发布

问题:

I have a C# application which is run through a database, and it is being used by different people in different locations.

The easiest and best way to update my application every time there is a change was to create a ClickOnce application and publish it to a server. My problem is that the only server I can have is an FTP server and the problem here is that ClickOnce doesn't support to get updates from the FTP server. It supports updating to a file share or web hosting.

So I need some opinion on how should I update my application. Is there a chance to access the FTP server through HTTP? For example, instead of typing myftp server to type in something like ftp through http, and it will redirect to the FTP server. This would save all the hustle.

By the way are there people using 45.webmasters.com as a webhosting service? It is my webhosting service and I can store items files on the website. Like I can create a directory and save the application's files in there, but I don't know how to access this directory programmatically so that to publish in that location.

回答1:

Do you have to use your server?

If not I suggest you look into using Dropbox as your hoster - it's free, your application is available through HTTP and publishing it is as easy as publishing it to your local Dropbox folder.

I've been using this method for some time now. Of course you can use other services - or maybe a free webhoster. (AppHarbor comes to mind.)

In case the link in the comment doesn't work any more, the key points to get this to work are:

  1. Find your public URL (left click any file in your Dropbox, copy public link), it will start with "http://dl.dropbox.com/u/xxxxxx/".
  2. Open the "Publish"-tab in your projects properties in Visual Studio.
    • As "Publishing Folder Location" use the local path to your Dropbox (subfolder), which usually under Windows 7 looks similar to C:/Users/<User>/My Dropbox/Public (you can use any subfolder you want)
    • "Installation Folder Location": Point it to http://dl.dropbox.com/u/xxxxxx/< subfolders >
    • "Update Location": Same deal as above, http://dl.dropbox.com/u/xxxxxx/< subfolders >
  3. Hit Publish
  4. Now copy your public link from Dropbox to your .application file and start distributing.

Blogpost by Michael S. Clark describing the procedure.



回答2:

You can't install a CLickOnce application from an FTP server. You can only install from a file share or using http.

Another inexpensive alternative would be Windows Azure Blob Storage, which is dirt cheap and works great.

http://robindotnet.wordpress.com/2011/07/18/host-your-clickonce-deployment-in-azure-for-pennies-per-month/