none
.Net profiler - Tag and Follow the exit calls RRS feed

  • Question

  • Hi,

    I am able to profile the simple .Net applications which does not have a exit calls such as HttpWebRequests etc. 

    If i have a .Net application that calls another application from same or another AppDomain using HttpWebRequests, how can i assign same GUID string to that webrequest also (Tag and Follow).

    I tried the following (inside my injected C# helper function)

    string rGuid = (string)CallContext.LogicalGetData("guid");

    if(rGuid == null)

    {

    CallContext.LogicalSetData("guid",Guid.NewGuid().ToString());

    }

    But the rGuid is not same in the called web request. How can i achieve this Tag and follow concept..?

    ./Selva

    Wednesday, December 9, 2015 7:23 AM

Answers

  • Did you verify that the logical call context gets passed in the request? I believe remoting includes it (or a subset of it) in the call, but I don't recall anything about it being included in HTTP requests outside of remoting.

    I'm not very familiar with ASP.NET or HttpWebRequest, but if you are injecting anyway, then maybe you could copy your guid into HttpWebRequest.Headers on the client side and from the request headers back to the call context on the server.

    You might also want to verify that your guid in the logical call context isn't left behind after the relevant task is done, otherwise it won't get a new guid for the next task.

    • Marked as answer by Selva VS Friday, December 11, 2015 5:31 AM
    Wednesday, December 9, 2015 8:44 AM