Naveen's Weblog

Bridge to future

IIS 6.0 proper Installation and hosting ASP.NET(2.0/3.0/3.5) projects

Posted by codingsense on October 15, 2009



For successful hosting of ASP.Net projects in IIS 6.0 we need to install required components and configure IIS properly. The following sections give the steps that need to be followed while Installation and hosting.

There are 3 steps that should be followed they are,

1. Installation of IIS on Windows server 2003
2. Registering Asp.net 2.0
3. Hosting Asp.Net projects
3.1 Create virtual Directory
3.2 Creating our own Application Pool
3.3 Change Setting of Virtual Directory
3.4 Set ASP.Net version for the project

1) Installation of IIS on Windows server 2003

Open add remove programs from control panel
Click Add/Remove windows component on the left bar
When all the components are listed double click on Application Server
Select Application Server Console, ASP.NET and Message Queuing
Double click on Internet Information Services (IIS)
Select All the check Boxes and click OK
Click Ok -> Next -> Starts installing the selected components -> Click Finish

2) Registering Asp.net 2.0

Open command Prompt (Click start menu -> Run -> enter cmd -> Press enter)
Navigate to folder C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
Enter aspnet_regiis -i
Press enter

3) Hosting Asp.Net projects
Open IIS Manger (Click start menu -> run -> inetmgr -> Press enter).

3.1) Create virtual Directory
Expand Local computer -> Web Sites
Right click on Default web site -> New -> virtual Directory
Give the name of the virtual directory that you need to create
Click Next
Select the folder where you have published ASP.NET project
Click Next
Select Read and Read Scripts (Such as ASP)
Click Finish

3.2) Creating our own Application Pool
This will be used if you have hosted projects that are built with framework of different versions
Right click on Application Pools -> New
Enter a name for your Application Pool
If you are running many framework of differn then for each one framework you have to create different Application pool

3.3) Change Setting of Virtual Directory
Right click on created Virtual directory -> Properties
Select Virtual Directory Tab
Check Directory browsing if you need to enable browsing your directory
In Application Settings group -> Click Create
Select Execute permissions -> Script Only
Select Application Pool -> Select the created Application Pool Select depending on your framework version

3.4) Set ASP.Net version
Click ASP.NET tab
In ASP.NET version select 2.0.50727

Note: You need to set ASP.NET version as 2.0.50727 for all the projects built in framework versions 2/3.0/3.5.

This will install all the components and setting that are required to run ASP.NET 2/3/3.5 projects on IIS 6.0.

If any other issues feel free to post a comment.

Happy Learning 🙂
Naveen Prabhu

Advertisements

5 Responses to “IIS 6.0 proper Installation and hosting ASP.NET(2.0/3.0/3.5) projects”

  1. Ishan Khan said

    thnku so much…
    bt hav problem in accessing database.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Data.SqlClient.SqlException: An attempt to attach an auto-named database for file C:\Documents and Settings\i3\Desktop\MAIIT NEW\App_Data\ishan.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

  2. Mahesh Sriram said

    Hi frnz..
    I am using win server 2003 sp2 & iis6 for host my asp.net website. I configured my website and it runs. But the problem is .aspx pages dose not run except html pages.

    Q.1: How could i run aspx pages?
    Q.2: Is there any component missing?

    • codingsense said

      Hi,

      Have you run aspnet_regiis -i and have you selected ASP.NET version 2.0.50727 in ASP.Net tab?
      If still did not work then. Please follow the steps in the tutorial once again and it should do a proper installation.

      Thanks,
      Naveen

  3. ganesh said

    Thanks this article helped me a lot.
    :p

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: