Top Banner
4/8/99 C. Edward Chow Page 1 Internet Services Manager Click Start | Programs | Administrative Tools | Internet Services Manager
28

4/8/99 C. Edward Chow Page 1 Internet Services Manager Click Start | Programs | Administrative Tools | Internet Services Manager.

Dec 21, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 4/8/99 C. Edward Chow Page 1 Internet Services Manager Click Start | Programs | Administrative Tools | Internet Services Manager.

4/8/99 C. Edward Chow Page 1

Internet Services Manager

Click Start | Programs | Administrative Tools | Internet Services Manager

Page 2: 4/8/99 C. Edward Chow Page 1 Internet Services Manager Click Start | Programs | Administrative Tools | Internet Services Manager.

4/8/99 C. Edward Chow Page 2

Virtual Server & Virtual Directory

Page 3: 4/8/99 C. Edward Chow Page 1 Internet Services Manager Click Start | Programs | Administrative Tools | Internet Services Manager.

4/8/99 C. Edward Chow Page 3

Virtual Directory

Page 4: 4/8/99 C. Edward Chow Page 1 Internet Services Manager Click Start | Programs | Administrative Tools | Internet Services Manager.

4/8/99 C. Edward Chow Page 4

Remote Virtual Directory

Page 5: 4/8/99 C. Edward Chow Page 1 Internet Services Manager Click Start | Programs | Administrative Tools | Internet Services Manager.

4/8/99 C. Edward Chow Page 5

Virtual Server (2.0&3.0)

Page 6: 4/8/99 C. Edward Chow Page 1 Internet Services Manager Click Start | Programs | Administrative Tools | Internet Services Manager.

4/8/99 C. Edward Chow Page 6

Add IP Aliase in TCP/IP Property

Page 7: 4/8/99 C. Edward Chow Page 1 Internet Services Manager Click Start | Programs | Administrative Tools | Internet Services Manager.

4/8/99 C. Edward Chow Page 7

Add IP Aliases

Page 8: 4/8/99 C. Edward Chow Page 1 Internet Services Manager Click Start | Programs | Administrative Tools | Internet Services Manager.

4/8/99 C. Edward Chow Page 8

MS Management Console (4.0)

Page 9: 4/8/99 C. Edward Chow Page 1 Internet Services Manager Click Start | Programs | Administrative Tools | Internet Services Manager.

4/8/99 C. Edward Chow Page 9

Action Menu

Page 10: 4/8/99 C. Edward Chow Page 1 Internet Services Manager Click Start | Programs | Administrative Tools | Internet Services Manager.

4/8/99 C. Edward Chow Page 10

Remote IIS Management

• To enable remote use of Internet Service Manager (HTML) to administer this server, go to the server and use Internet Service Manager to update the IP address restrictions for the Web site IISADMIN:– Use the start menu to open Internet Service Manager – Expand the Web Site you are connecting to – Select the IISADMIN Virtual Directory – Right mouse click and select properties – Select the directory security tab – Edit the IP address and domain name restrictions

Page 11: 4/8/99 C. Edward Chow Page 1 Internet Services Manager Click Start | Programs | Administrative Tools | Internet Services Manager.

4/8/99 C. Edward Chow Page 11

Active Server Page

• It is a server-side scripting environment for creating dynamic content.

• ASP are files with .asp extension, containing HTML tags, text, and script commands.

• Provides an “easy-to-use” alternative to CGI and ISAPI. • Allow content developers to embed any ActiveX script

language or server component into their HTML pages. Tutorial available through option pack menu.

• Provide access to ODBC (Open Data Base Connectivity) connector.

• Typical VBscript (Visual Basic Scripting Edition) is used to provide dynamic content. MS JScript.

Page 12: 4/8/99 C. Edward Chow Page 1 Internet Services Manager Click Start | Programs | Administrative Tools | Internet Services Manager.

4/8/99 C. Edward Chow Page 12

Create ASP with DB access

• Create an Signup MS Access Database, signup.mdb on the NT workstation right by Bilbo.

• Transfer the signup.mdb to the c:\cs401\scripts directory on Frodo NT server.

• Setup ODBC system Data Source Name for the signup.mdb.• Create a virtual directory with aliase cs401scripts with physical path c:\

cs401\scripts using MS management console.• Create a search.htm web page using FrongPage or other editor. It asks

