01 Getting Setup

bubblemessengerΑσφάλεια

5 Νοε 2013 (πριν από 3 χρόνια και 5 μήνες)

71 εμφανίσεις


1



01


Getting Setup



Preliminaries


1.

In this class we will learn how to create
ASP.NET web applications
.


2.

The CS lab is setup to create and run ASP.NET web applications using:


a.

Visual Studio 2003

b.

.NET framework 1.1

c.

SQL Server 2000


3.

If you plan to use
the lab for all your work,
read no further
. If you plan to work at home, I have some
suggestions. However, these are not guaranteed to work for you and I can offer very little help if you
run into problems. You may have to use Google. With that said, if yo
u plan to work at home, you
should get started as soon as possible to get your system setup to create and run ASP.NET web
applications.

Although there are IDE’s to develop .NET applications on non
-
Microsoft machines, th
ese

suggestions assume that you are u
sing a Windows machine.


Step 1


Install IIS


1.1

Check to see if you have
IIS

(Internet Information Services) installed: Right
-
click
My Computer

then
choose:
Manage
/
Services and Applications
/
Internet Information Services
. If you see this, then skip to
Step
2.


1.2

Install IIS on your computer. You’ll need your Win XP Pro disc. (Not sure if Pro is required or other
versions work). Go to
Add/Remove programs

and choose
Add windows component

on the left of the
dialog. Find
Internet Information Services
, check it. Th
en, drill down from there (Under IIS) and
check Front Page 2000 extensions. Follow wizard from there.

Return to Step 1.1.


Step 2


Acquire Visual Studio 2003 Software


2.1

You can get the Visual Studio 2003 software for free from the
Microsoft Developer Netw
ork
Academic Alliance

(MSDNAA). To do this, you need to g
et an account for the MSDN
AA

from the
lab manager,

William Freelove (
whfreelo@valdosta.edu
)
.


2.2


Login to the MSDNAA at:


http://msdn05.e
-
academy.com/elms/Storefront/Home.aspx?campus=valdosta_mathcs


From there, choose
Software

and then
Visual Studio .NET 2003 Professional
. Do NOT choose the
2005 software.
We will use 2003 and it is not compatible with 2005.

Yo
u do not need any other
software.




2


Step 3


Insta
l
l Visual Studio 2003 Software


3.1

Install
MS Visual Studio 2003

including the MSDN

(this is the
Help
. Trust me, you want help. The
MSDN is incredibly useful.
)

The complete installation can take a while.


St
ep
4



Configure
System Settings


4.1

Check several things:


a.

Right
-
click
My Computer

then choose:
Manage
. This opens the
Computer Management
program.

b.

Choose:
Services and Applications
, Internet Information Services,

and then

Web Sites
.

c.

Right
-
click
Default We
b Site

and choose
Properties
.

This opens the
Default Web Site Properties
dialog.

d.

Choose the
ASP.NET

tab and change the version to 1.1 if it is listed as 2.0
. My version is listed as
1.1.4322.

e.

Also, on this diaglog, c
hoose the
Home Directory

tab and make su
re
Script source access
,
R
ead
,
and
W
rite

are checked
.

f.

M
ake sure
Execute Permissions

is set to
Scripts and Executables
.

g.

Click
OK

and then close the
Computer Management
program.


4.2

Set ASP.NET
machine account
permissions:


Note: in my most recent installation
, I did not have to do the steps below. However, you do want to
make sure you have a
Security

tab (steps
a

and
b

below).


a.

I
n Windows Explorer drill down to
c:
\
inetpub

and select the
wwwroot

folder
.

b.

Right
-
click

wwwroot
and choose: P
roperties
, then choose t
he S
ecurity

tab
. I
f you don’t have a
security tab, see
Step 4.3 below
.

c.

In the
Group or user names

list box, f
ind
ASP.NET machine account
(...)
.

If it is not there, choose
the
Add

button
and type
aspnet

(no period between) and it should find it.

d.

S
elect
the

ASP.NET machine
account
. The corresponding
Permissions

are shown in the list box
below. Make sure
:
M
odify
,
R
ead

and

E
xecute
,
L
ist

F
older

C
ontents
,
R
ead
,
Write

are checked.

e.

Click
OK
.


4.3

If you don’
t have a Security tab:


a.

Launch Windows Explorer or My Compute
r.

b.

Choose

the
Tools

menu

and
then
Folder Options
.

c.

Choose

the

View

tab.

d.

In the
Advanced Settings

list box
, uncheck
Use simple file sharing (Recommended)
. Note, this
may be the last item in the list box.


e.

Click
OK
.


If you still don’t have a Security tab:




f.

Drill down to
c:
\
inetpub

and right click the
wwwroot

folder and select
properties.

g.


Click on the
Sharing

tab and click the
Share this folder.
Leave the
Share Name

as it is *it should
be wwwroot*. Click
Ok

then
Apply
.


3

h.

Right click the
wwwroot
and there s
hould be a
Security
tab. Go back to step 4.2 above.



4


Step 5


Test Visual Studio


5.1

Run Visual Studio
:


a.

Choose
:
File
,
New
,
Project
. The opens the
New Project

dialog.

b.

For the
Project Types

select
Visual C# Projects
.

c.

For the
Template

select
ASP.NET Web App
lication
.

The dialog will look something like this:




d.

Choose OK to create a project in the default location, probably:
http://localhost/WebApplication1
.

If this fails, you must go back to
S
tep
4. You migh
t try changing the
IUSR...

account permissions.

Also, you may simply need to start IIS (Right
-
click
MyComputer
, and choose
Manage
,
Services
and Applications
,
Internet Information Services
,
Web Sites
. Then, right
-
click
Default Web Site

and choose
Start
.)

e.

If

the project was created successfully,
then run it by pressing:
Ctrl+F5
.

f.

If your browser is launched and
WebForm1.aspx

is displayed (an empty page), then,
Congratulations
!
You are
ready to

creat
e and run asp.net applications on your computer.

g.

If
your brows
er is launched but you get an error message,
read
it
carefully. You
might

have an
error writing temporary files to a location on your hard

drive (it will show you the path), a
location like: c:windows
\
temp
\
microsoft.net
\
framework
\
v1.4....
\
temporary asp.net

files. If so, you
may have to go to that location and give the asp.net machine account some more permissions
, or
some other account VS account
.