Publishing an application for the first time

When you are ready to deploy an application to users, you publish it to the server. Users can then download the application, usually from a publish page that contains a link to the server.

Figure 10-1: Deploying an intelligent update application

The application is published to the server from the developer’s workstation. The user browses the publish page and downloads the application.

You need to:

Create a project and set publishing properties

After you develop a PowerBuilder application that will be published as a .NET Windows Forms application with intelligent update capabilities, if you did not create a project when you built the application, select the .NET Windows Forms Application wizard or project icon on the Project page of the New dialog box to build a project.

To specify that the application uses intelligent update, select the check box on the Specify Support for Smart Client page in the wizard. Selecting this check box enables additional pages in the wizard:

You can also select the Publish as a Smart Client Application check box on the General page in the Project painter. Selecting the check box enables the tab pages in the dialog box where you set publishing properties. You can set additional properties in the Project painter. For example, if you want to publish the application to an FTP site, select that option and specify details on the Publish page.

Locations for publish, install, and update

The publish location, specified on the Publish page in the Project painter, determines where the application files are generated or copied to when you publish the application. It can be an HTTP address, an FTP site, or a UNC address.

The install location, specified on the Install/Update page, determines where the end user obtains the initial version of the application. It can be an HTTP address or UNC address, by default the same address as the publish location specified in the wizard, or a CD or DVD. The install location does not need to be the same as the publish location. For example, you can publish the application to an FTP site, but specify that users get the application and updates from a Web site.

The update location, also specified on the Install/Update page, determines where the user obtains updated versions of the application. If the install location is an HTTP address or UNC address, the update location is always the same as the install location. If the application was installed from a CD or DVD, updates must be obtained from an HTTP or UNC address.

Security settings

Applications installed using intelligent update typically run with a limited set of permissions based on a security zone that depends on how the application was originally installed. Full Trust is used for applications installed from a CD or DVD, Local Intranet Trust is used when the application is installed from a network share, and Internet Trust is used when the application is run or installed from the Web. In PowerBuilder 11, Full Trust is always used.

Full trust permissions are required for local intranet deployment. When you deploy and run an application from a network path (either a path on a mapped drive or a UNC path), the .NET Framework on the computer must be configured to have Full Trust permissions at runtime. To set these permissions, select Administrative Tools>Microsoft .NET Framework 2.0 Configuration from the Windows control panel. In the .NET Framework Configuration tool, expand My Computer and select Runtime Security Policy>Machine>Code Groups>All_Code>LocalIntranet_Zone. Select Properties from the pop-up menu and select FullTrust in the Permission set drop-down list on the Permission Set tab page.

Publish the application

After you set publish properties, click the Publish button on the toolbar in the Project painter to publish the application to the server.

PowerBuilder checks whether your publish settings are valid and prompts you to correct them if necessary. If the application is not up to date, PowerBuilder rebuilds and redeploys it before publishing it to the server. The files that the application needs at runtime are then published to the server. If you select the defaults in the wizard, the application is deployed to a subdirectory of the IIS root directory on your local computer, usually C:\Inetpub\wwwroot.

If you encounter problems when publishing the application, see “Troubleshooting tips for Windows Forms applications”.

The following additional files are created on the server: