Recently debug a ISAPI extension, you need to know the identity of your processes and threads. Knowledge learned.
MSDN original:
IIS Application Identities.
ISAPI extension (including ASP, ASP.NET, because asp.dll and aspnet_isapi.dll are ISAPI extensions):
Process, w3wp.exe identity:
1. In anonymous access, use IUSR_
COMPUTER_NAME account.
2. Non-anonymous ways, use authenticated customers' identity.
Thread (Thread) identity:
Win32
Revert7ELF is not called, just like Process.
2. Win32
RevertToSelf is called, in IIS6 Worker Process ISDE mode, thread camouflage "
NT Authority / Network Service "Account. (Thread Impersonates the
NT Authority / Network Service Account).
In fact, this account can be set in "Application Pools".
If you create a new thread in the thread (
_BEGINTHREAD (), new thread is "
NT Authority / Network Service runs under account.
In IIS6, each Website and virtual directory can set Application Settings to a separate Application Pool individually. Each Application Pool is in a separate w3wp.exe process.