for the last name in a form and submit the request to retrieve the whole record of the signup database. Put the search.htm in c:\cs401\www.

• Create a virtual directory with alias cs401www with physical path c:\cs401\www using MS management console.

• Create an Active Server Page, response.asp, which o uses VBscript to retrieve the last name from the form input,o accesses the signup database for the recordo return a web page in a table format with all the record with last name

matching the input.

Page 13: 4/8/99 C. Edward Chow Page 1 Internet Services Manager Click Start | Programs | Administrative Tools | Internet Services Manager.

4/8/99 C. Edward Chow Page 13

Create a signup MS Access Database

Select Start | Programs | Microsoft Access Click the "Blank Database" in "Creating a New

Database Using" pane. Click OK. Enter "cs401signup" as the file name for the database.

Click Create. In the table tab (default) of the cs401signup database

window, click New. In new Table, click the Design View and click OK. Enter the field names (LastName, FirstName, and

Address) of the table. You can change the field size. Save the table name as signup (default is table1).

Page 14: 4/8/99 C. Edward Chow Page 1 Internet Services Manager Click Start | Programs | Administrative Tools | Internet Services Manager.

4/8/99 C. Edward Chow Page 14

Create Database

Page 15: 4/8/99 C. Edward Chow Page 1 Internet Services Manager Click Start | Programs | Administrative Tools | Internet Services Manager.

4/8/99 C. Edward Chow Page 15

Specify Field names

Page 16: 4/8/99 C. Edward Chow Page 1 Internet Services Manager Click Start | Programs | Administrative Tools | Internet Services Manager.

4/8/99 C. Edward Chow Page 16

Create table for the DB

• Click x icon on the upper right corner. Click Yes to confirm saving the table.

• Enter “signup” as the table name.

• Click No on creating primary key.

• It shows the signup table was created.

• Double click it or click open.

• Enter several entries of the table.

Page 17: 4/8/99 C. Edward Chow Page 1 Internet Services Manager Click Start | Programs | Administrative Tools | Internet Services Manager.

4/8/99 C. Edward Chow Page 17

Setup ODBC on Win2000 Server• Start | Programs | Administrative Tools | Data Sources (ODBC)• On NT server, click on ODBC data source icon on control panel

Page 18: 4/8/99 C. Edward Chow Page 1 Internet Services Manager Click Start | Programs | Administrative Tools | Internet Services Manager.

4/8/99 C. Edward Chow Page 18

Add MS Access DB• Click System DSN and Add.• Select MS Access Driver (*.mdb). Click Finish.

Page 19: 4/8/99 C. Edward Chow Page 1 Internet Services Manager Click Start | Programs | Administrative Tools | Internet Services Manager.

4/8/99 C. Edward Chow Page 19

ODBC MS Access Setup• Enter Data Source Name (cs401signup)

• Enter Description as (cs401 asp DB)

• Click Select on Database pane and select the e:\cs401\scripts\cs401signup.mdb

Page 20: 4/8/99 C. Edward Chow Page 1 Internet Services Manager Click Start | Programs | Administrative Tools | Internet Services Manager.

4/8/99 C. Edward Chow Page 20

Create Script Virtual Directory

• Create c:\cs401\scripts directory• Select Start | Programs | Administrative Tools | Internet Service

