HOWTO: Build an IIS Application and ReferencesID: Q191039
|
Building your first IIS application can have some minor pitfalls. This article describes a simple IIS application to get you going.
Private Sub WebClass_Start()
Set NextItem = Template1
end Sub
NextItem is used to shift processing from one WebItem to another during
a single request. Using the NextItem will cause the Private Sub
Template1_Respond() to fire.
Private Sub Template1_Respond()
Template1.WriteTemplate
End Sub
The Template1.WriteTemplate will send the contents of Template1 to
client browser window. Remember that Template1 is the HTML file you
imported into the IIS application. If you don't put anything in this
event and you run the project, the browser will come up with a blank
page. You should do a dry run of this process to see how it works.
Private Sub Template1_Respond()
'Write a reply to the user
With Response
.Write "<html>"
.Write "<body>"
.Write "<h1>WebClass1's Starting Page</h1>"
.Write "<p>Response was created in the Template1_Respond event</p>"
.Write "</body>"
.Write "</html>"
End With
End Sub
A WebClass sample will be located at the following location when you
install the MSDN samples:
Microsoft Visual Studio\MSDN98\98VS\1033\Samples\VB98\WcDemo\WCDEMO.VBP
Q190252 : HOWTO: Change Default HTML Editor
Q189538 : BUG: Need to Remove the "Me" References from WcDemo Sample
Q191036 : INFO:Option Explicit Statement Is Not Added by WebClass Designer
Q189539 : INFO: VB 6.0 Readme Part 8: WebClass Designer Issues
Q191038 : INFO: WebClass Initialize, BeginRequest, Terminate Events
Q189540 : PRB: Access Denied Error on WebClass Files
Q190253 : VB6 Designers Do Not Work in VB5
Q191125 : Error Logging Could Have Problems in WebClass Designers
Q191119 : VB Classes Can Cause IIS to have Access Violations
Q191035 : Changes to WebClass Templates Not Always Detected
Keywords : kbsample kbInternet kbVBp kbVBp600 kbWebClasses
Version :
Platform : WINDOWS
Issue type : kbhowto
Last Reviewed: May 7, 1999