I am developing a Windows .NET 4 desktop application for a client and am considering using ClickOnce for deploying it from the client's website. I also plan on deploying application version upgrades from their website.
I've read through many ClickOnce-related questions on Stack Overflow and still don't have a good idea of what needs to happen for me to publish the application to a web server using ClickOnce.
What does my client need to set up on their web server for me to publish my application using ClickOnce? What kind of access permissions? Do they need to set up a deployment directory?
In the Publish wizard, select Folder. In the Specific target page, select ClickOnce. Enter a path or select Browse to select the publish location. In the Install location page, select where users will install the application from.
To specify a custom Web page for a ClickOnce applicationSelect the Publish pane. Click the Options button to open the Publish Options dialog box. Click Deployment. In the Publish Options dialog box, make sure that the Open deployment web page after publish check box is selected (it should be selected by default).
To specify prerequisites to install with a ClickOnce application. With a project selected in Solution Explorer, on the Project menu click Properties. Select the Publish pane. Click the Prerequisites button to open the Prerequisites dialog box.
To quote Brian Noyes' excellent book on ClickOnce deployment, Smart Client Deployment with ClickOnce: Deploying Windows Forms Applications with ClickOnce:
The server must be able to return file requests for the deployment manifest, application manifest, and individual application files via HTTP or a UNC file path.
The server must return appropriate MIME file types in the HTTP headers so that they are handled correctly on the client side.
The current list of MIME types is in the blog post MIME Types for ClickOnce deployment.
So you don't even have to have Windows Server, you can host it on an Apache server (and many do).
My company set up a folder (not under the root of the webserver) and gave me permissions to FTP anything to that folder. Then there is an HTTP address that points to that folder. They were more comfortable with this than with giving me HTTP write access to the root of the web server, with which I totally agreed.
So when I publish, I set the publishing file location to something like ftp://myserver.mycompany.com/myvirtualfolder/myappname/
Then I set the installation URL to something like http://myserver.mycompany.com/myappname/
which points to myvirtualfolder
. And this is also the link accessed by the customers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With