Tutorial: IIS - ASP Configuration
Dr. Thomas E. Hicks
Computer Science Department
Trinity University
1] You will need your windows CD. Go to your control panel and start "Add Remove
Programs". (See Below!)
2] Push the Add/Remove Windows Components button in the side bar on the left. (See Below!)

3] I am going to select more functionality than you perhaps need. Using your mouse, double-click on Application Server. (See Below!)

4] Using your mouse, double-click on Internet Information Services (IIS). (See Below!)

5] Select Common Files, File Transfer Protocol (FTP) Services, Front Page 2002 Server Extensions, and Internet Information Services Manager from the Internet Information Services (IIS) console. Using the mouse, select/push the OK button. (See Below!)

6] Select Application Server Console, ASP.NET, Enable network COM+ access; note that Internet Information Services is already partially selected from the window above. Using the mouse, select/push the OK button. (See Below!)

7] Using the mouse, select/push the Next button. (See Below!)

8] You will generally be given an opportunity to insert your original windows CD. We are not going to use the CD; we will explain shortly. Go ahead and place yours in the computer. Using the mouse, select/push the OK button Using the mouse, select/push the OK button. (See Below!)

9] During our install with XP/2000/2002-Server/2003-Server, we copy the I386 directory from the install CD to the root of drive C. You can see such a directory below. We are going to use this directory to complete our install. (See Below!)

10] Since we have no windows CD in the drive, we get an opportunity to direct the install process to C:\I386. (See Below!) Use the mouse to select/push the OK button. (See Below!)

11] Let your install continue; it will often take a few minutes.

12] We are now finished. Using the mouse push/select the Finish button. (See Below!)

13] Depending upon the new items you have added, you may or may not be asked to restart your computer. If you are asked to restart the computer, please do so. If not, use the mouse to close the Add or Remove Programs console as I have done below.. (See Below!)

1] The first time install will select C:\Inetpub\wwwroot as the default location for web sites. Microsoft will place some files in that directory; I recommend that you erase them all. If you already have some files in that directory, you are welcome to leave them. (See Below!)

2] Use any text or web site editor to create a file, called index.html, in directory C:\Inetpub\wwwroot. Place the following source code in the file. (See Below!)

3] You should be able to see the file in directory C:\Inetpub\wwwroot.
(See Below!)
1] We are going to attempt to load the web page created above.
Direct your favorite browser to
http://localhost/index.html. Localhost is the default name for the web
server on this system. (See Below!)

2] If your page does not load, check to make sure that the web server is running.
1] I recommend that you take a moment and follow the directions below whether
your page renders above, or not. Using the mouse, go to your Administrative
Tools --> Select the Internet Information Services (IIS) Manager applet. (See Below!)
2] My computer name is Net1. Select the '+' beside your local computer to
expand your choices in the left menu bar above. Select the '+'
beside Web Sites to expand your choices in the left menu bar above.
There should be a Default Web Server in your Web Sites; select it with the
mouse. (See Below!)

3] The
button will stop web service in our
Default Web Site. You can see that our page is no longer displayed. If your site
is running, stop it and try to render
http://localhost/index.html
once again.

4] The
button will start web service in our
Default Web Site. Try starting your site. Reload your page. Reload page
http://localhost/index.html
once again. We hope that it looks like the following:
2] If your page does not load, check to make sure that the permissions on the page are correct.
1] Let us look at the permissions that Microsoft configured for
c:\Inetpub. Right mouse click on Inetpub and
select Properties. (See Below!)
2] We are interested in the Security Permissions. Select the Security Tab. Note
the presence of the Internet Guest Account; the info in parentheses will vary. I
initially recommend that you give the Internet Guest Account Modify permissions;
you can tighten this security later. (See Below!)

3] I am user thicks. If I am to add files, delete files, modify files, etc., it is best that I have full control of the Inetpub folder. Make sure you have full control.

4] Everyone, i.e. the other users of this computer, should generally have Read, Execute, and List permissions. (See Below!)

5] The administrators should generally have full control of the entire web site. (See Below!)

6] The permissions above are good starting permissions for Inetpub and wwwroot. File index.html must also have the correct permissions. Check to make sure the Internet Guest Account has access. (See Below!)

7] At this point, I hope you can see the page.

