%3CLINGO-SUB%20id%3D%22lingo-sub-891467%22%20slang%3D%22en-US%22%3EUsing%20FREB%20to%20generate%20a%20dump%20on%20a%20long%20running%20request%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-891467%22%20slang%3D%22en-US%22%3E%3CP%3EIf%20you%20are%20using%20IIS%20and%20you%20are%20familiar%20with%20the%20%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fiis%2Ftroubleshoot%2Fusing-failed-request-tracing%2Ftroubleshooting-failed-requests-using-tracing-in-iis%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Efailed%20request%20tracing%20feature%3C%2FA%3E%3C%2FSPAN%3E%2C%20or%20FREB%20for%20short%2C%20you%20know%20how%20to%20generate%20FREB%20traces%20for%20long%20running%20requests.%20In%20this%20article%20we%20will%20explore%20how%20to%20generate%20a%20dump%20based%20on%20the%20FREB%20rule%2C%20for%20example%2C%20when%20a%20request%20takes%20more%20than%2015%20seconds%20complete.%3CBR%20%2F%3E%3CBR%20%2F%3EThe%20major%20drawback%20is%20that%20you%20need%20to%20make%20a%20choice%20between%20the%20FREB%20log%20and%20the%20dump.%20It%E2%80%99s%20either%20one%20or%20the%20other%2C%20but%20not%20both%20at%20the%20same%20time.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20color%3D%22%23800000%22%3E%3CSTRONG%3EHere%20is%20how%20to%20do%20it%3A%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EConfigure%20a%20FREB%20rule%20as%20usual%20(you%20can%20go%20through%20the%20following%20troubleshooting%20tutorial%20mentioned%20above%20if%20you%20need%20a%20refresher%3A%20%3CBR%20%2F%3EYou%20should%20get%20the%20following%20configuration%20in%20the%20Web.Config%20of%20your%20application%3A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%0A%3CCONFIGURATION%3E%0A%20%20%20%20%3CSYSTEM.WEBSERVER%3E%0A%20%20%20%20%20%20%20%20%3CTRACING%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CTRACEFAILEDREQUESTS%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CADD%20path%3D%22*%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CTRACEAREAS%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CADD%20provider%3D%22ASP%22%20verbosity%3D%22Verbose%22%3E%3C%2FADD%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CADD%20provider%3D%22ASPNET%22%20areas%3D%22Infrastructure%2CModule%2CPage%2CAppServices%22%20verbosity%3D%22Verbose%22%3E%3C%2FADD%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CADD%20provider%3D%22ISAPI%20Extension%22%20verbosity%3D%22Verbose%22%3E%3C%2FADD%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CADD%20provider%3D%22WWW%20Server%22%20areas%3D%22Authentication%2CSecurity%2CFilter%2CStaticFile%2CCGI%2CCompression%2CCache%2CRequestNotifications%2CModule%22%20verbosity%3D%22Verbose%22%3E%3C%2FADD%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2FTRACEAREAS%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CFAILUREDEFINITIONS%20timetaken%3D%2200%3A00%3A15%22%3E%3C%2FFAILUREDEFINITIONS%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2FADD%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3C%2FTRACEFAILEDREQUESTS%3E%0A%20%20%20%20%20%20%20%20%3C%2FTRACING%3E%0A%20%20%20%20%3C%2FSYSTEM.WEBSERVER%3E%0A%3C%2FCONFIGURATION%3E%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20If%20you%20%3CSTRONG%3Ehave%20not%3C%2FSTRONG%3E%20authorized%20the%20delegation%2C%20you%E2%80%99ll%20find%20the%20same%20configuration%20in%20the%20ApplicationHost.config%20file%20located%20in%20the%20folder%20%22C%3A%5CWindows%5CSystem32%5CInetsrv%5CConfig%22.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EOnce%20tracing%20module%20is%20installed%20and%20the%20FREB%20rule%20is%20set%2C%20you%20need%20to%20allow%20Failed%20Tracing%20Module%20to%20accept%20custom%20actions%2C%20by%20setting%20%3CSTRONG%3ECustomActionsEnabled%3C%2FSTRONG%3E%20attribute%20to%20%3CSTRONG%3ETrue%3C%2FSTRONG%3E.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EThere%20are%20three%20main%20ways%20to%20perform%20this%20action%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23800000%22%3E%3CSTRONG%3E1.%20Using%20the%20Configuration%20Editor%20in%20the%20IIS%20Manager%20Console%3A%3C%2FSTRONG%3E%3C%2FFONT%3E%3CBR%20%2F%3EThe%20first%20one%20and%20the%20%3CSTRONG%3Erecommended%20one%3C%2FSTRONG%3E%2C%20is%20to%20use%20the%20Configuration%20Editor%20on%20the%20server%20level%2C%20and%20navigate%20to%20%3CSTRONG%3EapplicationHost%2Fsites%3C%2FSTRONG%3E%20then%20click%20on%20the%20'%E2%80%A6'%20button%20as%20shown%20in%20the%20Figure%20below%20%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20842px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F135308i916D5A4052EA2442%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22image.png%22%20title%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3EThen%2C%20select%20the%20site%20you%20have%20already%20added%20the%20Failed%20Tracing%20Rule%20for%2C%20and%20set%20%3CSTRONG%3EcustomActionsEnabled%3C%2FSTRONG%3E%26nbsp%3Bto%20%3CSTRONG%3ETrue%3A%3C%2FSTRONG%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CP%20style%3D%22padding-left%3A%2030px%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20966px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F135309i3CBDBF10FD5E6AF2%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22image.png%22%20title%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3E%3CSTRONG%3E%3CFONT%20color%3D%22%23800000%22%3E2.%20Edit%20the%20ApplicationHost.config%20file%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EThe%20second%20way%2C%20is%20to%20open%20the%20ApplicationHost.config%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3ELook%20for%20the%20tag%20%3CSITES%3E%3C%2FSITES%3E%3C%2FLI%3E%0A%3CLI%3EAnd%20add%20to%20the%20web%20site%20you%20want%20to%20monitor%20customActionsEnabled%3D%22true%22%20to%20%3CTRACEFAILEDREQUESTSLOGGING%20enabled%3D%22%26quot%3Btrue%26quot%3B%22%3E%3C%2FTRACEFAILEDREQUESTSLOGGING%3E%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3EThe%20configuration%20for%20the%20Default%20Web%20Site%20will%20thus%20become%3C%2FSTRONG%3E%3A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%3CSITES%3E%0A%20%20%20%20%3CSITE%20name%3D%22%20Delay.com%22%20id%3D%222%22%20serverautostart%3D%22true%22%3E%0A%20%20%20%20%20%20%20%20%3CAPPLICATION%20path%3D%22%2F%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CVIRTUALDIRECTORY%20path%3D%22%2F%22%20physicalpath%3D%22%25SystemDrive%25%5Cinetpub%5Cwwwroot%22%3E%3C%2FVIRTUALDIRECTORY%3E%0A%20%20%20%20%20%20%20%20%3C%2FAPPLICATION%3E%0A%20%20%20%20%20%20%20%20%3CBINDINGS%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CBINDING%20protocol%3D%22http%22%20bindinginformation%3D%22*%3A80%3A%22%3E%3C%2FBINDING%3E%0A%20%20%20%20%20%20%20%20%3C%2FBINDINGS%3E%0A%20%20%20%20%20%20%20%20%3CTRACEFAILEDREQUESTSLOGGING%20enabled%3D%22true%22%20customactionsenabled%3D%22true%22%3E%3C%2FTRACEFAILEDREQUESTSLOGGING%3E%0A%20%20%20%20%3C%2FSITE%3E%0A%3C%2FSITES%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23800000%22%3E%3CSTRONG%3E3.%20Using%20the%20appcmd%20command%20line%20tool%3C%2FSTRONG%3E%3C%2FFONT%3E%3CBR%20%2F%3EThe%20third%20way%2C%20is%20to%20use%20the%20appcmd.exe%20tool%20used%20to%20configure%20IIS%20in%20%3CSTRONG%3Ecommand%20line%20mode%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EOpen%20a%20CMD%20console%3C%2FLI%3E%0A%3CLI%3ENavigate%20to%20the%20folder%20%22C%3A%5CWindows%5CSystem32%5CInetsrv%22%3C%2FLI%3E%0A%3CLI%3EThen%20execute%20the%20following%20command-line%3A%20(%2F%5Bname%3D'x'%5D%20where%20x%20is%20the%20name%20of%20your%20web%20site)%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3Eappcmd.exe%20set%20config%20-section%3Asystem.applicationHost%2Fsites%20%22%2F%5Bname%3D%20Delay.com%5D.traceFailedRequestsLogging.customActionsEnabled%3A%22true%22%22%20%2Fcommit%3Aapphost%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20should%20find%20the%20exact%20same%20configuration%20as%20the%20one%20displayed%20above%20in%20the%20ApplicationHost.config%20file.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3ENow%2C%20to%20be%20able%20to%20generate%20a%20dump%20via%20a%20FREB%20rule%2C%20you%20need%20to%20install%20%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsysinternals%2Fdownloads%2Fprocdump%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EProcDump%3C%2FA%3E%3C%2FSPAN%3E%2C%20and%20copy%20the%20executable%20under%20the%20%3CSTRONG%3EC%3A%5CprocDump%3C%2FSTRONG%3E%20path%20(Preferably)%20and%20create%20a%20directory%20called%20%3CSTRONG%3EmyDumps%3C%2FSTRONG%3E%20under%20%3CSTRONG%3EC%3A%5C%20%3C%2FSTRONG%3Edrive%20as%20well.%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3E%3CEM%3E!!!%20Warning%20!!!%20%3C%2FEM%3E%3C%2FSTRONG%3EYou%20have%20to%20install%20the%20ProcDump%20tool%20in%20a%20%3CSTRONG%3Efolder%20path%3C%2FSTRONG%3E%20%3CSTRONG%3Ethat%20does%20not%20contain%20whitespaces%3C%2FSTRONG%3E%2C%20otherwise%20it%20will%20be%20impossible%20to%20execute%20ProcDump%20via%20FREB.%3CBR%20%2F%3E%3CSTRONG%3EFor%3C%2FSTRONG%3E%20example%2C%20%22C%3A%5Cprocdump%22%20is%20a%20good%20path%20folder%20while%20%22C%3A%5CProcess%20Dump%22%20isn%E2%80%99t.%3C%2FLI%3E%0A%3CLI%3EThe%20last%20step%20consists%20to%20indicate%20the%20specific%20action%20we%20need%3A%20generate%20a%20dump%2C%20this%20action%20can%20be%20done%20either%20from%20Configuration%20Editor%20(which%20is%20again%20the%20recommended%20way)%2C%20or%20directly%20from%20Web%20or%20ApplicationHost%20configuration%20files.%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3EUsing%20Configuration%20Editor.%3C%2FSTRONG%3E%0A%3CUL%3E%0A%3CLI%3EYou%20can%20do%20this%20action%20either%20on%20the%20server%20level%20or%20Site%20level%2C%20as%20shown%20in%20below%20figure%3A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F135311iA8CD49B1C23B3467%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22image.png%22%20title%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CUL%3E%0A%3CLI%20style%3D%22list-style-type%3A%20none%3B%22%3E%0A%3CUL%3E%0A%3CLI%3E%0A%3CP%3EClick%20on%20the%20%E2%80%A6%20button%20on%20above%20figure%2C%20then%20Click%20Add%20action%20link%20under%20the%20Action%20Pane%2C%20and%20fill%20properties%20as%20shown%20below%3A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F135312iD8E48E02CB9A5FD0%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22image.png%22%20title%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CEM%3ECustomActionExe%3C%2FEM%3E%20corresponds%20to%20the%20executable%20we%20want%20to%20launch%3CBR%20%2F%3Ec%3CEM%3EustomActionParams%3C%2FEM%3E%20corresponds%20to%20the%20parameters%20passed%20to%20the%20executable%20(note%20that%20the%20%3CSTRONG%3E%251%25%3C%2FSTRONG%3E%20parameter%20will%20be%20used%20by%20IIS%20to%20pass%20in%20the%20PID%20of%20the%20worker%20process%20to%20the%20procdump%20executable)%3CBR%20%2F%3EBy%20default%20dumps%20will%20be%20generated%20in%20the%20folder%20C%3A%5CmyDumps.Using%20Configuration%20Editor%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CUL%3E%0A%3CLI%3E%3CSTRONG%3EUsing%20Configuration%20(web%20or%20applicationHost)%20files.%3C%2FSTRONG%3E%0A%3CUL%3E%0A%3CLI%3Ein%20the%20web%20or%20applicationHost%20config%20file%2C%20in%20the%20section%20%3CFONT%20face%3D%22courier%20new%2Ccourier%22%20size%3D%222%22%3E%3CWEBSERVER%3E%20%3CTRACING%3E%20%3CTRACEFAILEDREQUESTS%3E%3C%2FTRACEFAILEDREQUESTS%3E%3C%2FTRACING%3E%3C%2FWEBSERVER%3E%3C%2FFONT%3E.%3CBR%20%2F%3EYou%20just%20need%20to%20add%20the%20following%20elements%20to%20%3CFONT%20face%3D%22courier%20new%2Ccourier%22%20size%3D%222%22%3E%3CADD%20path%3D%22%26quot%3B*%26quot%3B%22%3E%3C%2FADD%3E%3C%2FFONT%3E%3A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%3CADD%20path%3D%22*%22%20customactionexe%3D%22C%3A%5CProcdump%5Cprocdump.exe%22%20customactionparams%3D%22-accepteula%20-ma%20%251%25%20c%3A%5CmyDumps%22%20customactiontriggerlimit%3D%2250%22%3E%E2%80%8B%3C%2FADD%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EYou%20should%20get%20a%20Web.Config%20%2F%20ApplicationHost.config%20similar%20to%20the%20following%3A%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%0A%3CCONFIGURATION%3E%0A%20%20%20%20%3CSYSTEM.WEBSERVER%3E%0A%20%20%20%20%20%20%20%20%3CTRACING%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CTRACEFAILEDREQUESTS%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CADD%20path%3D%22*%22%20customactionexe%3D%22C%3A%5CProcdump%5Cprocdump.exe%22%20customactionparams%3D%22-accepteula%20-ma%20%251%25%20c%3A%5CmyDumps%22%20customactiontriggerlimit%3D%2250%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CTRACEAREAS%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CADD%20provider%3D%22ASP%22%20verbosity%3D%22Verbose%22%3E%3C%2FADD%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CADD%20provider%3D%22ASPNET%22%20areas%3D%22Infrastructure%2CModule%2CPage%2CAppServices%22%20verbosity%3D%22Verbose%22%3E%3C%2FADD%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CADD%20provider%3D%22ISAPI%20Extension%22%20verbosity%3D%22Verbose%22%3E%3C%2FADD%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CADD%20provider%3D%22WWW%20Server%22%20areas%3D%22Authentication%2CSecurity%2CFilter%2CStaticFile%2CCGI%2CCompression%2CCache%2CRequestNotifications%2CModule%22%20verbosity%3D%22Verbose%22%3E%3C%2FADD%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2FTRACEAREAS%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CFAILUREDEFINITIONS%20timetaken%3D%2200%3A00%3A15%22%3E%3C%2FFAILUREDEFINITIONS%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2FADD%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3C%2FTRACEFAILEDREQUESTS%3E%0A%20%20%20%20%20%20%20%20%3C%2FTRACING%3E%0A%20%20%20%20%3C%2FSYSTEM.WEBSERVER%3E%0A%3C%2FCONFIGURATION%3E%0A%E2%80%8B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLI%3E%0A%3CLI%3E%0A%3CP%3EFor%20your%20information%20you%20can%20replace%20the%20star%20in%20%3CFONT%20face%3D%22courier%20new%2Ccourier%22%20size%3D%222%22%3E%3CADD%20path%3D%22%26quot%3B*%26quot%3B%26lt%3B%2FFONT%22%3E%20by%20a%20specific%20page%20like%20%22default.htm%22%20or%20by%20example%20by%20a%20specific%20extension%20like%20%22*.aspx%22%20to%20limit%20the%20activation%20of%20the%20rule%20to%20a%20specific%20url%20type.%3C%2FADD%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EOnce%20all%20these%20configurations%20are%20saved%2C%20you%20only%20need%20to%20reproduce%20the%20issue%20and%20wait%20for%20the%20dump%20to%20be%20generated.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CP%3EOriginally%20written%20by%3A%20Sylvain%20Lecerf%3CBR%20%2F%3Erewritten%20and%20updated%20by%3A%20Muna%20AlHasan%20and%20%3CA%20href%3D%22http%3A%2F%2Flinqto.me%2Fabout%2Fpcociuba%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EPaul%20Cociuba%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-891467%22%20slang%3D%22en-US%22%3E%3CP%3ESometimes%20you%20have%20a%20long%20running%20request%20on%20your%20web-application%20for%20which%20you%20want%20to%20know%20why%20the%20processing%20time%20is%20so%20high.%20You%20can%20take%20advantage%20of%20built%20in%20IIS%20features%20to%20generate%20memory%20dumps%20and%20investigate%20what%20the%20request%20was%20doing%20when%20it%20was%20hanging.%20Here%20is%20how%20to%20accomplish%20that%20leveraging%20IIS.%3C%2FP%3E%3C%2FLINGO-TEASER%3E
Microsoft

If you are using IIS and you are familiar with the failed request tracing feature, or FREB for short, you know how to generate FREB traces for long running requests. In this article we will explore how to generate a dump based on the FREB rule, for example, when a request takes more than 15 seconds complete.

The major drawback is that you 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:

  • Configure a FREB rule as usual (you can go through the following troubleshooting tutorial mentioned above if you need a refresher:
    You should get the following configuration in the Web.Config of your application:

 

<?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 have not authorized the delegation, you’ll find the same configuration in the ApplicationHost.config file located in the folder "C:\Windows\System32\Inetsrv\Config".

 

  • Once tracing module is installed and the FREB rule is set, you need to allow Failed Tracing Module to accept custom actions, by setting CustomActionsEnabled attribute to True.

There are three main ways to perform this action:

1. Using the Configuration Editor in the IIS Manager Console:
The first one and the recommended one, is to use the Configuration Editor on the server level, and navigate to applicationHost/sites then click on the '…' button as shown in the Figure below :

image.pngThen, select the site you have already added the Failed Tracing Rule for, and set customActionsEnabled to True:

 

image.png


2. Edit the ApplicationHost.config file

The second way, is to open the ApplicationHost.config

  • Look for the tag <sites>
  • And add to the web site you want to monitor customActionsEnabled="true" to <traceFailedRequestsLogging enabled="true" />
  • The configuration for the Default Web Site will thus become:

 

<sites>
    <site name=" Delay.com" id="2" 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>

 


3. Using the appcmd command line tool
The third way, is to use the appcmd.exe tool used to configure IIS in command line mode:

  • Open a CMD console
  • Navigate to the folder "C:\Windows\System32\Inetsrv"
  • Then execute the following command-line: (/[name='x'] where x is the name of your web site)

 

appcmd.exe set config -section:system.applicationHost/sites "/[name= Delay.com].traceFailedRequestsLogging.customActionsEnabled:"true"" /commit:apphost

 

You should find the exact same configuration as the one displayed above in the ApplicationHost.config file.

 

  • Now, to be able to generate a dump via a FREB rule, you need to install ProcDump, and copy the executable under the C:\procDump path (Preferably) and create a directory called myDumps under C:\ drive as well.
  • !!! Warning !!! You have to install the ProcDump tool in a folder path that does not contain whitespaces, otherwise it will be impossible to execute ProcDump via FREB.
    For example, "C:\procdump" is a good path folder while "C:\Process Dump" isn’t.
  • The last step consists to indicate the specific action we need: generate a dump, this action can be done either from Configuration Editor (which is again the recommended way), or directly from Web or ApplicationHost configuration files.
  • Using Configuration Editor.
    • You can do this action either on the server level or Site level, as shown in below figure:image.png
    • Click on the … button on above figure, then Click Add action link under the Action Pane, and fill properties as shown below:image.png

      CustomActionExe corresponds to the executable we want to launch
      customActionParams corresponds to the parameters passed to the executable (note that the %1% parameter will be used by IIS to pass in the PID of the worker process to the procdump executable)
      By default dumps will be generated in the folder C:\myDumps.Using Configuration Editor
  • Using Configuration (web or applicationHost) files.
    • in the web or applicationHost config file, in the section <webServer> <tracing> <traceFailedRequests>.
      You just need to add the following elements to <add path="*">:
      <add path="*" customActionExe="C:\Procdump\procdump.exe" customActionParams="-accepteula -ma %1% c:\myDumps" customActionTriggerLimit="50">​

      You should get a Web.Config / ApplicationHost.config similar to the following:

      <?xml version="1.0" encoding="UTF-8"?>
      <configuration>
          <system.webServer>
              <tracing>
                  <traceFailedRequests>
                      <add path="*" customActionExe="C:\Procdump\procdump.exe" customActionParams="-accepteula -ma %1% c:\myDumps" 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" to limit the activation of the rule to a specific url type.

Once all these configurations are saved, you only need to reproduce the issue and wait for the dump to be generated.

Originally written by: Sylvain Lecerf
rewritten and updated by: Muna AlHasan and Paul Cociuba