Microsoft KB Archive/199017

= HOW TO: Deploy Visual Basic IIS Applications with the PDW =

Article ID: 199017

Article Last Modified on 6/22/2005

-

APPLIES TO


 * Microsoft Visual Basic 6.0 Learning Edition
 * Microsoft Visual Basic 6.0 Professional Edition
 * Microsoft Visual Basic 6.0 Enterprise Edition
 * Microsoft Internet Information Server 4.0
 * Microsoft Internet Information Services 5.0

-



This article was previously published under Q199017



We strongly recommend that all users upgrade to Microsoft Internet Information Services (IIS) version 6.0 running on Microsoft Windows Server 2003. IIS 6.0 significantly increases Web infrastructure security. For more information about IIS security-related topics, visit the following Microsoft Web site:

http://www.microsoft.com/technet/security/prodtech/IIS.mspx



IN THIS TASK
SUMMARY
 * Use the PDW to Create the Package
 * Deploy the Package to IIS
 * Deploy the Package to a Local or Network Folder

REFERENCES



SUMMARY
This step-by-step article describes how to package and deploy Internet Information Server (IIS) applications by using the Microsoft Visual Basic Package and Deployment Wizard (PDW). The PDW packages your .dll file and its dependencies into a cabinet (.cab) file. The .cab file can then be deployed to a Web server where the files can be unpacked, installed, and registered.

NOTE: HTML and Active Server Pages (ASP) pages are not packaged in the .cab file, but they are copied to the appropriate location when the application is deployed.

back to the top

Use the PDW to Create the Package
To create a package for an IIS application, follow these steps:  Load the application project file in Visual Basic, and then start the PDW from the Add-Ins menu.NOTE: If the PDW is not on the Add-Ins menu, add it from the Add-In Manager, which is located on the Add-Ins menu.

 On the main PDW page, click to select Package. NOTE: You may receive the following message:

To proceed, the wizard requires the executable file '[project name].dll' for this project. Click Browse to find the file or Compile to compile the project.

If the application has been recently compiled, click to select Browse to find the compiled .dll. Otherwise, click to select Compile.

 On the Package Type page, for IIS applications, click to select Internet Package, and then click Next. On the Package Folder page, by default, the package is assembled in a directory under the project directory named Package. If you want the package to be placed in a different directory, type the file path in the Package Folder text box, and then click Next. Otherwise, just click Next. The Included Files page lists all of the files that will be placed in the .cab file. The default listed items are Mswcrun.dll (WebClass Runtime), Visual Basic 6 Runtime, OLE Automation files, and your IIS application .dll file. If you want any additional files added to the .cab, click Add, and then locate the file to add. When you are finished, click Next to continue.

NOTE: You may experience problems when you deploy your package if you include the WebClass Runtime, the Visual Basic Runtime, or the OLE Automation files.For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

223499 PRB: Unexpected Error C0042116 with PDW 'Files Specified in Section RInstallApplicationFiles of INF File filename.INF are Busy'

 Click Finish and the PDW completes the packaging of the IIS application. All selected settings are stored in a script. If the package must be re-created in the future, this script can be selected to automate the packaging process.</li></ol>

back to the top

Deploy the Package to IIS
After the application has been packaged, it can be deployed to a Web server. The Web server must have Posting Acceptor 2.0 installed for the PDW to function properly. For additional information about the Posting Acceptor, click the article number below to view the article in the Microsoft Knowledge Base:

192116 HOWTO: Configure Posting Acceptor To Work With the PDW

Additionally, IIS applications must be deployed to an existing virtual directory on the Web server. For additional information about how to create virtual directories, click the following article number to view the article in the Microsoft Knowledge Base:

172138 HOW TO: Create a Virtual Directory in Internet Information Services (IIS)

Follow these steps to deploy the package to the Web server: <ol> On the main PDW page, click to select Deploy.</li> On the Package to Deploy page, click to select the package you want to deploy, and then click Next. The package is referred to in the list box by the script name that was selected in the last page of the packaging steps.</li> On the Deployment Method page, click to select Web Publishing, and then click Next. Packages can be published to a Web server or to local or network folder.</li> The Items to Deploy page prompts you for items to deploy to the Web server. By default, this includes the cabinet package and any ASP, HTML, or other files that are in the application project. Click to clear any files that you do not want to deploy to the server, and then click Next.</li> On the Additional Items to Deploy page, click to select any additional files to be deployed that were not part of the project, and then click Next. Note that these additional files must either be in the project directory or in one of the subdirectories of the project directory.</li> On the Web Publishing Site page, type the URL to where the package is to be deployed. The package can be deployed by either HTTP Post or File Transfer Protocol (FTP). For additional information about how to use FTP to deploy Visual Basic Internet applications, click the article number below to view the article in the Microsoft Knowledge Base:

192639 HOWTO: Use PDW to Deploy Using the FTP Web Publishing Method

NOTE: For a package to be deployed by HTTP Post, the Web server must be configured with the Posting Acceptor 2.0. There is also an option here for unpacking and installing the server-side .cab file. This option can only be used with HTTP Post. Click Next to continue. You may receive the following message:

The specified URL and publishing protocol can be saved in the registry as a Web publishing site. This will verify that the URL and publishing protocol are valid and will save time for future deployments to this site. Do you want to store this information as a Web publishing site?

Click Yes if you want to save this information in the registry. Otherwise, click No to continue.

</li> Click Finish and the PDW completes the deployment of your application. Similar to when packaging applications, the selected settings are stored in a script so that any future deployments for the current application can be automated.</li></ol>

back to the top

Deploy the Package to a Local or Network Folder
Follow these steps to deploy the package to a local or network folder:
 * 1) On the main PDW page, click to select Deploy.
 * 2) For Package to Deploy, click to select the package that you want to deploy, and then click Next. The package is referred to in the list box by the script name that was selected in the last page of the packaging steps.
 * 3) For Deployment Method, click to select Folder, and then click Next. Packages can be published to a Web server or to a local or network folder.
 * 4) For Folder, use the Browse button to locate the local or network folder in which to deploy the application. When you are finished, click Next.
 * 5) Click Finish and the PDW completes deploying the application to the selected folder. Selected settings are stored in a script so that future deployments for the current application can be automated. Note that when you deploy the package to a local or network folder, the package is not unpacked or installed. The Package files are just copied to the selected location.

back to the top

<div class="references_section">