Microsoft Enterprise and Support Training Microsoft Confidential Web Development with Internet Information Server 4.0... Microsoft Enterprise and Support Training Microsoft Confidential
Trang 1Microsoft Enterprise and Support Training Microsoft Confidential
Web Development with Internet
Information Server 4.0
Trang 2Microsoft Enterprise and Support Training Microsoft Confidential
Course Overview
Introduction to Server Side Development
Administration and Configuration
Tools and Debugging
Built-in Object
Installable Components
Trang 3Microsoft Enterprise and Support Training Microsoft Confidential
Module 1:
Introduction to Server
Side Development
Trang 4Microsoft Enterprise and Support Training Microsoft Confidential
Module 1 Objectives
At the end of this module, you will be able to:
or functions/subroutines
Trang 5Microsoft Enterprise and Support Training Microsoft Confidential
Browsing HTML
Trang 6Microsoft Enterprise and Support Training Microsoft Confidential
Browsing Active Server Page
Trang 7Microsoft Enterprise and Support Training Microsoft Confidential
Active Server Pages
Runs on the server
Uses <% %> delimiters or <Script RunAt=Server>
Currently JScript and VBScript
Script Engine SDK creates others
Trang 8Microsoft Enterprise and Support Training Microsoft Confidential
Web Applications
Application Root
GLOBAL.ASA
Trang 9Microsoft Enterprise and Support Training Microsoft Confidential
Application Roots
Trang 10Microsoft Enterprise and Support Training Microsoft Confidential
Simple Active Server Script
Trang 11Microsoft Enterprise and Support Training Microsoft Confidential
Simple Active Server Script, cont
Trang 12Microsoft Enterprise and Support Training Microsoft Confidential
Lab
Trang 13Microsoft Enterprise and Support Training Microsoft Confidential
Module 2:
Administration and
Configuration
Module Page
Trang 14Microsoft Enterprise and Support Training Microsoft Confidential
Module 2 Objectives
At the end of this module, you will be able to:
Microsoft Management Console and IIS 4.0 property sheets
proper access to ASP
scripts
Related topics:
Trang 15Microsoft Enterprise and Support Training Microsoft Confidential
Administration
IIS 4.0 Property Sheets
NT User Configuration
Trang 16Microsoft Enterprise and Support Training Microsoft Confidential
Configuring Applications
Trang 17Microsoft Enterprise and Support Training Microsoft Confidential
Assigning NT User Permissions
Trang 18Microsoft Enterprise and Support Training Microsoft Confidential
Troubleshooting Permissions
Temporarily add I_USR* account to Administrators
Enable Auditing on NT box to determine what files could
be causing a problem
Determine if it is an access problem to the Web Server
or a remote server (such as SQL server)
Trang 19Microsoft Enterprise and Support Training Microsoft Confidential
Lab
Trang 20Microsoft Enterprise and Support Training Microsoft Confidential
Module 3:
Tools and Debugging
Module Page
Trang 21Microsoft Enterprise and Support Training Microsoft Confidential
Module 3 Objectives
At the end of this module, you will be able to:
Interdev
Trang 22Microsoft Enterprise and Support Training Microsoft Confidential
Tools and Debugging
Using Visual Interdev
Using Script Debugger
Trang 23Microsoft Enterprise and Support Training Microsoft Confidential
Using Visual Interdev
Trang 24Microsoft Enterprise and Support Training Microsoft Confidential
Using Script Debugger
Trang 25Microsoft Enterprise and Support Training Microsoft Confidential
Troubleshooting
Is the problem client script or server script?
Trang 26Microsoft Enterprise and Support Training Microsoft Confidential
Demonstration
Trang 27Microsoft Enterprise and Support Training Microsoft Confidential
Lab
Trang 28Microsoft Enterprise and Support Training Microsoft Confidential
Module 4:
Built-in Objects
Module Page
Trang 29Microsoft Enterprise and Support Training Microsoft Confidential
Module 4 Objectives
At the end of this module, you will be able to:
Trang 30Microsoft Enterprise and Support Training Microsoft Confidential
Trang 31Microsoft Enterprise and Support Training Microsoft Confidential
More info
Online help covers built-in objects:
Windows NT 4.0 Option Pack Documentation
Microsoft Internet Information Server (IIS)
Scripter’s Reference
Built-in ASP Objects
Trang 32Microsoft Enterprise and Support Training Microsoft Confidential
Trang 33Microsoft Enterprise and Support Training Microsoft Confidential
Response Model, cont
Trang 34Microsoft Enterprise and Support Training Microsoft Confidential
Trang 35Microsoft Enterprise and Support Training Microsoft Confidential
Forms with the POST method
<FORM METHOD=“POST” ACTION=url>
Passed to url using HTTP_POST
Must use Request.Form(controlname) to retrieve value
of control
Trang 36Microsoft Enterprise and Support Training Microsoft Confidential
Forms with the GET method
<FORM METHOD=“GET” ACTION=url>
Passed to url in the address
Must use Request.QueryString(controlname) to retrieve
value of control
Trang 37Microsoft Enterprise and Support Training Microsoft Confidential
Lab
Trang 38Microsoft Enterprise and Support Training Microsoft Confidential
Trang 39Microsoft Enterprise and Support Training Microsoft Confidential
Trang 40Microsoft Enterprise and Support Training Microsoft Confidential
Trang 41Microsoft Enterprise and Support Training Microsoft Confidential
Session Model, cont
Trang 42Microsoft Enterprise and Support Training Microsoft Confidential
Lab
Trang 43Microsoft Enterprise and Support Training Microsoft Confidential
Cookies
Use Request object to retrieve cookie value
Use Response object to set cookie value
Can be one value or use keys for multiple values
Trang 44Microsoft Enterprise and Support Training Microsoft Confidential
Lab
Trang 45Microsoft Enterprise and Support Training Microsoft Confidential
Microsoft Transaction Server
Trang 46Microsoft Enterprise and Support Training Microsoft Confidential
Trang 47Microsoft Enterprise and Support Training Microsoft Confidential
Marking a page for transactions
First line of page page must start with
<%@TRANSACTION=REQUIRED%>
You can manually accept or abort a transaction using
SetComplete and SetAbort from ObjectContext
If transaction is committed, OnTransaction_Commit()
event is executed
If transaction is aborted, OnTransaction_Abort() event is executed
In the case of syntax or run-time error,
OnTransaction_Abort() is automatically executed
Requires MSDTC (Distributed Transaction Coordinator)
Trang 48Microsoft Enterprise and Support Training Microsoft Confidential
Lab
Trang 49Microsoft Enterprise and Support Training Microsoft Confidential
Module 5:
Installable Components
Module Page
Trang 50Microsoft Enterprise and Support Training Microsoft Confidential
Module 5 Objectives
At the end of this module, you will be able to:
transactions within ADO
Trang 51Microsoft Enterprise and Support Training Microsoft Confidential
Trang 52Microsoft Enterprise and Support Training Microsoft Confidential
More info
Online help covers installable components:
Windows NT 4.0 Option Pack Documentation
Microsoft Internet Information Server (IIS)
Scripter’s Reference
Installable Components for ASP
Trang 53Microsoft Enterprise and Support Training Microsoft Confidential
Creating Instances of Objects
Set MyAd = Server.CreateObject(“Obj”)
<OBJECT RUNAT=Server ID=MyAd PROGID = “Obj">
Trang 54Microsoft Enterprise and Support Training Microsoft Confidential
AdRotator Model (“MSWC.AdRotator”)
Trang 55Microsoft Enterprise and Support Training Microsoft Confidential
Browser Capabilities Model(“MSWC.BrowserType”)
Properties
Methods
Trang 56Microsoft Enterprise and Support Training Microsoft Confidential
Lab
Trang 57Microsoft Enterprise and Support Training Microsoft Confidential
ADO Model
(“ADODB.[Connection][Command][Recordset]”)
Trang 58Microsoft Enterprise and Support Training Microsoft Confidential
Steps to retrieving data
Connect to datasource
Execute query or stored procedure
Step through results
Clean up
Trang 59Microsoft Enterprise and Support Training Microsoft Confidential
Retrieving records from a recordset
<%
Set rs=Server.CreateObject(“ADODB.Recordset”) rs.Open “Select * from Authors”,”DSN=PubsDSN”
Trang 60Microsoft Enterprise and Support Training Microsoft Confidential
Adding records to a recordset
Trang 61Microsoft Enterprise and Support Training Microsoft Confidential
Adding records to a recordset
Trang 62Microsoft Enterprise and Support Training Microsoft Confidential
Trang 63Microsoft Enterprise and Support Training Microsoft Confidential
Trang 64Microsoft Enterprise and Support Training Microsoft Confidential
Common errors with ADO
Predefined constants not recognized because
ADOVBS.INC not included
Improper user permissions setup on remote server
Incorrect connect string
Conflicting versions of driver and database
Wrong cursor set (not updateable or some methods
unavailable)
Trang 65Microsoft Enterprise and Support Training Microsoft Confidential
Lab
Trang 66Microsoft Enterprise and Support Training Microsoft Confidential
Content Linking Model(“MSWC.NextLink”)
Trang 67Microsoft Enterprise and Support Training Microsoft Confidential
Scripting Object Model
Trang 68Microsoft Enterprise and Support Training Microsoft Confidential
Lab
Trang 69Microsoft Enterprise and Support Training Microsoft Confidential
CDO Model (“CDONTS.[Session][NewMail]”)
Trang 70Microsoft Enterprise and Support Training Microsoft Confidential
Trang 71Microsoft Enterprise and Support Training Microsoft Confidential
Demonstration
Trang 72Microsoft Enterprise and Support Training Microsoft Confidential
Lab
Trang 73Microsoft Enterprise and Support Training Microsoft Confidential
Trang 74Microsoft Enterprise and Support Training Microsoft Confidential
Trang 75Microsoft Enterprise and Support Training Microsoft Confidential
Lab
Trang 76Microsoft Enterprise and Support Training Microsoft Confidential
MyInfo Model(“MSWC.MyInfo”)
Stores personalized info about the web server
Create custom properties on the fly
Personal Web Server (PWS) comes with several preset values for MyInfo
See online help for specifics
Trang 77Microsoft Enterprise and Support Training Microsoft Confidential
Trang 78Microsoft Enterprise and Support Training Microsoft Confidential
Permission Checker Model
(“MSWC.PermissionChecker”)
Methods
Trang 79Microsoft Enterprise and Support Training Microsoft Confidential
Trang 80Microsoft Enterprise and Support Training Microsoft Confidential
Publications
Publications