OnAttachProcess - cWebAppBasic
When process pooling is used, this event is sent to every WBO object and finally to the parent WebApp object
Type: Event
Parameters
| Parameter | Type | Description |
|---|---|---|
| sSessionID | String | [ToDo: In Progress] |
Syntax
Procedure OnAttachProcess String sSessionID
Description
When process pooling is used, the OnAttachProcess event is sent to every WBO object and finally to the parent WebApp object. By default, it does nothing, but it can be used to perform any initialization for the newly attached process.
Sample
This sample shows how to obtain the value of the IIS server variable HTTP_X_FORWARDED_FOR during OnAttachProcess. See Microsoft's IIS Server Variables page for documentation of IIS Server Variables.
Procedure OnAttachProcess
String sIP
Get ServerVariable "HTTP_X_FORWARDED_FOR" to sIP
If (sIP = "" or Lowercase(sIP) = "unknown") Begin
Get ServerVariable "REMOTE_ADDR" to sIP
End
Send LogEvent 3000 sIP
Forward Send OnAttachProcess
End_Procedure