Thursday, 26 May 2016

IIS Learning Path Day 3 - Starting and stopping a website

Starting and Stopping a website

Once the website has been published, there will be cases that you will have to stop the website for a particular amount of time (and a very specific reason). IIS provides the capability of starting as well as stopping a website from working. A website can be started/stopped via the IIS user interface or via the command line.

Starting/Stopping a website from the User Interface

1. Start -> Administrative Tools -> IIS Manager
2. Expand the IIS section and click on then expand the Sites section.
3. Click on the website that should be started or stopped.
4. On the right pane of the IIS manager and under the Manage Web Site section click Start or Stop

Starting/Stopping a website from the Command Line

Open the command prompt and enter the following command:

appcmd start | stop site /site.name:string

string: The name of the website to be started | stopped

Friday, 20 May 2016

IIS Learning Path Day 2 - Creating a Website

Once development has came to an end, the content of the website need to be uploaded on a server. IIS provides an easy way to upload your website on the server throughout a wizard. By default, IIS creates a website for you called Default.html - a website which can be stopped later on.

Creating a website with the installation wizard


  1. Click Start, then click Administative Tools and then select IIS.
  2. Find where your sites are located and on the left pane right click the Sites node. Then select Add web Site.
  3. The Add Web Site dialogue will then be displayed. Then type in a name for your website in the Web Site Name section.
  4. Type in the physical path of the website's folder in the Physical path box. Alternatively, use the (...) browse button to navigate to the appropriate file path.
  5. Then the domain of people who are going to visit your website need to be specified. To do that, click on the Connect as button. Alternative, click on the Application User.
  6. To select a protocol for the website, then simply select one from the Type list.
  7.  Then specify the appropriate IP address in the IP address box.
  8. Specify the port number in the Port Number text box.
  9. Optionally, type in a a host for your website in the Host Header
  10. To make the website immedietely available to the public, then select Start Web site immediately.
  11. Click OK to finish the set up

Creating a website from the terminal

In the terminal type the following:

appcmd add site /name: string /id: uint /physicalPath: string /bindings: string

name: The name of the website to be created
id: A unique id-number that you wish to assign your website to
physicalPath: The destination path from the file system for the website
bindings: It holds information for the host header, port number, protocols and IP address




Points taken from https://technet.microsoft.com/en-us/library/cc772350(v=ws.10).aspx




Tuesday, 17 May 2016

IIS Learning Path Day 1 - Listing websites

Listing Websites  on IIS

Websites in an IIS web server can be listed and provide useful information to the end user such as:

  • Is the website still in operation?
  • Site bindings
  • Logs about the website
  • Capability to change the site properties

How to list websites on an IIS server

There are two possible ways to list the websites on an IIS web server. The first one is the UI and the second one is the command line.

Listing websites from the UI

There are 3 possible ways to list your websites, depending on the version of IIS you are using

First
  1. Click Start -> Administrative Tools -> IIS Manager
  2. On the left pane expand the websites/site section
  3. The websites on this server are now listed
Second
  1. Click Start -> Right click on My Computer and click Manage
  2. Click on Services and Applications
  3. Expand the IIS section
  4. Click on sites
  5. The websites on this server are now listed
Third
  1. Click Start -> Right click on My Computer and click Manage
  2. From the options on the left panel, click Roles
  3. Then click Web Server (IIS) and then click IIS
  4. A new panel will open and on the left panel expand the name of your server and then click sites
  5. The websites on this server are now listed

Listing sites from the command line

  1. Click Start and open the command prompt
  2. Type appcmd list site and press entrer
  3. The sites for this server are now listed
To list websites with specific setting

In the command prompt type appcmd list site/ attribute: value and press enter