Hi,In a previous article, I was explaining how to generate a FREB log on a HTTP error or a long running request.It's also possible to generate a dump based on the FREB rule, by example, when a request takes more than 15 seconds to be executed.The major inconvenient is the need to make a choice between the FREB log and the dump. It's either one or the other, but not both at the same time.
Here is how to do it:
<?xml version="1.0" encoding="UTF-8"?><configuration> <system.webServer> <tracing> <traceFailedRequests> <add path="*"> <traceAreas> <add provider="ASP" verbosity="Verbose" /> <add provider="ASPNET" areas="Infrastructure,Module,Page,AppServices" verbosity="Verbose" /> <add provider="ISAPI Extension" verbosity="Verbose" /> <add provider="WWW Server" areas="Authentication,Security,Filter,StaticFile,CGI,Compression,Cache,RequestNotifications,Module" verbosity="Verbose" /> </traceAreas> <failureDefinitions timeTaken="00:00:15" /> </add> </traceFailedRequests> </tracing> </system.webServer></configuration>
If you hadn't authorized the delegation, you'll find the same configuration in the ApplicationHost.config file located in the folder "C:\Windows\System32\Inetsrv\Config".
<sites> <site name="Default Web Site" id="1" serverAutoStart="true"> <application path="/"> <virtualDirectory path="/" physicalPath="%SystemDrive%\inetpub\wwwroot" /> </application> <bindings> <binding protocol="http" bindingInformation="*:80:" /> </bindings> <traceFailedRequestsLogging enabled="true" customActionsEnabled="true" /> </site></sites>
appcmd.exe set config -section:system.applicationHost/sites "/[name='Default Web Site'].traceFailedRequestsLogging.customActionsEnabled:"true"" /commit:apphost
You should find exactly the same configuration than above in the ApplicationHost.config file.
!!! Warning !!! You have to install the Debugging Tools in a path folder with no spaces, else it will be impossible to execute ADPLUS via FREB.In example, "C:\Debuggers" is a good path folder while "C:\test FREB dumps" isn't.
This can be done in the Web.Config of your application, or directly in the ApplicationHost.config, in the section <system.webServer> <tracing> <traceFailedRequests>.You just need to add the following elements to <add path="*">:
<add path="*" customActionExe="c:\windows\system32\cscript.exe" customActionParams="C:\Debuggers\adplus_old.vbs -hang -pn w3wp.exe -o c:\dumps -quiet" customActionTriggerLimit="50">
You should get a Web.Config / ApplicationHost.config with a similar content:
<?xml version="1.0" encoding="UTF-8"?><configuration> <system.webServer> <tracing> <traceFailedRequests> <add path="*" customActionExe="c:\windows\system32\cscript.exe" customActionParams="C:\Debuggers\adplus_old.vbs -hang -pn w3wp.exe -o c:\dumps -quiet" customActionTriggerLimit="50"> <traceAreas> <add provider="ASP" verbosity="Verbose" /> <add provider="ASPNET" areas="Infrastructure,Module,Page,AppServices" verbosity="Verbose" /> <add provider="ISAPI Extension" verbosity="Verbose" /> <add provider="WWW Server" areas="Authentication,Security,Filter,StaticFile,CGI,Compression,Cache,RequestNotifications,Module" verbosity="Verbose" /> </traceAreas> <failureDefinitions timeTaken="00:00:15" /> </add> </traceFailedRequests> </tracing> </system.webServer></configuration>
For your information you can replace the star in <add path="*" by a specific page like "default.htm" or by example by a specific extension like "*.aspx".
Once all these configurations are saved, you only have to wait for the dump to be generated.
We hope this article will be useful for you.Thank you very much to Finbar Ryan, who helped me to make this working.
See you soonSylvain Lecerf and the French Microsoft IIS Support Team