You are here

Add request and session information to IIS Log

Configuration in Microsoft IIS

In Microsoft IIS it is possible to log request- and session information sent by Airlock using environment cookies. To log these details for each request, change the configuration of Internet Information Services (IIS) Manager under Web Sites -> right mouseclick the specific site: Properties -> tab: Web Site --> Active log format: Properties... -> tab: Advanced. Also see screenshot below.

After restarting the Web site, the changes will take effect and the cookies sent by the reqest will be logged in the IIS log file. For example the cookie AL_ENV_REMOTE_ADDR contains the client IP address - see the following log entry example. To force Airlock to send the environment cookies, enable the "Env.cookies" in the corresponding mapping(s).

Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.2;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.04506.30;+.NET+CLR+3.0.04506.648) WSS_KeepSessionAuthenticated=80;+MSOWebPartPage_AnonymousAccessCookie=80;.... ;;...; 304 0 0

Using Header "X-FORWARDED-FOR" instead of AL_ENV cookies

With every request, Airlock sends the header X-FORWARDED-FOR, which is standardized and contains the client IP as its value. An IIS Module is available to evaluate the X-FORWARDED-FOR header and to replace the client IP address in the IIS log file by the client IP address provided by the X-FORWARDED-FOR header.

Knowledge Base Categories: