Microsoft .NET Framework
Installation - First Steps
Last Updated on 02/08/06
This web page has steps to download, install, and test the .NET
Framework.
The steps below were tested using: Win
XP Professional & IIS v5.0
Version Info
You may want to determine what versions are currently loaded on
your computer.
- Redistribution Package
- ASP.NET version info
-
Create a batch file in your Framework root directory (ie:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 ) of the Framework
redistribution package called:
zzzCustomRegisterASPNET_versions.bat
-
Place the following commands in the .bat file.
aspnet_regiis.exe -?
aspnet_regiis.exe -lv
aspnet_regiis.exe -lk
pause
-
Example of Results if
NO Framework
is Registred.
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis.exe
-lv
1.1.4322.0 Valid C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\asp
net_isapi.dll
2.0.50727.0 Valid C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\as
pnet_isapi.dll
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis.exe -lk
Cannot find any installed version.
-
Example of Results if a Framework is Registred.
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis.exe
-lv
1.1.4322.0 Valid C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\asp
net_isapi.dll
2.0.50727.0 Valid C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\as
pnet_isapi.dll
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis.exe -lk
W3SVC/ 2.0.50727.0
W3SVC/1/ROOT/MSMQ/ 2.0.50727.0
W3SVC/1/ROOT/Printers/ 2.0.50727.0
-
-lv - Lists all the installed versions of ASP.NET.
Status: Valid or Invalid. Look at the installation path to find
the version.
-
-lk - List of keys w/ version info.
(Note: If a framework is not registered with IIS you will get the
message: Cannot find any installed version.)
-
-l? - Lists the options.
- Registering a later version of ASP.NET with IIS
- Do this section when you are referred to it in the "First Steps"
below.
- Create a batch file in your Framework root directory
(ie: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727) called
zzzCustomRegisterASPNET.bat
- Place the following commands in the .bat file.
aspnet_regiis.exe -u
aspnet_regiis.exe -i
pause
- Then run the .bat file. It will unregister the
current version of ASP.NET and register the latest version
of ASP.NET that you have installed.
First Steps - MS IIS - Enable ASP pages
- XP & MS IIS v5.0
- We need to make sure that IIS is configured to run ASP pages.
- Launch IIS Manager (Start, Administration Tools, Internet
Information Services).
- Right click on "Default Web Site" and choose properties.
- Click on the "Home Directory" tab.
- Execute Permissions = Scripts only (or Scripts and Executables).
(Note: Application Protection of Medium (Pooled) works for me.)
- Win 2003 Server
- Launch IIS Manager (Start, Administration Tools, Internet
Information Services).
- Select "Web Service Extensions", then select "Active Server Pages",
click "Allow".
- Select "Server Side Includes" and then click "Allow".
First Steps ( Download the Framework (SDK and
Redistributable Package) )
- Download the "Microsoft .NET Framework Redistribution Package"
-
Includes everything you need to run
applications developed using the .NET Framework.
- Do you have .NET Framework support on your PC?
- Start, Control Panel, Add or Remove
Programs
- Look for "Microsoft .NET Framework x.x
(version)"
- Also, you can look in the following
directory for the installed versions: (ex: v2.0.50727)
C:\WINDOWS\Microsoft.NET\Framework
- Download - If you don't have .NET Framework installed then do
the following:
- Download the "Microsoft .NET Framework SDK" -
includes everything developers need to
write, build, test, and deploy .NET Framework applications—documentation,
samples, and command-line tools and compilers. You must install the
.NET Framework Redistributable Package prior to installing the .NET
Framework SDK.
- Do you have the .NET Framework SDK installed on your PC?
- Start, Control Panel, Add or Remove
Programs
- Look for "Microsoft .NET Framework x.x
SDK - ENU"
- Also, you can look for the directory:
c:\Program Files\Microsoft.NET\SDK\
- Download
- http://www.msdn.microsoft.com/webservices/ - then click on
"downloads" on the left menu.
- v1.1 - Click on "Microsoft .NET Framework SDK"
or
v2.0 - Click on ".NET Framework 2.0 SDK and Redistributables"
- Download the file (> 100 meg).
Ex file name: setup.exe
- Note: Visual Studio
.NET 2003 includes the SDK.
- Bit
- x86 - 16 bit - can use
for Win XP.
- x64 - 64 bit - user for
certain servers.
First Steps (.NET v 2.0 )
- Installation - ( Redistribution & SDK for v2.0 - setup.exe - 2.0 -
362.5 MB)
- Make sure you are logged in with an User account that has
Administrative privileges.
- Make sure that all Windows Explorer browser windows are closed (or any
browser). Make sure they are close during the whole install process.
- setup.exe - run this executable (that you downloaded above).
- Welcome Screen - click next
- License Agreement - check, then click next
- Installation Options Screen - make sure you have the following
checked: Quick Start Samples, Tools and Debugger, Production Documentation.
Click next
- Leave the default install path:
c:\Program Files\Microsoft.NET\SDK\
Click "Install"
- When finished, you will need to Reboot your PC.
- Service Packs
- As of 02/08/06 - no known SPs.
- Registering a later version of ASP.NET with IIS
- I would do the following steps to make sure that the latest version
of ASP.NET is registered with IIS. If you don't, you may encounter
errors when you do the "Microsoft's Quick Starts" steps.
- Do the steps in the section at the top called "Registering a later version of ASP.NET with IIS"
Note: Your Framework root directory will be something like:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
- Visual J# .NET v2.0 (J Sharp) (Optional)
-
http://msdn.microsoft.com/vjsharp - Download from here.
- Click "Downloads" on the left.
- Click - "Visual J# Redistributable Packages"
- Click - "Download the Visual J# .NET Redistributable Package
2.0" - save to your PC.
File Name: vjredist.exe
Version: 2.0
Date Published: 1/22/2006
Language: English
Download Size: 3.6 MB
- Run "vjredist.exe"
- Follow the prompts.
- Installation is complete.
- Microsoft's Quick Starts - Testing your install & learning .NET
- Note: You will need to be connected to the Internet to fully
complete these steps because of the SQL Server Express download.
- In IE's Browser open up the following:
C:\Program Files\Microsoft.NET\SDK\v2.0\Samples\StartSamples.htm
- Read the first paragraph.
- FYI - there is also a link to "Configuration Details" that
has some interesting information on manually doing the install instead
of using the .exe above. You do not have to follow any of those
steps because the .exe above will complete these steps for you.
- The next step may take 10 - 30 min to complete.
- Click "Set up the QuickStarts" link. It will run an
.exe that will setup the environment.
Note: The Quickstart Configuration Wizard installs SQL Server Express,
imports four sample databases into SQL Server Express, creates several
Internet Information Services (IIS) virtual directories, and compiles
the SDK Quickstart samples.
- Run the following program:
C:\Program Files\Microsoft.NET\SDK\v2.0\Samples\Setup\ConfigSamples.exe
(Note: If you get an error while installing, see my
error section below.)
- Welcome screen - Read the notes about the install then click "Next".
- SQL Server Express screen - Read then click "Next".
Download and Install - this option will download the install software
from Microsoft.
(Note: If you all ready have SQL Server or Express loaded on you
PC you can skip this. If you choose download and the install
senses that it doesn't need to install the software the you will later
be prompted about that.)
Error:
Virtual Directory Registration (failed): [Fail] Failed to install
ASP.NET Scriptmaps. Command: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe
-s W3SVC/1/ROOT/QuickStartv20
- Configure SDK QuickStarts screen - read this screen the click "Next"
- Register ASP.NET with IIS.
- Download & Install SQL Server Express
- Create virtual directories in IIS - ( QuickStartv20 - c:\Program
Files\Microsoft.NET\SDK\v2.0\QuickStart )
- Install QuickStart DB
- Build QuickStart sample web apps.
- If the install is successful then you see the screen titled:
Competed the SDK QuickStart Configuration Wizard. If not, see
my section on "Install Errors" below.
- Click "Finish" to launch the the ".NET Framework SDK QuickStarts"
web app.
- .NET Framework SDK QuickStarts - future launching of web app.
- URL: http://localhost/QuickStartv20 - will be redirected to:
default.aspx (http://localhost/QuickStartv20/default.aspx)
- Error: You see server tags - This is because the server
control tags were not converted into their respecting HTML element
tags by ASP.Net. This happens when ASP.Net is not properly
registered with IIS.
See the section above titled: Registering
a later version of ASP.NET with IIS
- NOTE: Continue to the section below for: C#, VB.NET and
ASP.NET
First Steps (.NET v 1.1 ) - 02/06/06 (Last Updated) (v1.1.4322)
- Installation - ( SDK for v1.1 - setup.exe - 2.0 -
108 MB - Includes Redistribution package.)
- Make sure you are logged in with an User account that has
Administrative privileges.
- Make sure that all Windows Explorer browser windows are closed (or any
browser). Make sure they are close during the whole install process.
- setup.exe - run this executable (that you downloaded above).
- Welcome Screen - click next
- License Agreement - check, then click next
- Installation Options Screen - make sure you have the following
checked:
- Check - Software Development Kit
- Check - SDK Samples
- Documents - will be installed.
- Click Next
- Leave the default install path: (Note: A sub directory will
be created for each version of Framework!)
c:\Program Files\Microsoft.NET\SDK\
Click "Next"
- When finished, reboot your PC.
- Note: Redistribution Package was also installed.
(Ex Location: c:\Windows\Microsoft.NET\Framework\v1.1.4322
)
- Warning: Do not stop here. Make sure you continue.
- Installation - (Redistribution package - v1.1 - )
- If you installed the SDK, you can skip this whole section. (Note:
SDK includes the Redistribution package.)
- Run the executable: dotnetfx.exe
- Have fun!
- Registering a later version of ASP.NET with IIS
- I would do the following steps to make sure that the latest version
of ASP.NET is registered with IIS. If you don't, you may encounter
errors when you do the "Microsoft's Quick Starts" steps.
- Do the steps in the section at the top called "Registering a later version of ASP.NET with IIS"
Note: Your Framework root directory will be something like:
c:\Windows\Microsoft.NET\Framework\v1.1.4322
- Service Packs
- SP1 - Download from the site mentioned above:
Click on: Microsoft .NET Framework Redistributable, then on the next
page look for the link at the bottom of the page:
"Microsoft .NET Framework 1.1 Service Pack 1"
File Name: NDP1.1sp1-KB867460-X86.exe
Version: 1.0
Date Published: 8/30/2004
Language: English
Download Size: 10.2 MB
- Follow the prompts
Click "Complete" if you have the SDK installed.
- Visual J# .NET (J Sharp) v1.1. (Optional)
-
http://msdn.microsoft.com/vjsharp - Download from here.
- Click "Downloads" on the left.
- Click - "Visual J# Redistributable Packages"
- Click - "Download the Visual J# .NET Redistributable Package
1.1" - save to your PC.
File Name: vjredist.exe
Version: 1.1
Date Published: 4/9/2003
Language: English
Download Size: 6.6 MB
- Run "vjredist.exe"
- Follow the prompts.
- Installation is complete.
- Microsoft's Quick Starts (Optional)
- Testing your install & learning .NET
- Note: You will need to be connected to the Internet to fully
complete these steps because of the SQL Server Express download.
- In IE's Browser open up the following:
C:\Program Files\Microsoft.NET\SDK\v1.1\Samples\StartSamples.htm
- Read the QuickStarts section (you can stop at the Tutorials
section).
- FYI - there is also a link to "Configuration Details" that
has some interesting information on manually doing the install instead
of using the .exe above. You do not have to follow any of those
steps because the .exe above will complete these steps for you.
- The next step may take 10 - 30 min to complete.
- Step 1: Click "Download and Install the Microsoft SQL
Server 2000 Desktop Engine (MSDE)" link.
- At the Microsoft site click the link for Step 1: "Download the
Microsoft SQL Server Descktop Engine (42.2 MB).
- Now click "Save".
- Run the executable: "MSDE2000A.exe"
(Note: The default extract directory is:
C:\MSDEReIA)
- Create a batch file in this directory called:
zzzCustomInstallMSDE2000.bat. Run the batch file to install
MSDE2000 (Microsoft SQL Server Desktop Engine).
Setup.exe /qb+ INSTANCENAME=NetSDKSetup.exe /qb+ INSTANCENAME=NetSDK
DISABLENETWORKPROTOCOLS=1 SAPWD=<Your password here>
- When the install is finished, click "OK".
- Note: Reboot your PC.
- Step 2: Click "Set up the QuickStarts" link.
- Click "Run". Click "Run" at the Security prompt.
(Note: Runs the file "ConfigSamples.exe" in the "Samples/Setup"
directory. If you get errors and need to reinstall you may have to
run this EXE manually.)
- Note: Install log is located at: c:\Program Files\Microsoft.NET\SDK\v1.1\Samples\Setup\log.txt
- (Note: My install fails when trying to run the .SQL files.)
- http://localhost/quickstart
- Launch the QuickStart web app.
First Steps - Download Examples for C#, VB.NET, J#
First Steps - C# program
- Create a C# program
- Create a file named "dotnet_installation_first_steps_c.cs" in a directory of your choice.
Enter the following:
(Warning: Doesn't work with v1.1. Works with
v2.0)
static class dotnet_installation_first_steps_c {
static void Main( string[] args ) {
System.Console.WriteLine("Hello World from a C# program");
}
}
- Compile the C# program - create a batch file named "dotnet_installation_first_steps_c_compile.bat"
to compile the new program. Note: You may need to change the path
to the call for sdkvars.bat to match your install of .NET.
Enter the following:
call "c:\Program Files\Microsoft.NET\SDK\v2.0\Bin\sdkvars.bat"
csc.exe /out:dotnet_installation_first_steps_c.exe
dotnet_installation_first_steps_c.cs
pause
- Run the .exe -
Create a batch file named "dotnet_installation_first_steps_c_run.bat"
to run the new program. Note: You may need to change the path
to the call for sdkvars.bat to match your install of .NET.
Enter the following:
dotnet_installation_first_steps_c.exe
pause
WARNING: C#
executables require the .NET Framework to run (ie: our Hello World
example). Remember that the CLR (Common Language Runtime) executes
the .NET application.
Example error:
.NET Framework Initialization Error
To run this application, you first must install one of the following
versions of the .NET Framework: v2.0.50727
Contact your application publisher for instructions about obtaining the
appropriate version of the .NET Framework.
First Steps - VB.NET program
- Create a VB.NET program
- Create a file named "dotnet_installation_first_steps_vb.vb" in a directory of your choice.
Enter the following:
Module dotnet_installation_first_steps_vb
Sub Main()
System.Console.WriteLine("Hello World from a VB.NET program")
End Sub
End Module
- Compile the VB.NET program - create a batch file named "dotnet_installation_first_steps_vb_compile.bat"
to compile the new program. Note: You may need to change the path
to the call for sdkvars.bat to match your install of .NET.
Enter the following:
call "c:\Program Files\Microsoft.NET\SDK\v2.0\Bin\sdkvars.bat"
vbc.exe /out:dotnet_installation_first_steps_vb.exe
dotnet_installation_first_steps_vb.vb
pause
- Run the .exe -
Create a batch file named "dotnet_installation_first_steps_vb_run.bat"
to run the new program. Note: You may need to change the path
to the call for sdkvars.bat to match your install of .NET.
Enter the following:
dotnet_installation_first_steps_vb.exe
pause
WARNING: VB.NET
executables require the .NET Framework to run (ie: our Hello World
example). Remember that the CLR (Common Language Runtime) executes
the .NET application.
Example error:
.NET Framework Initialization Error
To run this application, you first must install one of the following
versions of the .NET Framework: v2.0.50727
Contact your application publisher for instructions about obtaining the
appropriate version of the .NET Framework.
First Steps - Visual J# .NET (J Sharp)
- Coming Soon.
- Note: Here is a quote from the J# install: "Microsoft Visual
J# is a tool that developers, particularly those familiar with the
Java-language syntax, can use to build applications and services on the
.NET Framework. Visual J# does not allow you to develop
applications that run on the Java Virtual Machine; applications and
services built using Visual J# will run only on the .NET Framework.
First Steps - ASP.NET Web Pages
- Create a directory under
C:\Inetpub\wwwroot called "aspnetfirststeps".
- Download the
zip file and extract into the directory ""aspnetfirststeps"
- Go to:
http://localhost/aspnetfirststeps/dotnet_installation_first_steps_asp.html
- There is 3 examples of ASP.NET programs (.aspx) and 3 examples of
ASP programs (.asp). For ASP and ASP.NET there is an example of:
- The default server side scripting language - VBScript
- Server side VBScript language
- Server side JavaScript language.
- NOTE: .ASP pages will run on IIS without support for the .NET
Framework. .ASPX pages require IIS and the installation of the
.NET Framework
Errors - my notes
- Install Error - Register ASP.NET with IIS.
- This happens when ASP.Net is not properly registered with
IIS.
- Info on the error
- Install error mentioned in: ConfigSamplesLog.txt
- located in your windows temp directory.
1:20:46 PM Thursday, January 12, 2006: [Pass]
Config_IIS_Install: Created IIS virtual directory:
QuickStartv20\howto\Samples\adoplus\XmlFromSqlSrv\VB\XmlFromSqlSrv
1:20:46 PM Thursday, January 12, 2006: [Info] Installing
ASP.NET Scriptmaps. Command: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe
-s W3SVC/1/ROOT/QuickStartv20
1:20:46 PM Thursday, January 12, 2006: [Fail]
Config_IIS_Install: IIS (Internet Information Services)
Virtual Directory Registration (failed): [Fail] Failed to
install ASP.NET Scriptmaps. Command: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe
-s W3SVC/1/ROOT/QuickStartv20
1:20:46 PM Thursday, January 12, 2006: [Begin Samples
Rollback]
- If you run the exe manually you get:
c:\> "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe"
-s W3SVC/1/ROOT/QuickStartv20
Start registering ASP.NET scriptmap (2.0.50727) recursively
at W3SVC/1/ROOT/Quic
kStartv20. The error indicates that this version of
ASP.NET must first be registered on the
machine.
- Solution - see the info above on "Registering a later
version of ASP.NET with IIS". Create the batch file as
instructed and then run it. Next, redo the installation of "QuickStart".