Deploying the Application
To deploy the application using ClickOnce, first build the MyEditor project (Build>Build MyEditor) and then publish it (Build>Publish MyEditor).
The Publish Wizard will appear (see Figure 5). You can publish (deploy) a Windows application through a disk, shared folder, FTP server, or Web server. Use the default HTTP method and click Next.
Figure 5. Preparing for Deployment: Specify the location to publish the application.
Figure 6. Installer: This installation page is created for you automatically. From here, users can download and install the application on their client.
Next, decide if the application will run online only, or both online and offline using the simple radio button on the next page of the dialog. For this example, select the first option for both online and offline (smart client) and click Next.
Click Next and then Finish to complete the publish process. Internet Explorer should now display a page similar to that shown in Figure 6. The URL shown is the URL that you will advertise to your users if you want them to install the application using ClickOnce. Users can merely click the Install button to install the application.
Because we have not verified the publisher of this application, users who attempt to download this sample will get a security warning (see Figure 7). Click Install on the dialog to continue.
To prevent your users from being getting the security prompt, a System Administrator can specify a ClickOnce deployment policy that defines a specific application publisher as a trusted source. On computers where this policy is deployed, permissions will automatically be granted and the user will not be prompted.
|Figure 7. Security Warning: If you haven't defined your application publisher as a trusted source, your end users will get the security prompt shown.|
If the application installs successfully, it will launch automatically. You can also launch the application by going to Start>Programs><Company Name>>MyEditor.