Tutorial: MSSQL - Web - Enable Visual Studio .NET Website
Dr. Thomas E. Hicks
Computer Science Department
Trinity University
1] This tutorial demonstrates how to configure and host a .NET Website in
such a way that it can be opened remotely from other computers. It examines the
IIS configuration, the .NET configuration, and the file permissions necessary to
make this a reality.
1] The IIS Configuration must be configured to support .NET web sites. Double-check your settings! Start the Internet Information Services. Right-mouse click on the Default Web Site and select Properties. (See Below!)

2] The General Tab should generally be configured the following:
(See Below!)
3] The Performance Tab should generally be configured the following:
(See Below!)
4] The ISAPI Filters Tab may have some applications from your installs,
but mine looks like the following: (See Below!)
5] I use my web site for PHP, ASP, and .NET. My Home Directory Tab is
configured as follows: (See Below!) For .NET you don't have to have
the directory browsing or the script source access.
6] Select/push the Configuration button: (See Below!)
7] The Configuration->Mappings Tab need not be changed and is as follows:
(See Below!)
8] The Configuration->Options Tab is as follows: (See Below!)
9] The Configuration->Debugging Tab is as follows: (See
Below!)
10] The Documents Tab may have many default values. None of them are
required if you have enabled browsing. I use index.asp for my ASP scripting. I
use index.html for my regular web stuff. I use index.php for my PHP scripting. I
use Default.aspx for my .NET. (See Below!) I encourage you to
include at least Default.aspx for my .NET.
11] The Directory Security Tab generally need not be changed:
(See Below!)
12] If you want to double-check your authentication, select the Edit
button: (See Below!)
13] The Directory Security-> Authentication Methods Tab should generally be configured the following: (See Below!) Your IIS user will appear instead of IUSER_NET4.
14] If you want to double-check your IP Address and Domain Name
restrictions, select the Edit button. (See Below!)
15] The Directory Security-> IP Address Tab should generally be configured
the following: (See Below!) You need to make sure that the system
you are using to remotely access your web site is granted access --> Not
Blocked!

16] The HTTP Headers Tab generally need not be changed:
(See Below!)
17] The Custom Errors Tab generally need not be changed:
(See Below!)
18] You must be using ASP .NET version 2.x or higher. 3.0, c.5, etc is
fine. The ASP .NET Tab can not use version 1.x: (See Below!)
19] The Server Extensions 2002 Tab should generally be configured the
following: (See Below!)
20] The security settings on this tutorial are weak - I generally recommend that my students begin to tighten security after they get the web site to post!
1] I recommend that my students configure the Internet Web Service
Extensions as follows: (See Below!)
2] The security settings on this tutorial are weak - I generally recommend that
my students begin to tighten security after they get the web site to post!
1] All of the web distribution normally occurs in C:\Inetpub: Right-mouse click on the folder and select Properties: (See Below!)

2] Select the Security Tab: (See Below!)
3] Suppose I enabled full control to all administrators and myself
(thicks) and had no other authenticated users. (See Below!)

4] I want to make sure that the IIS works for HTML pages. I have Tom.html in C:\Inetpub\wwwroot.
(See Below!)

5] You can see Tom.html in the design view of FrontPage below. (See
Below!)

6] I am going open my browser on another computer and am going to try to
access the Net4 website. I could enter either the static IP Address
(131.194.71.112) or I can enter the equivalent DNS entry to the static IP
(net4.cs.trinity.edu) in my browser window. (See Below!)
7] The way I have the directory permissions, only members of the
Administrators group and thicks have access to the directory. I could enter my
password and work if that were desirable. NOT! (See Below!)
8] I am going to return to the Inetpub directory and add read and execute
permission for the Internet Guest Account user (See Below!) This user is
generally IUSR_ followed by the name of your computer (mine is NET4).
9] I would like to make sure that all of the files in the Inetpub directory have
these same permissions. You can do so, if desirable. Push the Advanced button :
(See Below!)
Select Replace Permission Entries On All Child Objects ... Push The OK
button. This will make sure that all files in the Inetpub directory are
available to the Internet User. (See Below!)
10] Now I am returning to the browser on another computer and and am
once more directing the browser to net4.cs.trinity.edu. Note that I do not need
to log on any longer.. (See Below!)
11] When I press the link to Tom.html I get the following: (See
Below!) I now have normal HTTP web access.
12] I want to make sure that the IIS works for ASP pages. I have Tom.asp in C:\Inetpub\wwwroot.
(See Below!)
13] You can see Tom.asp in the design view of FrontPage below. (See
Below!)
14] If we ping net4.cs.trinity.edu, we can see that the static IP Address
associated with Net4 is 131.194.71.112.
(See Below!)
15] I am going open my browser on another computer and am going to try to
access the 131.194.71.112 website. (See Below!)
16] When I press the link to Tom.asp I get the following: (See
Below!) I now have normal ASP web access.
17] Download Tom.html and Tom.asp if you like.
1] Start Visual Studio. Using the mouse, hold down the File Menu --> Select New --> Select Web Site... (See Below!)

2] Select the ASP .NET Web Site template. Let us create this web application in a folder, called Web1, in directory C:\Inetpub\wwwroot so that the web application will acquire the current web file permissions. (See Below!)

3] I have created the following super simple .NET web page. (See Below!)

4] No matter where you store the Visual Studio Web App, it will create sort of a virtual web site that is associated with a negotiated port on your computer. The port below is 1980, but this will vary. The normal port associated with IIS is port # 80.(See Below!)

5] This port is available only on this computer and only during this working
with visual studio. While I am working with Visual Studio on this web site, I
can start another browser and load
http://localhost:1980/Web1/Default.aspx
it will continue to work until I exit Visual Studio. Note that I have the same
web site open with both Internet Explorer and Firefox. (See Below!)
6] Once we close the Visual Studio Programming environment and then try to open
a browser to the port, we are unsuccessful because the port is no longer
available. (See Below!)
7] Once again, I am going open my browser on another computer and am
going to try to access the Net4 website. I could enter either the static IP
Address
(131.194.71.112) or I can enter the equivalent DNS entry to the static IP
(net4.cs.trinity.edu) in my browser window. (See Below!)
8] Suppose we decide to open Web1 above. The IIS is properly
configured, but the file access permissions are not yet configured to enable us
to start the site. (See Below!)




1] Return to the file permissions for c:\inetpub.
2] The IWAM_NET4 user is needed to access a .NET web site. This user is
generally IWAM_ followed by the name of your computer (mine is NET4). This user
needs at least Read and Execute permissions as outlined below.
(See Below!) Make sure that all of the files in the Inetpub directory have these
same permissions.
3] Once again we decide to open Web1 above. The IIS is properly configured. The permissions are closer, but they are not yet configured to enable us to start the site. (See Below!)

4] The windows authentication can be completed by adding either Everyone group
or the Users group to the access permission list. This user needs at least Read
and Execute permissions as outlined below.
(See Below!) Make sure that all of the files in the Inetpub directory have these
same permissions.
5] Either one of these will render your web site without Visual Studio open or
running.
(See Below!)