Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
2.1 KiB

  1. PBS (Phone Book Server) is an ISAPI dll, and debugging it is something of a challenge.
  2. PBS runs "out-of-process", in dllhost.exe. The first step is to change the identity PBS
  3. runs under, so that we can attach a debugger.
  4. 1. From the "Start" menu, go to "Programs" and "Administrative Tools". Pick "Component Services".
  5. 2. Navigate to "Console Root"->"Component Services"->"Computers"->"My Computer"->"COM+ Applications".
  6. 3. Right click on "IIS Out-Of-Process Pooled Applications" and pick "Properties".
  7. 4. On the "Identity" page, select "Interactive user - the current logged on user".
  8. 5. Click "OK".
  9. Now, to actually debug:
  10. 1. Shut down IIS by running "net stop iisadmin /y" from a console.
  11. 2. Use the "Component Services" tool to configure the OOP pool to start under a debugger.
  12. 2a. From the "Start" menu, go to "Programs" and "Administrative Tools". Pick "Component Services".
  13. 2b. Navigate to "Console Root"->"Component Services"->"Computers"->"My Computer"->"COM+ Applications".
  14. 2c. Right click on "IIS Out-Of-Process Pooled Applications" and pick "Properties"
  15. 2d. On the "Advanced" page, check "Launch in debugger".
  16. 2e. In the "Debugger Path" text box, type in the path to msdev.exe as the first argument (the second
  17. argument will be "dllhost.exe" and the third will be "/ProcessID:" - these arguments will already
  18. be present in the box).
  19. 2f. Click "OK", and say "Yes" to the warning about applications created by...
  20. 3. Start the server with "net start w3svc" from a console.
  21. Once you're done debugging, you'll want to get PBS back to where it was before you started. To do
  22. so, run this script (it's already on your machine).
  23. \Inetpub\AdminScripts\synciwam.vbs
  24. This sets the identity for PBS (and all other ISAPIs) back to the !IWAM account that IIS was
  25. using before you changed it above.
  26. Owners and websites change so the following information may be outdated, but at the time of writing (Feb 2001):
  27. - the above information is condensed from : http://caress_of_steel/isapi5debugging.htm
  28. - Mr. ISAPI is Wade Hilmo (WadeH)
  29. - Cindy Du (XinliD) and Bhavesh Doshi (BhaveshD) have also been very helpful.