Recently I have a web module, ISAPI needs to be made. ISAPI's debugging requires a lot of skill, I have found a lot of articles online, most of which are not very complete, after a long study, and finally summarize the following experience. We share with you here.
The debugging process follows these steps:
1. Open "Internet Information Services", right click on your web server, and select Click Properties in the pop-up menu. (Chapter 1)
2, in the Home Directory page, set "Application Protection" to "Low (IIS Process)". As shown in Figure 2
Such IIS will import the ISAPI's DLL into its process, allow debugging. Use the same method to set the virtual directory where the debugged DLL is located.
Note: If you do not be "low (IIS process)", you will not be able to debug.
3, open the management tool -> service, find the following services, stop it, and set it to "manual".
Simple Mail Transport Protocol (SMTP) World Wide Web Publishing Service FTP Publishing Service IIS Admin Service If the IIS Admin Service is set to "Disable" in the "Losked" status after restarting. Then restart it again to see if it will start. When IIS Admin Service is started, it is not possible to debug. Recently I have a web module, ISAPI needs to be made. ISAPI's debugging requires a lot of skill, I have found a lot of articles online, most of which are not very complete, after a long study, and finally summarize the following experience. We share with you here. The debugging process Follow these steps: 1. Open "Internet Information Services", right-click on your web server, and select Click Properties in the pop-up menu. (Character FIG. 1) 2, in the "Main Directory" page, set "Application Protection" "Low (IIS Process)". As shown below, IIS will import the ISAPI's DLL into its process, allow debugging. Use the same method to set the virtual directory where the debugged DLL is located. Note: If you do not be "low (IIS process)", you will not be able to debug. 3, open the management tool -> service, find the following services, stop it, and set it to "manual". Simple Mail Transport Protocol (SMTP) World Wide Web Publishing Service FTP Publishing Service IIS Admin Service If the IIS Admin Service is set to "Disable" in the "Losked" status after restarting. Then restart it again to see if it will start. When IIS Admin Service is started, it is not possible to debug. 4, open the management tool -> Local security policy, find the "Operating System Mode Operation" in the Local Policy -> User Authority assignment, double-click, add your current user. As shown in Figure 36, restart the computer and make the modification take effect. 7. Save the following files to the suffix REG after copying the following. Double-click to merge the registry. Recently I have a web module, ISAPI needs to be made. ISAPI's debugging requires a lot of skill, I have found a lot of articles online, most of which are not very complete, after a long study, and finally summarize the following experience. We share with you here. The debugging process Follow these steps: 1. Open "Internet Information Services", right-click on your web server, and select Click Properties in the pop-up menu. (Character FIG. 1) 2, in the "Main Directory" page, set "Application Protection" "Low (IIS Process)". As shown below, IIS will import the ISAPI's DLL into its process, allow debugging. Use the same method to set the virtual directory where the debugged DLL is located. Note: If you do not be "low (IIS process)", you will not be able to debug. 3, open the management tool -> service, find the following services, stop it, and set it to "manual". Simple Mail Transport Protocol (SMTP) World Wide Web Publishing Service FTP Publishing Service IIS Admin Service If the IIS Admin Service is set to "Disable" in the "Losked" status after restarting. Then restart it again to see if it will start. When IIS Admin Service is started, it is not possible to debug.
4, open the management tool -> Local security policy, find the "Operating System Mode Operation" in the Local Policy -> User Authority assignment, double-click, add your current user. Restart the computer as shown in the following figure 35, allowing the modification to take effect. 6. Save the following content to "Set IIS to a normal process .reg". Double-click to merge the registry. This will be able to debug. If your IIS is installed in another directory, you need some modifications. Here the default directory is "C: / WinNT / system32 / inetsrv" REGEDIT4 [HKEY_CLASSES_ROOT / AppID / {61738644-F196-11D0-9953-00C04FD919C1}] "LocalService" = - "RunAs" = - [HKEY_CLASSES_ROOT / AppID / {9F0BD3A0 -EC01-11D0-A6A0-00A0C922E752}] "localservice" = - "runas" = - [hkey_classes_root / appid / {a9E69610-b80d-11d0-b9b9-00a0c922e750}] "localservice" = - "runas" = "interactive user" [HKEY_CLASSES_ROOT / ClsID / {61738644-F196-11D0-9953-00C04FD919C1}] "LocalService" = - [HKEY_CLASSES_ROOT / ClsID / {9F0BD3A0-EC01-11D0-A6A0-00A0C922E752}] "LocalService" = - [HKEY_CLASSES_ROOT / ClsID / { A9E69610-B80D-11D0-B9B9-00A0C922E750}] "LocalService" = - [HKEY_CLASSES_ROOT / ClsID / {61738644-F196-11D0-9953-00C04FD919C1} / LocalServer32] "" = "c: // winnt // system32 // inetsrv //inetinfo.exe -e w3svc "[hkey_classes_root / clsid / {9f0bd3a0-EC01-11D0-A6A0-00A0C922E752} / localserver32]" = "c: //winnt/inetinfo.exe -e w3svc "[HKEY_CLASSES_ROOT / ClsID / {A9E69610-B80D-11D0-B9B9-00A0C922E750} / LocalServer32]" "=" c: //winnt//system32//inetsrv//inetinfo.exe -e w3svc "[HKEY_LOCAL_MACHINE / SYSTEM / CUR rentControlSet / Services / IISADMIN] "Start" = dword: 3 [HKEY_LOCAL_MACHINE / SYSTEM / CurrentControlSet / Services / MSDTC] "Start" = dword: 3 [HKEY_LOCAL_MACHINE / SYSTEM / CurrentControlSet / Services / W3SVC] "Start" = dword: 3 You You can use the following registry code to restore IIS to run in a service.
REGEDIT4 [HKEY_CLASSES_ROOT / AppID / {61738644-F196-11D0-9953-00C04FD919C1}] "LocalService" = "IISADMIN" "RunAs" = - [HKEY_CLASSES_ROOT / AppID / {9F0BD3A0-EC01-11D0-A6A0-00A0C922E752}] "LocalService" = "IISADMIN" "RunAs" = - [HKEY_CLASSES_ROOT / AppID / {A9E69610-B80D-11D0-B9B9-00A0C922E750}] "LocalService" = "IISADMIN" "RunAs" = - [HKEY_CLASSES_ROOT / ClsID / {61738644-F196-11D0- 9953-00C04FD919C1}] "LocalService" = "IISADMIN" [HKEY_CLASSES_ROOT / ClsID / {9F0BD3A0-EC01-11D0-A6A0-00A0C922E752}] "LocalService" = "IISADMIN" [HKEY_CLASSES_ROOT / ClsID / {A9E69610-B80D-11D0-B9B9- 00A0C922E750}] "LocalService" = "IISADMIN" [- HKEY_CLASSES_ROOT / ClsID / {61738644-F196-11D0-9953-00C04FD919C1} / LocalServer32] [- HKEY_CLASSES_ROOT / ClsID / {9F0BD3A0-EC01-11D0-A6A0-00A0C922E752} / LocalServer32] [-HKEY_CLASSES_ROOT / ClsID / {A9E69610-B80D-11D0-B9B9-00A0C922E750} / LocalServer32] [HKEY_LOCAL_MACHINE / SYSTEM / CurrentControlSet / Services / IISADMIN] "Start" = dword: 3 [HKEY_LOCAL_MACHINE / SYSTEM / CurrentControlSet / Services / MSDTC] " Start "= dword: 2 [HKEY_LOCAL_MACHINE / SYSTEM / CURRENTCONTROL Set / Services / W3SVC] "START" = DWORD: 28, settings on C Builder: a) In your ISAPI DLL project, open Project-> Options. Page, "Directories / Conditionals" paging, set " Output Directory "C: / INETPUB / SCRIPTS" or page placed on your ISAPI DLL. Open all debug information (click "Full Debug" button on the Complier page). b) Open the Run-> Parameters page, set Host Application to "C: /Winnt/System32/inetsrv/inetinfo.exe" or other other installation directory of your IIS. Set parameters to "-e W3SVC" c) Now you can start formal debugging, set breakpoints, run programs, and then access triggered by browser, the program will stop at breakpoints.