Hosting ASP.NET Website On IIS

For hosting a website on IIS, follow these steps:

  1. IIS Installation
  2. Enable ASP.NET features on IIS
  3. Install .NET framework
  4. Hosting a Site
  5. Database connectivity
  6. Conclusion

Step 1: IIS Installation.

IIS is a protocol server which is used to host a website on server. IIS stands for Internet Information services.

To install IIS start with windows start icon -> Control panel, Programs and Features , then click Turn Windows features on or off.

Turn Windows features on or off
                  Figure 1

After that click windows features on or off, the Windows Features pop up window opens.

Windows features
                           Figure 2: Windows features

Step 2: Enable ASP.NET Features on IIS

Expand the Application Development Features in that enable the ASP.NET  application features such as:

  1. .NET Extensibility
  2. ASP
  3. ASP.NET
  4. CGI
  5. ISAPI Extensions
  6. ISAPI Filters
  7. Server-Side Includes.

After enabling the ASP.NET features on IIS hit Ok. The IIS server Manager is successfully enabled in start control list.

Step 3: Install .NET Framework.

Now we have to install .NET framework version in our system because the aspx web page needs to run the platform of .net framework.

Here is the download link for .NET Frame work 4.5 click Here.

On this page hit download button and the following window will open then hit Save File.

                                    Figure 3: Setup.exe

Then the file is saved, click the saved exe file and the extract field process window will appear. The file extraction process completed and the following authorization window will appear, check I agree box then hit Install. Then the download and installation progress will appear in the same window.

Installation Process
                                       Figure 4: Installation Process

After the downloading and Installation progress are completed hit the finish button to complete the Installation. Now your IIS is ready to host ASP.NET web sites.

Step 4: Hosting a site.

Select the website folder which one you want to host it into your IIS.

Start IIS server, in that click site, right click on site and then choose add web site

Add web site window
Figure 5: Add web site window

Add site name, path of that site folder, then assign the IP address or enter the host name of that particular site like and then hit ok.

After the process is completed your site is placed under default web site under Sites.

                  Figure 6

At the same time there is one application pool is automatically created while adding the web site.

Application Pool
                                                      Figure 7: Application Pool

Here I have a simple web page like default.aspx in your website there is a database connectivity available which means then you have to follow the steps to add the database into application pool.

Step 5: Database Connectivity

In the application pool panel right click the application name like sample, then choose Advanced Settings option.

Advanced settings Option
                                       Figure 8: Advanced settings Option

The settings window will open in that window select .net framework version like v2.0. Based on our pages it automatically chooses the framework version. Then select managed pipeline mode is Integrated or Classic.

Then in the process model tab select Identity then choose the following:

Pool Identity
                              Figure 9:
Pool Identity

Select LocalSystem because our database connectivity is placed in our system SQL Server so we need to choose LocalSystem then only our database is connected. Then hit OK to close the window.

Step 6: Conclusion.

In the Actions panel choose Browse link

Figure 10: Browse

Now your site will appear in the browser like the following figure:

Figure 11: Browser

Now your application is ready to be browsed on any other system through domain name (Globally) or locally connected LAN network (IP Address) computers.

Read more articles on IIS: 

Up Next
    Ebook Download
    View all
    View all