My ASP.NET Web Application serves on IIS 7.0 and .NET 4.0
I want to measure total duration for "any request to my web services methods (asmx)" This log needs to include some custom data (for example ID, given by my application).
I am planning to follow these steps:
-- Run application in Integrated Pipeline mode
-- Implement custom http module and attach to BeginRequest and EndRequest events of HttpApplication.
-- In BeginRequest method, Start Stopwatch
-- In EndRequest method; end Stopwatch; read custom ID data from context.Session; write results to database or file log.
Do you think it is a good method? What is the best way to achieve this, would you recommend other?