IIS Insider - January 2004

By Brett Hill

SMTP Service Disappears from IIS Console

Q: We installed IIS 6 on our Windows Server 2003 along with the SMTP service. After some work, it was decided to uninstall SMTP as it was thought we didn't require it. Later, in order to quickly implement our application which requires SMTP, we added the SMTP service back, but the SMTP service does not appear in the Internet Information Services MMC. We tried to uninstall and reinstall SMTP, but that did not help. What can we do to get the STMP node to appear?

A: In some cases (after the SMTP service has been installed), the STMP node in the Internet Information Services console (MMC) may fail to appear when you install other IIS services or reinstall SMTP. To correct this, do the following:

  1. Close the Internet Information Services MMC

  2. Go to a command prompt on the IIS Server and change to the directory %systemroot%\system32\inetsrv

  3. Type the following command and press Enter:

    regsvr32 inetmgr.dll

  4. Type the following command and press Enter:

    regsvr32 smtpsnap.dll

  5. Open the Internet Information Services MMC

You will now see the SMTP node back in place.

How To Query Performance Monitor Counters Using a Web Page

Q: We would like to find a way to query our IIS server's performance in real time using a web page. Is there some way to use ASP to connect to performance monitor to get a reading on different counters?

A: The Windows 2000 Resource Kit includes a utility called the Performance Counter Check (perfcheck.dll) that you can use on Windows 2000 and Windows Server 2003 computers to query performance monitor and display the results. For IIS 4 you can use the Windows Performance Data Helper DLL (pdh.dll), available with the Windows NT 4.0 Platform software development kit (SDK). There is a free, non-Microsoft developed component available at https://www.alphasierrapapa.com/IisDev/Components/Perfmon/. If you're using ASP.net, there is a class named "Peformancecounter that allows you to query performance monitor counters without any supporting software (other than ASP.net of course). See https://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemdiagnosticsperformancecounterclassctortopic.asp for more details.

Are IIS Admin Service and File and Print Sharing Network Service Required?

Q: We are working to manage our services and one of the services we have questions about is the IIS Admin Service. What function does this service perform on an IIS server? If our Windows 2000/Windows Server 2003 will NOT be a WWW server, do we need to have this service? Regarding the network service "File and Print Sharing for Microsoft Networks, is this required on an IIS server?

A: The IIS Admin Service is an essential service on all IIS servers, but is not needed at all on servers that do not host IIS. One of the key functions of the IIS Admin Service is to provide a way for other services and programs to access, modify, and otherwise manage the metabase. If this service is not running, IIS cannot start. By default, the IIS Admin Service is set to restart if it fails unexpectedly (see the March 2003 edition of IIS Insider for details on how to customize the restart setting).

Regarding the File and Print Sharing network service, it is not really an IIS issue per se, but more of a server configuration concern. IIS runs just fine without File and Print Sharing network service installed. Disabling File and Print Sharing network service prevents you from connecting to the IIS server using a UNC path. This will impact any programs that rely on accessing the IIS server using a UNC path. For example, backup systems often use File and Print Sharing in order to access remote systems and such systems would fail if this was disabled on the server. In short, if you do not require file and print sharing, the network service can be disabled, particularly on an IIS server that is available through the Internet. For intranet servers, the File and Print Sharing network service can be quite useful as a way to publish content on the IIS server through shared folders.

Submit your questions to the IIS Insider. Selected questions along with the answers will be posted in a future IIS Insider column.

For a list of previous months' questions and answers on IIS Insider columns, click here.

We at Microsoft Corporation hope that the information in this work is valuable to you. Your use of the information contained in this work, however, is at your sole risk. All information in this work is provided "as is," without any warranty, whether express or implied, of its accuracy, completeness, fitness for a particular purpose, title or non-infringement, and none of the third-party products or information mentioned in the work are authored, recommended, supported or guaranteed by Microsoft Corporation. Microsoft Corporation shall not be liable for any damages you may sustain by using this information, whether direct, indirect, special, incidental or consequential, even if it has been advised of the possibility of such damages.