How to Install IIS 7.5 on Windows 7?

IIS will not install by default in your Windows 7 machine. To install IIS you can perform the below procedure:

  • Click Start Menu and then click Control Panel
  • From control panel click View By and select Small Icons
  • Click on Programs and Features
  • Click on Turn Windows features on or off
  • In the windows features dialog box click Internet Information Services and click OK

How to configure the SMTP relay in IIS7 – Windows 2008

Installing the STMP Service

  • From your Server Manager right click on features and click on Add Features menu
  • Select SMTP Server and click next
  • Click on Add required role services (This will also install IIS6.0 Manager which is mandatory for SMTP service)
  • Click Next
  • Check whether IIS 6 metabase compatibility and IIS6 management console is checked

  • Click Next and Click Install

Configuring SMTP Service

  • From Administrative Tools run IIS6 Manager
  • Click on SMTP Server Properties

  • In the General tab select the IP address of your SMTP Server from the drop down list

  • Go to Access Tab and click on Relay button
  • Select Only the list below option and add 127.0.0.1 as IP Address and click OK

  • Right click on domain and click on new Domain

  • Select domain type as Remote and click next

  • Specify a Name and click Finish
  • Go to the properties of that newly created domain
  • Enter your mail server FQDN or IP (in between [ ]) in the Forward all mail to smart host field
  • Click on Outbound Security –> Select Anonymous access and check TLS encryption
  • Click Ok
  • Restart SMTP Service

Test SMTP

  • Create a text file name – email.txt
  • Paste the below line and copy it in C:\inetpub\mailroot\pickup (Or your SMTP pickup) folder

From: masudur.sayem@hotmail.com
To: masudur.sayem@hotmail.com
Subject: Email test- Blog

This is the test body of the email

  • Check whether you got that mail

How to Change the Default Mail Queue location in IIS?

  • Open IIS Manager and Stop Default Web Site
  • Copy C:\ inetpub folder to D:\ inetpub
  • Go to IIS again –> Select Default Web Site –> From the right side of the window click on Basic settings and change the physical path and click OK

  • Go to Services and stop IIS Admin Service
  • Go to system32/inetsrv folder
  • Make a backup of metabase.xml and open that file
  • Replace the path where you want by searching string- “C:\inetpub”

  • Start IIS Admin Service and SMTP service
  • Start your Default web site

BINGO!! 🙂

How to configure SSL in IIS and how to force to use HTTPS instead of HTTP

Nowadays Web Server security is a big concern and most of the organizations are now using SSL port instead of default 80 port in Webserver.

Why SSL?

The primary reason why SSL is used is to keep sensitive information sent across the Internet encrypted so that only the intended recipient can understand it. This is important because the information you send on the Internet is passed from computer to computer to get to the destination server. Any computer in between you and the server can see your credit card numbers, usernames and passwords, and other sensitive information if it is not encrypted with a SSL certificate. When a SSL certificate is used, the information becomes unreadable to everyone except for the server you are sending the information to. This protects it from hackers and identity thieves.

Buying SSL certificate

SSL certificate is not free and there are few renowned company deal with this issue. For example VeriSign, which is now a part of Symantec (http://www.symantec.com/ssl-certificates)

How to install Certificate in IIS 7.0

  • Click on the Start menu, go to Administrative Tools, and click on Internet Information Services (IIS) Manager.
  • Click on the name of the server in the Connections column on the left. Double-click on Server Certificates
  • In the Action column on right click on Import
  • Browse the certificate that you have purchased earlier and enter the password which provide by the certificate authority
  • Click on OK
  • The certificate we will available as shown in the below picture

Bind the Certificate to a website

  • From the connection column expand the site folder and click on the website that you want to bind the certificate. Click on Bindings under Actions column
  • Click on Add, Change the type to https and select the SSL certificate that you have installed earlier. Click on OK
  • You can also view the certification and check the validity by clicking on view button on the Add Site Binding Dialog box

Force Website only to use SSL

You can force a website only to use SSL, so that if a user sends any request using http instead of https the server will not send any reply.

  • From your website click on SSL Settings. Check Require SSL checkbox and click on Apply

You may need to restart IIS after doing the above configuration