Microsoft KB Archive/301237

= How To Create a Visual Basic Project Template For Creating IIS Components =

Article ID: 301237

Article Last Modified on 12/3/2007

-

APPLIES TO


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

-



This article was previously published under Q301237



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



SUMMARY
When you develop custom Visual Basic components to run under Internet Information Services (IIS), you must set a number of properties to maximize the uptime of the IIS server. To make it easier on the development team, it is recommended that a project template be created with all of the necessary settings already set. By doing this you can remove the possibility that a component will be created without these settings and therefore cause server problems when it is put into use.



MORE INFORMATION
To create a project template, follow these steps:
 * 1) In Visual Basic, create a new ActiveX DLL project.
 * 2) On the Project menu, click Properties.
 * 3) On the General tab, select Unattended Execution and Retain in Memory.NOTE: Unattended Execution and Retain in Memory are necessary so that the IIS server does not stop responding (hang) or crash because of the Visual Basic dynamic-link library (DLL). For more information on the issues you can encounter if these settings are not selected, see the &quot;References&quot; section.
 * 4) On the Compile tab, select Create Symbolic Debug Info.NOTE: Create Symbolic Debug Info creates symbol files for the DLL whenever you compile. These can be used to debug problems with the DLL.


 * 1) On the Make tab, select Auto Increment.
 * 2) Click OK.
 * 3) On the Tools menu, click Options.
 * 4) On the Environment tab, note the setting for Template Directory. This is where you will save the Visual Basic project (.vbp) file.
 * 5) Click OK.
 * 6) On the File menu, click Save Project As.
 * 7) Save the .cls file in any folder other than the template folder that is listed on the Environment tab.
 * 8) Save the .vbp file in the template folder that is listed on the Environment tab. Give the file a memorable name, such as IIS Component.vbp.

You can see this template in the template directory when you click Open Project on the File menu. All necessary settings are set.

