Programming Stuff

How to Configure your IIS Web Site

Basic Steps:

Here few steps to configure your local Internet Information Service (IIS) for new web site application.

1. Create Web Site… Open IIS and Click in Add new web site.

Give an unique site name, such as: “mywebsite.localhost”
and Set the Physical Path to the web site folder.

2. Map Host Name… I like to give the Host Name the same name as site name, so lets do that and name it: “mywebsite.localhost”

* Your can modify this info later using “Edit Binding”

when you give a Host Name, your local web site will appear like: http://mywebsite.localhost/

otherwise you will need to give a unique port, e.g. port: 8084 and your local site will be located in http://localhost:8084/

3. Map Localhost… In order to map the Host Name, you will need to adding this value to host file:

c:\windows\system32\drivers\etc\hosts                            mywebsite.localhost

After this few steps, you will be able to see your site running.

(Start your web site) Manage Web Site > Start & Browse Web Site > Click the link below

Additional Steps:

If you got an error like 500, may you have to check the following steps:

1. Permission… Select your Site > Action > Edit Permission (Security Tab)

If the folder is restricted to few user / admin users… then you have to give permission to IIS.

Edit… > User/Group > Add… > IUSR & (pc-name)\IIS_IUSRS using the default permissions (Read & Execute, List Folder Contents, Read)

Also, you can use “IIS_WPG”

2. Application Pool… Make sure your app pool has the correct configuration such as Framework version.

3. Config… May some changes has to be made in the web.config, such as paths or keys point to previous location


* Possible Error Messages:

With IUSR avoid:

HTTP Error 401.3 – Unauthorized

You do not have permission to view this directory or page because of the access control list (ACL) configuration or encryption settings for this resource on the Web server.

With IIS_IUSRS avoid:

HTTP Error 500.19 – Internal Server Error

The requested page cannot be accessed because the related configuration data for the page is invalid.