Manager• Select Oblib, default web site (click + symbol to the left of Oblib

if you did not see default web site.• Select the action menu | new | virtual directory• You will guide through the Virtual Directory Creation Wizard.• Enter cs401scripts as alias• Enter/browse physical path c:\cs401\scripts • Check only the “Run scripts (such as ASP) and “Execute (such

as ISAPI applications and CGI).• Click Finish.

Page 21: 4/8/99 C. Edward Chow Page 1 Internet Services Manager Click Start | Programs | Administrative Tools | Internet Services Manager.

4/8/99 C. Edward Chow Page 21

Create Query Form Web Page

• Create a signup DB search web page with form input. It asks for the last name in a form and submit the request to retrieve the whole record of the signup database.

<form METHOD="post" ACTION="/cs401scripts/response.asp“>

LastName: <input NAME="LastName" SIZE="30"> <input TYPE="submit" value="submit">

</form> • Put the search.htm in c:\cs401\www.

Page 22: 4/8/99 C. Edward Chow Page 1 Internet Services Manager Click Start | Programs | Administrative Tools | Internet Services Manager.

4/8/99 C. Edward Chow Page 22

cs401www Virtual Directory

• Follow the same step to create the cs401www virtual directory with cs401www as alias and c:\cs401\www as physical directory.

• For access permission only check “Read” option.• Create an Active Server Page, response.asp, which

– uses VBscript to retrieve the last name from the form input,

– accesses the signup database for the record– return a web page in a table format with all the

record with last name matching the input.

Page 23: 4/8/99 C. Edward Chow Page 1 Internet Services Manager Click Start | Programs | Administrative Tools | Internet Services Manager.

4/8/99 C. Edward Chow Page 23

Response.asp<%@ LANGUAGE = VBScript %><% ' ON ERROR RESUME NEXT Set Conn = Server.CreateObject("ADODB.Connection") Set RS = Server.CreateObject("ADODB.RecordSet") Conn.Open “cs401signup" key = Request.Form("LastName") sql="select * from signup

where LastName='" & key &"'" RS.open sql,conn %>

Page 24: 4/8/99 C. Edward Chow Page 1 Internet Services Manager Click Start | Programs | Administrative Tools | Internet Services Manager.

4/8/99 C. Edward Chow Page 24

Response.asp (2)

<HTML><HEAD><TITLE> signup response.asp File </TITLE></HEAD>

<BODY BGCOLOR="WHITE"><center>

<% IF RS.RECORDCOUNT = 0 THEN %><font size="5"><b>No match result</b></font><% end if %>

Page 25: 4/8/99 C. Edward Chow Page 1 Internet Services Manager Click Start | Programs | Administrative Tools | Internet Services Manager.

4/8/99 C. Edward Chow Page 25

Response.asp (3)<table border=3 width=410> <%Do While Not RS.EOF %> <tr> <td width=170 valign=top> <FONT SIZE=4 COLOR=RED><% =rs("LastName") %> </font> </td> <td width=170 valign=top> <FONT SIZE=4 COLOR=RED><% =rs("FirstName") %> </font> </td> <td width=170 valign=top> <FONT SIZE=4 COLOR=RED><% =rs(“Email") %> </font> </td> </tr> <% RS.MoveNext Loop %>

Page 26: 4/8/99 C. Edward Chow Page 1 Internet Services Manager Click Start | Programs | Administrative Tools | Internet Services Manager.

4/8/99 C. Edward Chow Page 26

Response.asp (4)

<%

rs.close

set conn=nothing

%>

</TABLE>

</BODY>

</HTML>

Page 27: 4/8/99 C. Edward Chow Page 1 Internet Services Manager Click Start | Programs | Administrative Tools | Internet Services Manager.

4/8/99 C. Edward Chow Page 27

Homework #8: IIS, DB, ASP• Create a directory c:\cs401<login> with subdirectories www, cgi-bin, and wind. Here <login>

is your login name on CS Unix machines.• Create a virtual directory with alias c:\cs401<login> and home dir= c:\cs401<login>\www. Put

your personal web page there.• Create a virtual host web site wind.

– Start | Programs | Administrative Tools | Internet Services Manger– Select default web site. – Select Action menu | new | site– Web site creation wizard will guide you through virtual sever creation.– Enter description. – Enter IP address 128.198.192.204 and Host header as wind.– In Web Site home directory enter path c:\cs401\wind– Select access permission, read and run scripts; click finish.

• Setup IP alias. Go to settings | network and dial up connections | local area connection1 | properties | scroll down to select TCP-IP; click properties | advanced | add ; enter IP address 128.198.192.204.

• Create a simple web page with “wind.ucs.edu/csnet IIS5.0 server by <login>” in c:\<login>\wind\default.htm

Page 28: 4/8/99 C. Edward Chow Page 1 Internet Services Manager Click Start | Programs | Administrative Tools | Internet Services Manager.

4/8/99 C. Edward Chow Page 28

Homework #8 (2)

• Create a Microsoft access database, called “cs401<login>catalog”, with a few catalog items, including fields such as name, ID, price.

• Save cs401<login>catalog.mdb under c:\cs401<login>\cgi-bin

• Setup ODBC entry.• Modify search.htm and response.asp and put them in c:\

cs401<login>\www and cgi-bin directory.• Access search.htm to retrieve catalog items.• Turn in hard copy of

– http://oblib/cs401<login>/search.htm and the searech result web page.

– Your virtual directory web page http://oblilb/cs401<login >– The virtual server web page http://wind/cs401<login>