ClickOnce Deployment
With ClickOnce deployment there is no need to start a setup program on the client system. All the client system ’ s user has to do is click a link on a Web page, and the application is automatically installed. After
the application is installed, the client can be offline — it doesn ’ t need to access the server from which the application was installed.
ClickOnce installation can be done from a Web site, a UNC share, or a file location (e.g., a CD). With ClickOnce, the application is installed on the client system, it is available with Start menu shortcuts, and it can be uninstalled from the Add/Remove Programs dialog.
Here are the steps for clickonce deployment:
1. Open the application with Visual Studio for which deployment has to be done.
2. Select Properties for the project in the Solution Explorer, and select the Signing tab, shown in Figure
3. Check the Sign the ClickOnce Manifests check box.
4. Click the Create Test Certificate button to create a test certificate that is associated with the ClickOnce manifests. Enter a password for the certificate as requested. You must remember the password for later settings. Then click OK.
5. Click the More Details button for certificate information (see Figure)
6. Select Properties for the project in the Solution Explorer, select Security, as shown in Figure , and select Enable ClickOnce Security Settings.
7. Click the This Is A Partial Trust Application radio button.
8. Select the zone (Custom), as special security permissions are required by the application.
9. Click the Calculate Permissions button to calculate the permissions that are required by the application.
10. If the permission FileIOPermission is not included with the calculation, change the setting to include it.
11. Select the Publish tab with the project properties. Click the Options button to open the Publish Options dialog (see Figure ). Enter the product name, the publisher name, a support URL, and a deployment Web page.
12.Configure the Update options by selecting the Updates button and select the The Application Should Check for Updates check box, as shown in Figure .
13. Start the Publish Wizard by selecting Build=> Publish application. Enter a path to the Web site http://localhost/application , as shown in Figure . Click the Next button.
To publish the application to a Web server on Windows Vista, Visual Studio 2008 must be started in elevated
mode with administrative privileges; and Internet Information Server (IIS) needs to be installed.
If you do not have IIS installed, select publishing to the local file system.
14. At step 2 in the Publish Wizard, select “ Yes, this application will be available online or offline, ” as shown in Figure . Click the Next button.
15. The last dialog gives summary information, as you are Ready to Publish! (see Figure). Click the Finish button.
16.Now you can instal the application by opening web page publish.htm on web browser.
Updating the Application
1. Make a change to the application that shows up immediately, such as setting the background color of the text box.
2. Build the application and click the Publish Now button with the Publish section of the project properties.
3. Do not click the publish.htm link on the Web page; instead, start the client application from the Start menu. When the application is started, the Update Available dialog appears, asking whether a new version should be downloaded. Click OK to download the new version. When the new version launches, you can see the application with the colored text box.