How To Create a Visual Basic Project Template For Creating IIS Components (301237)



The information in this article applies to:

  • Microsoft Visual Basic Enterprise Edition for Windows 6.0
  • Microsoft Internet Information Server 4.0
  • Microsoft Internet Information Services 5.0
  • Microsoft Internet Information Services version 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:

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 "References" 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.

  5. On the Make tab, select Auto Increment.
  6. Click OK.
  7. On the Tools menu, click Options.
  8. On the Environment tab, note the setting for Template Directory. This is where you will save the Visual Basic project (.vbp) file.
  9. Click OK.
  10. On the File menu, click Save Project As.
  11. Save the .cls file in any folder other than the template folder that is listed on the Environment tab.
  12. 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.

REFERENCES

For additional information, click the article numbers below to view the articles in the Microsoft Knowledge Base:

214755 FIX: VB 6 DLL Settings Cause Access Violation During MTS Shutdown

191119 FIX: VB Classes Can Cause IIS to Have Access Violations

243548 INFO: Design Guidelines for VB Components Under ASP

281630 How To Configure Visual Basic DLL Project Properties to Run in IIS, MTS, or COM+


Modification Type:MinorLast Reviewed:6/22/2005
Keywords:kbhowto KB301237