1] We will need to change some of the web site properties in
order to use ASP. Using the mouse, go to your Administrative Tools -->
Select the Internet Information Services (IIS) Manager applet. (See Below!)
2] Return to the Default Web Site as you did above. Using the mouse, right mouse click on the Default Web Site and select Properties (See Below!)

3] Web Site Tab: I use the default configuration. (See Below!)

4] Performance Tab: I use the default configuration. (See Below!)

5] ISPI Filters Tab: I use the default configuration. (See Below!)

6] Home Directory Tab: There are several changes on this tab. I later restrict browsing, write permissions, etc. (See Below!)

7] Documents Tab: Most of the world uses index.asp as the default ASP page; add that to your list. Most of the world uses index.html as the default web page; add that to your list. Most of the world uses default.aspx as the default .NET page; add that to your list. (See Below!)

8] Directory Security Tab: I use the default configuration. (See Below!)

9] HTP Headers Tab: I use the default configuration. (See Below!)

10] Custom Errors Tab: I use the default configuration. (See Below!)

11] ASP.NET Tab: Select the latest version of ASP.NET installed on your computer. (See Below!)

12] Server Extensions 2002 Tab: I use the default configuration. (See Below!)

13] Return to the Internet Information Services Manager. Using the mouse, right mouse select the Web Server Extensions folder on the left. To the right you can see my recommended settings. If you have ASP.NET v3, or later, installed, allow that too! (See Below!)

1] Let us return to your default web site folder --> C:\Inetpub\wwwroot. (See Below!)

2] Use any text or web site editor to create a file, called index.asp, in directory C:\Inetpub\wwwroot. Place the following source code in the file. (See Below!)

3] You should be able to see the file in directory C:\Inetpub\wwwroot. (See
Below!)
4] We are going to attempt to load the web page created above. Direct your
favorite browser to
http://localhost/index.asp. Localhost is the default name for the web
server on this system. (See Below!)
1] All scripting files must be executed through your IIS system. Some of my
student have been know to open the file by holding down the File Menu and
selecting Open File. (See Below!).

2] They navigate to directory C:\Inetpub\wwwroot and select index.asp. (See Below!)

3] Unfortunately, what they see is the ASP code. When you run ASP code, you should never see the file:/// stuff in the location bar at the top of your browser. YUK (See Below!)

4] You can render your page from your machine by entering http://localhost/index.asp in the web address bar. (See Below!).

5] How can you render your page from another computer on the network? First we need your IP address. Start a command window and enter ipconfig to obtain your IP address. (See Below!).

6] I can render my page from your machine on my network by entering http://192.168.1.151/index.asp in the web address bar. You can do likewise with your IP address. Try it. Simply substitute your IP address for localhost. (See Below!).

7] My computer is also registered in our DNS Server as Net1.cs.trinity.edu. When I am connected on campus, I can also access my page by entering either http://Net1.cs.trinity.edu./index.asp or http://Net1.cs.trinity.edu.
Most of you will not be using systems registered in a DNS server, but if you did, the page would be available to any computer on the Internet (assumming that firewalls permitted the traffic into your site). (See Below!).
1] Once again, direct your browser to http://localhost/index.html. (See Below!)

2] To view the source code with Firefox, hold down the View Menu and select Page Source. (See Below!)

3] Note that all of the HTML Source Code is visible. (See Below!)

4] To view the source code with Internet Explorer, hold down the View Menu and select Source. (See Below!)

5] Note that all of the HTML Source Code is visible with this browser as well. (See Below!)

1] Once again, direct your Firefox browser to http://localhost/index.asp. To view the source code with Firefox, hold down the View Menu and select Page Source. (See Below!)

2] Note that none of the ASP Source Code is visible. Note that the HTML code is visible. The ASP code was translated at the server and what you see below is the code rendered by the server (See Below!)

3] The ASP Source code blocks start with
<% and end with %> The code is colored maroon below. Note that you do not see Dim X or X =25 or any of the rest of the ASP code in the file code listing above. This offers much more security. (See Below!)

4] Let us make sure that IE does the same thing. Once again, direct your Internet Explorer browser to http://localhost/index.asp. To view the source code with Internet Explorer, hold down the View Menu and select Source. (See Below!)

5] Note that none of the ASP Source Code is visible. Note that the HTML code is visible. This would also be the case for all other browsers. (See Below!)
