Running Web Applications in IIS

Whether you built ASP.NET application or MVC application,
you can run your application in IIS.
Running IIS
Visual Studio
If you don’t know how to enable IIS then, here is the link:

If you already have a web application running in Visual
Studio Move to Step 2.
Step 1: Create Application

Create a Web Application ->
ASP.NET web application or MVC application.
(Note if you already have created your Application then go to Step 2.)

1) Add
new HTML Page and name it index

2) In
index.html page enter just few lines of code.
Below body tag write:

then save.
     Step 2: Go to IIS Manager (If you don’t know how to navigate to IIS then follow this link:
– Under
Sites Folder -> Add Website

Site name, Select appropriate Physical path of website be careful in selecting
the project folder, Enter Host Name (Host name will be the URL with which you
will be able to access application).

Let’s Browse Website:

Now when you click Browse Website, you won’t be able to
browse it, because you haven’t made the host entry. System isn’t able to
identify that yes it has to look in local IIS for the application you want to
Step 3: Run Notepad application in Administrator Mode.
Open the hosts file which is located at
Do the host entry –
Now Let’s Browse.
You will come up on following error:

This is because IIS do not have read permissions.
Step 4: Provide permissions to IIS
For giving permissions to IIS right click on your Website in
IIS and then go to Edit Permissions. Then
go to Security Tab, click on Edit, click on Add, click on Advanced, click on
Find Now, and then select IUSR OK,
Again click on Advanced select IIS_IUSRS and then OK, OK, OK.

Provide full control to both groups.
That’s it.!
You can now browse your application with URL:
Feel free to fire queries.
Happy Coding..!!! J

Read More