Tag Archives: IIS

Internet Information Services (IIS) useful commands

In this article, lets take a look some of the IIS commands which are used quite often by the developers.

Apppool recycle
C:\Windows\System32\inetsrv\appcmd.exe recycle apppool WebsiteAppPoolName

where WebsiteAppPoolName is the name of application pool name

Website Start
C:\Windows\System32\inetsrv\appcmd.exe start site WebsiteName

where WebsiteName is the name of the site

Website Stop
C:\Windows\System32\inetsrv\appcmd.exe stop site WebsiteName

where WebsiteName is the name of the site

If you need to frequently recycle apppool or start/stop the website(s) then I would suggest to create a powershell script and run it.


Configure SMTP on Windows 7


You need to install IIS manager first. SMTP setting comes under the IIS manager window.

As, it can be installed ONLY on computers that are running the Enterprise, Professional, or Ultimate editions of Windows 7.

Steps to follow:

1. Run “inetmgr” command to open the IIS manager.

2. Double click the “SMTP E-mail” to open the configuration window.

3. You can see 2 options there. First is to deliver email to SMTP server and second is to store e-mail in pickup directory on your local.

4. If you choose first option, enter the values for “SMTP Server”, “Port” and “Authentication Required”. If you tick the “Use localhost” checkbox, “SMTP Server” will automatically set to “localhost”.

5. If you are developing you web application on your local, set the second option which is “store e-mail in pickup directory” on your local. If this option is set, the emails sent through your application will get stored into your hard drive on your system.

This can also be set in your application’s web.config file.

6. Once all set, click on “Apply” to save the settings.

Hope this helps.

Please comment below this post, if you have any issues or doubts on this.