Microsoft Knowledge Base Email Alertz

(273639) - This step-by-step article describes how to start a service (specifically IISAdmin and its dependent services) under a debugger. Occasionally, issues occur when you start the IISAdmin service or one of its dependent services, such as the World Wide Web...

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 273639 - Last Review: July 7, 2008 - Revision: 7.3

How to start IISAdmin and dependent services under a debugger

This article was previously published under Q273639
We strongly recommend that all users upgrade to Microsoft Internet Information Services (IIS) version 7.0 running on Microsoft Windows Server 2008. IIS 7.0 significantly increases Web infrastructure security. For more information about IIS security-related topics, visit the following Microsoft Web site:
http://www.microsoft.com/technet/security/prodtech/IIS.mspx (http://www.microsoft.com/technet/security/prodtech/IIS.mspx)
For more information about IIS 7.0, visit the following Microsoft Web site:
http://www.iis.net/default.aspx?tabid=1 (http://www.iis.net/default.aspx?tabid=1)

On This Page

SUMMARY

This step-by-step article describes how to start a service (specifically IISAdmin and its dependent services) under a debugger.

Occasionally, issues occur when you start the IISAdmin service or one of its dependent services, such as the World Wide Web Publishing service or the FTP Publishing service. These services may stop responding (hang) or quit (crash) in a way that is not caught by the default system debugger. Also, if a service experiences a problem when it starts, the Service Control Manager (SCM) gracefully stops the service and reports to the Event Log that there was a problem starting the service.

If this information is not enough, you must determine where the issue exists during startup. If you are debugging an executable file, you can start the debugger of your choice, and then run the executable file under the debugger. This becomes more difficult when the executable file in question is running as a Microsoft Windows NT service. Although the environment is different, the approach is very similar.

Note In Internet Information Services 7.0, the World Wide Web Publishing service depends on the HTTP service and on the Windows Process Activation service.

This article describes how to start a service (specifically IISAdmin and its dependent services) under a debugger. The debugger that is used in the example is WinDBG. To download and install the debugging tools, visit the following Microsoft Web site:
Microsoft Debugging Tools
http://www.microsoft.com/whdc/devtools/ddk/default.mspx (http://www.microsoft.com/whdc/devtools/ddk/default.mspx)

Set service options

  1. Set the Image File Execution options so that when the service (or the executable file) starts, it starts under the debugger. Because you are working directly with a Windows NT service, make sure that you turn on the Interact With the Desktop option in the Log On As section of the Service Properties dialog box. Otherwise, when the service starts, it loads in the debugger, and you will not see it.
    REGEDIT4
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\inetinfo.exe]
    "Debugger"="C:\\Debuggers\\windbg -g"
    					
    NOTE: The path that points to the debugger (WinDbg in the examples) cannot contain any spaces, nor can you use extensions in the debugger path; for example, it must be windbg, and not windbg.exe.

  2. To debug IIS, including the File Transfer Protocol (FTP), Simple Mail Transfer Protocol (SMTP), Network News Transfer Protocol (NNTP), Web, and other services that run under the Inetinfo.exe process, set the IISAdmin service to Interact with the Desktop.
  3. At a command prompt, type net stop iisadmin /y, and then press ENTER to stop IISAdmin and all the dependent services. Type net start w3svc, and then press ENTER to start the World Wide Web Publishing service and the IISAdmin service.
  4. Start any other related services. This last step may be omitted or changed based on the situation. For example, if you are debugging an FTP (MSFTPSVC) service startup issue, instead of starting the World Wide Web Publishing service, you only have to start the FTP Publishing service (net start msftpsvc).
  5. When the debugger is running, you can set up various options, such as symbol path. From this point, you can debug the service as any other executable process.

REFERENCES

For more information about debugging, click the following article numbers to view the articles in the Microsoft Knowledge Base:
286350  (http://kbalertz.com/Feedback.aspx?kbNumber=286350/ ) How to use ADPlus to troubleshoot "hangs" and "crashes"
261871  (http://kbalertz.com/Feedback.aspx?kbNumber=261871/ ) COM+ and MTS debugging resources
183480  (http://kbalertz.com/Feedback.aspx?kbNumber=183480/ ) How to debug ISAPI DLLs in IIS 4.0, IIS 5.0, IIS 5.1, and IIS 6.0
238788  (http://kbalertz.com/Feedback.aspx?kbNumber=238788/ ) How to debug Common Gateway Interface applications running under IIS by using Visual Studio

APPLIES TO
  • Microsoft Internet Information Services 7.0
  • Microsoft Internet Information Services 6.0
  • Microsoft Internet Information Services 5.0
  • Microsoft Internet Information Server 4.0
  • Microsoft Internet Information Server 3.0
Keywords: 
kbhowtomaster KB273639
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate