locked
How to trace a specific request RRS feed

  • Question

  • Hi there,

    My scenario is: there is a asp.net application. a few end-users get very slow response. I need to know the time period of every steps/stack: how much time the IIS dispatch the request, how much time the business logic execute, especially, every call stack execute time period, in my scenario, there is a WCF service to provide some data. I also need to know this time period.

    Does anyone can give me some related articles?

    edit:

    To make this question more clear: The application has been developed, I cannot add any more trace code to that application. Does any one know the profile way?

    edit: after some research, I know the CLR profiler cannot achieve my goal.

    Thanks.

    Mike Feng


    Mike Feng
    Help me, Help you




    • Edited by Mike Feng Wednesday, August 7, 2013 5:24 AM update progress
    Tuesday, August 6, 2013 9:27 AM

Answers

  • Hi Mike,

    Nice to see you in forum. Hope you are doing well recently. :)

    About performance issue, I don't think a tool like profiler is a good start. To troubleshoot the performance issue that only experienced by some of your end users, I think a good start is to narrow down the scenarios. For example, whether all users access your system in same time encountered the same problem. whether the issue occurs during a specific time period.

    On client side, I think you can use tools like fiddler to check which calls or procedures are slow when end user is doing an action on the web page. Then you can go to IIS to check IIS log or http.sys to check if there is any problem. By following above steps, I believe you are able to find out which service call is the slow one. And then check if there is any database operation and then troubleshoot db site issues.

    Anyway, there is no such tool can capture a end to end performance tracing. We have to narrow down problem step by step. And I don't this CLR queue is the where you can get an answer for troubleshooting ASP.NET or WCF related performance issues.

    Try http://forums.asp.net to start troubleshooting. Feel free to let me know if you have any concerns.

    Thanks,


    Alan Yao [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Mike Feng Thursday, August 15, 2013 3:07 PM
    Wednesday, August 14, 2013 7:31 AM

All replies

  • Does any members has useful blogs? documents?

    Thanks


    Mike Feng Help me, help you

    Tuesday, August 6, 2013 2:53 PM
  • Hello Mike,

    Welcome to MSDN Forum.  Thank you for posting in MSDN Forum.

    I have some actions for you to perform in order to resolve your problem.

    1. How to: Analyze ASP.NET Web Application Performance by Using the Performance Administration Tool.

    2. Use the StopWatch class to calculate the execution time of a block of code.

    3. A high-performance ASP.NET logging and tracing tool.

    4. ASP.NET and IIS Performance Troubleshooting Tools.

    I hope this will help resolve your problem. If anything is unclear, please free feel to let us know.

    Best Regards,


    Wednesday, August 7, 2013 5:48 AM
  • Hi Hetro,

    I am not John.

    I don't think StopWatch can help me. As I have mentioned, the asp.net application was developed by the other team. I cannot make a stopwatch in it.

    I don't try the tools you suggested, because my purpose is to make a tool. To simply describe this question, I want to know a way to trace every request.

    Thanks.

    Best regards,


    Mike Feng
    Help me, help you

    Wednesday, August 7, 2013 7:34 AM
  • Hi Mike,

    Have you ever think about writing your own custom HttpModule? I’d like to refer you to the reference below:

    How to Add Tracing to IIS 7.0 Managed Modules

    In addition, I find something more about debugging and tracing.

    Debugging, Tracing and Instrumentation in .NET and ASP.NET (14 FAQ) with full video

    Best Regards,

    Wednesday, August 14, 2013 7:23 AM
  • Hi Mike,

    Nice to see you in forum. Hope you are doing well recently. :)

    About performance issue, I don't think a tool like profiler is a good start. To troubleshoot the performance issue that only experienced by some of your end users, I think a good start is to narrow down the scenarios. For example, whether all users access your system in same time encountered the same problem. whether the issue occurs during a specific time period.

    On client side, I think you can use tools like fiddler to check which calls or procedures are slow when end user is doing an action on the web page. Then you can go to IIS to check IIS log or http.sys to check if there is any problem. By following above steps, I believe you are able to find out which service call is the slow one. And then check if there is any database operation and then troubleshoot db site issues.

    Anyway, there is no such tool can capture a end to end performance tracing. We have to narrow down problem step by step. And I don't this CLR queue is the where you can get an answer for troubleshooting ASP.NET or WCF related performance issues.

    Try http://forums.asp.net to start troubleshooting. Feel free to let me know if you have any concerns.

    Thanks,


    Alan Yao [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Mike Feng Thursday, August 15, 2013 3:07 PM
    Wednesday, August 14, 2013 7:31 AM
  • Hi Alan,

    Nice to see you here, too.

    Yes, there indeed no such tool, and we are trying to make one. Thank you for your guide.

    Be happy.

    Best regards,


    Mike Feng
    Help me, help you

    Thursday, August 15, 2013 3:06 PM