Steps to enable tracing using appcmd
Here are the steps you need to enable tracing for a site using appcmd.
1. Enable tracing for site.
4. Change verbosity to verbose for all providers.
@REM Step1
%windir%\System32\inetsrv\appcmd configure trace "Default Web Site" /enablesite
@REM Step2
%windir%\System32\inetsrv\appcmd configure trace "Default Web Site" /enable /statusCodes:100-999 -commit:apphost
@REM Step 3
%windir%\System32\inetsrv\appcmd list config "Default Web Site" -section:traceFailedRequests -text:* | findstr provider:> traceproviders.txt
@REM Step 4
@REM Change %%V to %V if you are not running in batch mode
for /L %%V in (0,1,%PROCOUNT%) do %windir%\System32\inetsrv\appcmd set config "Default Web Site" /section:traceFailedRequests /[path='*'].traceAreas.[@%%V].verbosity:Verbose -commit:apphost
You can remove step3 and change step 4 to run blindly from 0 to 3. You might get invalid index errors from appcmd if you have less than 4 providers installed on your machine which you can ignore.
-Kanwal-