IIS: Creating and running a web application under IIS, everything explained

5 May

While for the first time I tried to install and run IIS. IIS stands for Internet Information Services. It is a web server like apache, build under window operating system for creating and running web applications.

If you are newbie you may be getting difficulties in getting started with IIS.

I tried to figure out how to run apache and IIS at the same time on the same server. Initially I get some errors.

I then stop my apache and try to browse localhost, but I was unable. However after reading few articles on net I figure out what was the cause of the error.

In this article I will show you everything and every step used to run you web application.

So let’s have a look.

  1. installing IIS

While running web application, you will need to have a web server. For example in order to run web application built in PHP you need to have apache installed and running. Similarly if you want to run asp or ASP.NET application, you’ll need to have IIS install and running.

Although windows CD contain IIS, but is not installed by default with the window installation. You will need to manually install it after successful installation of your window operating system.

Once you install window, go to

  • start
  • control panel
  • double click “Add or remove programs”
  • click “Add/Remove windows components” on the left side

This will open the following window

IIS Installation

IIS Installation

You can see that Internet information is unchecked. Check it and press next.

Don’t forget putting Windows CD in the CD Rom.

A wizard will install IIS for you.

  1. starting default website

Now if you browse localhost, it may not work. If it doesn’t. then

    • Right click “my computer”
    • Click manage

This will open the following window

Starting default website

Starting default website

you can see that the default website is stopped. You will need to start it

For this right click default website and press start.

This will start your default website and now you can browse web server.

Next step is to create you DOTNET application. You can create it anywhere on your hard drive.

It will be better to keep that in you “C:\Inetpub\wwwroot” directory.

Lets suppose we create “dotnetnuke” as I am going to work with application build in dotnetnuke. You need to have default.aspx file in this directory.

As you have now created you new directory and default.aspx file. Its time to browse it.

If you write http://localhost/dotnetnuke

It will give the following error.

“This Virtual Directory does not allow contents to be listed”.

This means that you will need to create another website and point the path of that website to the newly created directory “dotnetnuke”.

Right click  “default Website”.

Then “New”=> “virtual directory”

This will start new wizard. Follow the wizard by giving alias, directory path, next and Finish.

The last and final thing is to add the default.aspx to the default documents list.

For this

  • Right click the website/virtual directory you created
  • Select properties
  • Click documents tab

This will open the following window

default-documents

When you first open it you will see that there is no Default.aspx in the list.

Add that by clicking “Add” and give “Default.aspx” and move it to the top.

And click open.

Now browser http://localhost/dotnetnuke

And you will find your self where you expect.

That’s it.

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: